Last active
December 8, 2016 19:12
-
-
Save nick-markowski/4fddf3714f5a77aab14664d1f893cc49 to your computer and use it in GitHub Desktop.
legacy catalyst detector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| legacy_opts = [ | |
| 'simp_auditing', | |
| 'use_auditd', | |
| 'enable_auditing', | |
| 'enable_clamav', | |
| 'dns::search', | |
| 'dns::servers', | |
| 'use_fips', | |
| 'simp_firewall', | |
| 'enable_iptables', | |
| 'use_iptables', | |
| 'manage_firewall', | |
| 'use_haveged', | |
| 'enable_ipv6', | |
| 'use_ipv6', | |
| 'simp_ipv6', | |
| 'simp_krb5', | |
| 'use_ldap', | |
| 'ldap::base_dn', | |
| 'ldap::bind_dn', | |
| 'ldap::bind_pw', | |
| 'ldap::bind_hash', | |
| 'ldap::sync_dn', | |
| 'ldap::sync_pw', | |
| 'ldap::sync_hash', | |
| 'ldap::root_dn', | |
| 'ldap::root_hash', | |
| 'ldap::master', | |
| 'ldap::uri', | |
| 'rotate_logs', | |
| 'enable_logrotate', | |
| 'ntpd::servers', | |
| 'cipher_suite', | |
| 'simp_pki', | |
| 'use_simp_pki', | |
| 'enable_pki', | |
| 'manage_pki', | |
| 'puppet::server', | |
| 'puppet::ca', | |
| 'puppet::ca_port', | |
| 'rsync::server', | |
| 'rsync::timeout', | |
| 'simp_selinux', | |
| 'selinux_enforced', | |
| 'enable_selinux', | |
| 'use_sssd', | |
| 'use_stunnel', | |
| 'simp_logging', | |
| 'to_syslog', | |
| 'enable_logging', | |
| 'use_simp_logging', | |
| 'log_servers', | |
| 'failover_log_servers', | |
| 'simp_tcpwrappers', | |
| 'enable_tcpwrappers', | |
| 'manage_tcpwrappers', | |
| 'client_nets', | |
| 'tcpwrappers', | |
| 'iptables', | |
| 'logrotate' | |
| ] | |
| $cata_list = [] #get it?? | |
| legacy_opts.each do |lopt| | |
| $cata_list << `grep #{lopt} . -R` if not `grep #{lopt} . -R` == '' | |
| end | |
| puts "CATA LIST:" | |
| $cata_list.each do |c| | |
| # Don't worry about the changelog, and update the readme later! | |
| if not ["simp_options","CHANGELOG", "README"].any? { |word| c.include?(word) } | |
| if ['iptables','tcpwrappers','logrotate','pam'].any? { |word| c.include?(word) } | |
| puts "No catalyst detected, but class governed by a new catalyst is: #{c}" | |
| else | |
| puts c | |
| end | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment