initial commit
This commit is contained in:
parent
5b728c2aaf
commit
70c8d5e615
4
defaults/main.yml
Normal file
4
defaults/main.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
selinux_enabled: True
|
||||||
|
selinux_policy: "targeted"
|
||||||
|
selinux_state: "permissive"
|
2
tasks/main.yml
Normal file
2
tasks/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
- import_tasks: setup.yml
|
17
tasks/setup.yml
Normal file
17
tasks/setup.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: Set selinux policy
|
||||||
|
selinux:
|
||||||
|
policy: "{{ selinux_policy }}"
|
||||||
|
state: "{{ selinux_state }}"
|
||||||
|
register: __sestatus
|
||||||
|
|
||||||
|
- name: Add .autorelabel file (requires a reboot)
|
||||||
|
file:
|
||||||
|
path: /.autorelabel
|
||||||
|
state: touch
|
||||||
|
when:
|
||||||
|
- selinux_state == "enforcing"
|
||||||
|
- __sestatus.changed
|
||||||
|
become: True
|
||||||
|
become_user: root
|
Loading…
Reference in New Issue
Block a user