From 0db16cbeba0d0b60b0bda60fc04964e422ac521c Mon Sep 17 00:00:00 2001 From: Saravanan Palanisamy Date: Mon, 22 Jul 2024 22:13:20 +0400 Subject: [PATCH] disable selinux for debian (#152) Signed-off-by: Peter Zhu --- roles/linux/dashboards/tasks/main.yml | 7 +++++-- roles/linux/opensearch/tasks/main.yml | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/linux/dashboards/tasks/main.yml b/roles/linux/dashboards/tasks/main.yml index fee472a..89670af 100644 --- a/roles/linux/dashboards/tasks/main.yml +++ b/roles/linux/dashboards/tasks/main.yml @@ -4,11 +4,14 @@ ansible.builtin.hostname: name: "{{ inventory_hostname }}" -# Disabling for Amazon Linux 2 as selinux is disabled by default. +# Disabling for Amazon Linux 2, Ubuntu and Debian as selinux is disabled by default. - name: Disable the selinux ansible.posix.selinux: state: disabled - when: (ansible_distribution != "Ubuntu") and (ansible_distribution != "Amazon") + when: + - ansible_distribution != "Ubuntu" + - ansible_distribution != "Amazon" + - ansible_distribution != "Debian" - name: Populate the nodes to /etc/hosts ansible.builtin.import_tasks: etchosts.yml diff --git a/roles/linux/opensearch/tasks/main.yml b/roles/linux/opensearch/tasks/main.yml index 0a4a6f5..01f18d1 100644 --- a/roles/linux/opensearch/tasks/main.yml +++ b/roles/linux/opensearch/tasks/main.yml @@ -4,11 +4,14 @@ ansible.builtin.hostname: name: "{{ inventory_hostname }}" -# Disabling for Amazon Linux 2 as selinux is disabled by default. +# Disabling for Amazon Linux 2, Ubuntu and Debian as selinux is disabled by default. - name: Disable the selinux ansible.posix.selinux: state: disabled - when: (ansible_distribution != "Ubuntu") and (ansible_distribution != "Amazon") + when: + - ansible_distribution != "Ubuntu" + - ansible_distribution != "Amazon" + - ansible_distribution != "Debian" - name: Populate the nodes to /etc/hosts ansible.builtin.import_tasks: etchosts.yml