From 006f6c86881137fcf56f1d1671f56d42887bb385 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Sun, 12 Dec 2021 22:46:38 +0000 Subject: [PATCH] Fix issues with EL8 --- roles/el/tasks/packages-cli.yml | 1 - roles/el/tasks/ssh.yml | 5 +++++ roles/el/tasks/zram.yml | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) 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'