Skip to content

Commit

Permalink
Merge pull request #236 from jaredledvina/feature/allow-configuring-s…
Browse files Browse the repository at this point in the history
…elinux-status

Support configuring SELinux and default to enforcing
  • Loading branch information
rndmh3ro committed Oct 17, 2019
2 parents 754138d + 9298965 commit 804538e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,8 @@ os_hardening_enabled: true

# Set to false to disable installing and configuring auditd.
os_auditd_enabled: true

# Set the SELinux state, can be either disabled, permissive, or enforcing.
os_selinux_state: enforcing
# Set the SELinux polixy.
os_selinux_policy: targeted
5 changes: 5 additions & 0 deletions tasks/hardening.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@
- import_tasks: apt.yml
when: ansible_facts.distribution == 'Debian' or ansible_facts.distribution == 'Ubuntu'
tags: apt

- import_tasks: selinux.yml
tags: selinux
when:
- ansible_facts.selinux.status == 'enabled'
5 changes: 5 additions & 0 deletions tasks/selinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: configure selinux | selinux-01
selinux:
policy: "{{ os_selinux_policy }}"
state: "{{ os_selinux_state }}"

0 comments on commit 804538e

Please sign in to comment.