initial commit

This commit is contained in:
Robert Kaussow 2018-11-15 23:42:58 +01:00
parent 5b728c2aaf
commit 70c8d5e615
3 changed files with 23 additions and 0 deletions

4
defaults/main.yml Normal file
View File

@ -0,0 +1,4 @@
---
selinux_enabled: True
selinux_policy: "targeted"
selinux_state: "permissive"

2
tasks/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
- import_tasks: setup.yml

17
tasks/setup.yml Normal file
View 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