Skip to content

Commit

Permalink
disable selinux for debian (opensearch-project#152)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
saravanan30erd authored and peterzhuamazon committed Jul 22, 2024
1 parent 37a2d2a commit 0db16cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions roles/linux/dashboards/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions roles/linux/opensearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0db16cb

Please sign in to comment.