Add SELinux support to the base role
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
##############
|
##############
|
||||||
#### base ####
|
#### base ####
|
||||||
##############
|
##############
|
||||||
|
selinux:
|
||||||
|
state: enforcing
|
||||||
|
|
||||||
base_allow_reboot: false
|
base_allow_reboot: false
|
||||||
base_manage_network: false
|
base_manage_network: false
|
||||||
|
|||||||
@@ -4,6 +4,18 @@
|
|||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
|
- name: Get the default policy and basic SELinux utilities
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: ["selinux-basics", "selinux-policy-default", "auditd"]
|
||||||
|
state: present
|
||||||
|
when: selinux is defined and selinux is not false
|
||||||
|
|
||||||
|
- name: Configure SELinux
|
||||||
|
ansible.posix.selinux:
|
||||||
|
state: "{{ selinux.state | default('permissive') }}"
|
||||||
|
policy: "{{ selinux.policy | default('default') }}"
|
||||||
|
when: selinux is defined and selinux is not false
|
||||||
|
|
||||||
- name: Install GPG
|
- name: Install GPG
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: gpg
|
name: gpg
|
||||||
|
|||||||
Reference in New Issue
Block a user