Fix issues with EL8

This commit is contained in:
Anthony Rose 2021-12-12 22:46:38 +00:00
parent 3ad638b65b
commit 006f6c8688
3 changed files with 6 additions and 1 deletions

View file

@ -39,7 +39,6 @@
- dnf-automatic - dnf-automatic
- git - git
- gnupg2 - gnupg2
- lldb
- mc - mc
- nmap - nmap
- openssh-server - openssh-server

View file

@ -32,6 +32,10 @@
name: sshd.service name: sshd.service
state: restarted state: restarted
when: changed_ssh_config.changed == true when: changed_ssh_config.changed == true
- name: Check for firewall-cmd
ansible.builtin.stat:
path: /usr/bin/firewall-cmd
register: firewall_cmd
- name: Allow SSH through firewall - name: Allow SSH through firewall
become: true become: true
ansible.posix.firewalld: ansible.posix.firewalld:
@ -39,3 +43,4 @@
permanent: yes permanent: yes
state: enabled state: enabled
immediate: yes immediate: yes
when: firewall_cmd.stat.exists

View file

@ -18,3 +18,4 @@
ansible.builtin.copy: ansible.builtin.copy:
src: zram-generator.conf src: zram-generator.conf
dest: /etc/systemd/zram-generator.conf dest: /etc/systemd/zram-generator.conf
when: ansible_distribution_major_version == '9'