3 ܓi@sBddlmZmZmZmZGdddeeeZGdddeeZdS))Plugin RedHatPlugin DebianPlugin UbuntuPluginc@s,eZdZdZdZd Zd ZddZdd Zd S) ForemanInstallerz Foreman installer and maintainerZforeman_installersysmgmtforeman-installerrubygem-foreman_maintaincCs2|jdddddddg|jd|jd gdS) Nz/etc/foreman-installer/*z/var/log/foreman-installer/*z/var/log/foreman-maintain/*z"/var/lib/foreman-maintain/data.ymlz//var/lib/foreman-maintain/satellite_metrics.ymlz*/etc/foreman-maintain/foreman_maintain.ymlz-/etc/foreman-installer/scenarios.d/*/.appliedz4/etc/foreman-installer/scenarios.d/*.migrations/*.rbzforeman-maintain service status)Z add_copy_specZadd_forbidden_pathZadd_cmd_output)selfr '/usr/lib/python3.6/foreman_installer.pysetupszForemanInstaller.setupcCsd}d}|j||dd}|j||d|j|dd|jdd d|jd d d |jd |ddd |jd|ddddS)Nz/var/log/foreman-installer/z~((foreman.*)?(\"::(foreman(.*?)|katello).*)?((::(.*)::.*(passw|cred|token|secret|key).*(\")?:)|(storepass )|(password =)))(.*)z \1 ********zZ(\s)+(Found key: (\"(foreman(.*?)|katello)::(.*(token|secret|key|passw).*)\") value:) (.*)z\1 \2 ********z?password(\", \"|=|\" value: \"|\": \")(.*?)(\", \".*|\"]]|\"|$)zpassword\1********\3z)/var/log/foreman-installer/foreman-proxy*z(\s*proxy_password\s=) (.*)z//var/log/foreman-maintain/foreman-maintain.log*z.(((passw|cred|token|secret)=)|(password ))(.*)z \1********z7(/etc/foreman-(installer|maintain)/(.*)((conf)(.*)?))|()z5((\:|\s*)(passw|cred|token|secret|key).*(\:\s|=))(.*)z;(/etc/foreman-(installer|maintain)/(.*)((yaml|yml)(.*)?))|(z \1"********")Zdo_path_regex_sub)r Z install_logsZlogsregZlogs_debug_regr r r postproc.s2  zForemanInstaller.postprocN)r)rr ) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesr rr r r r rs rcseZdZfddZZS)RedHatForemanInstallercs&|jddgddgdtjdS)NZforeman_satellite_logZsatellite_installer_logZ capsule_logZcapsule_installer_log)z(/var/log/foreman-installer/satellite.logz&/var/log/foreman-installer/capsule.log)Z add_file_tagssuperr )r ) __class__r r r YszRedHatForemanInstaller.setup)rrrr __classcell__r r )rr rWsrN)Zsos.report.pluginsrrrrrrr r r r  sH