diff --git a/roles/el/tasks/packages-cli.yml b/roles/el/tasks/packages-cli.yml index 34e56a1..f039c67 100644 --- a/roles/el/tasks/packages-cli.yml +++ b/roles/el/tasks/packages-cli.yml @@ -39,7 +39,6 @@ - dnf-automatic - git - gnupg2 - - lldb - mc - nmap - openssh-server diff --git a/roles/el/tasks/ssh.yml b/roles/el/tasks/ssh.yml index 5059737..6ec8b85 100644 --- a/roles/el/tasks/ssh.yml +++ b/roles/el/tasks/ssh.yml @@ -32,6 +32,10 @@ name: sshd.service state: restarted 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 become: true ansible.posix.firewalld: @@ -39,3 +43,4 @@ permanent: yes state: enabled immediate: yes + when: firewall_cmd.stat.exists diff --git a/roles/el/tasks/zram.yml b/roles/el/tasks/zram.yml index be1b531..0f638ea 100644 --- a/roles/el/tasks/zram.yml +++ b/roles/el/tasks/zram.yml @@ -18,3 +18,4 @@ ansible.builtin.copy: src: zram-generator.conf dest: /etc/systemd/zram-generator.conf + when: ansible_distribution_major_version == '9'