File tree Expand file tree Collapse file tree 8 files changed +6
-25
lines changed Expand file tree Collapse file tree 8 files changed +6
-25
lines changed Original file line number Diff line number Diff line change 6868 tags : yum
6969
7070- import_tasks : apt.yml
71- when : ansible_facts.distribution in [ 'Debian', 'Ubuntu']
71+ when : ansible_facts.os_family == 'Debian'
7272 tags : apt
7373
7474- import_tasks : selinux.yml
Original file line number Diff line number Diff line change 1919- name : Remove used filesystems from fs-list
2020 set_fact :
2121 os_unused_filesystems : " {{ os_unused_filesystems | difference(ansible_mounts | map(attribute='fstype') | list) }}"
22- # we cannot do this on el6 and below, because these systems don't support the map function
23- when : not ((ansible_facts.os_family in ['Oracle Linux', 'RedHat']) and ansible_facts.distribution_major_version < '7')
2422
2523- name : Disable unused filesystems | os-10
2624 template :
Original file line number Diff line number Diff line change 1919
2020- import_tasks : pam_debian.yml
2121 when :
22- - ansible_facts.distribution in [ 'Debian', 'Ubuntu']
22+ - ansible_facts.os_family == 'Debian'
2323
2424- import_tasks : pam_rhel.yml
2525 when :
Original file line number Diff line number Diff line change 5858 ignoreerrors : true
5959 with_dict : ' {{ sysctl_config }}'
6060
61- - name : Change various sysctl-settings on rhel6-hosts or older , look at the sysctl-vars file for documentation
61+ - name : Change various sysctl-settings on Amazon Linux , look at the sysctl-vars file for documentation
6262 sysctl :
6363 name : ' {{ item.key }}'
6464 value : ' {{ item.value }}'
6565 state : present
6666 reload : true
6767 ignoreerrors : true
6868 with_dict : ' {{ sysctl_rhel_config }}'
69- when : ((ansible_facts.distribution in ['CentOS', 'Fedora', 'RedHat']) and
70- ansible_distribution_version|int is version('7', '<')) or ansible_facts.distribution == 'Amazon'
69+ when : ansible_facts.distribution == 'Amazon'
7170
7271 when : ansible_virtualization_type not in ['docker', 'lxc', 'openvz']
7372
7877 mode : ' 0644'
7978 when :
8079 - ufw_manage_defaults
81- - ansible_facts.distribution in [ 'Debian', 'Ubuntu']
80+ - ansible_facts.os_family == 'Debian'
8281 tags : ufw
Original file line number Diff line number Diff line change @@ -191,7 +191,6 @@ ssh_server_accept_env_vars: ''
191191# maximum number of concurrent unauthenticated connections to the SSH daemon
192192ssh_max_startups : ' 10:30:60' # sshd
193193
194- ssh_ps53 : ' yes'
195194ssh_ps59 : ' sandbox'
196195
197196ssh_macs : []
Original file line number Diff line number Diff line change 44 ssh_macs : ' {{ ssh_macs_53_default }}'
55 when : sshd_version is version('5.3', '>=')
66
7- - name : Set macs for Enterprise Linux >= 6.5 (openssh 5.3 with backports)
8- set_fact :
9- ssh_macs : ' {{ ssh_macs_53_el_6_5_default }}'
10- when :
11- - ansible_facts.distribution in ['CentOS', 'OracleLinux', 'RedHat']
12- - ansible_facts.distribution_version is version('6.5', '>=')
13-
147- name : Set macs according to openssh-version if openssh >= 5.9
158 set_fact :
169 ssh_macs : ' {{ ssh_macs_59_default }}'
Original file line number Diff line number Diff line change @@ -103,11 +103,7 @@ LogLevel {{ sshd_log_level }}
103103UseLogin no
104104{% endif %}
105105{% if sshd_version is version ('7.5' , '<' ) %}
106- UsePrivilegeSeparation {{
107- (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version <= '6')
108- or (ansible_facts.os_family in ['Oracle Linux', 'RedHat'] and ansible_facts.distribution_major_version <= '6' and not ansible_facts.distribution == 'Amazon')
109- | ternary(ssh_ps53, ssh_ps59)
110- }}
106+ UsePrivilegeSeparation {{ ssh_ps59 }}
111107{% endif %}
112108
113109LoginGraceTime {{ ssh_login_grace_time }}
Original file line number Diff line number Diff line change @@ -3,10 +3,6 @@ ssh_macs_53_default:
33 - hmac-ripemd160
44 - hmac-sha1
55
6- ssh_macs_53_el_6_5_default :
7- - hmac-sha2-512
8- - hmac-sha2-256
9-
106ssh_macs_59_default :
117 - hmac-sha2-512
128 - hmac-sha2-256
You can’t perform that action at this time.
0 commit comments