Compare commits

...

2 Commits

Author SHA1 Message Date
c8d3de3d8d Update README regarding SELinux 2025-02-07 20:50:20 +01:00
4ed15e5ea8 dont fail if selinux is undefined 2025-02-07 20:47:30 +01:00
2 changed files with 2 additions and 1 deletions
README.md
roles/configuration/tasks

@ -71,6 +71,7 @@ Inventory variables are defined for individual hosts or VMs in the inventory fil
| Variable | Description | Example Value |
|-------------------------|-----------------------------------------------------------------------------------|----------------------------------------------------|
| `cis` (optional) | Adjusts the installation to be CIS level 3 conformant. | `true`, `false` |
| `selinux` (optional) | Toggle SELinux, `false` means it should be disabled.` | `true`, `false` |
| `filesystem` | Filesystem type for the VM's primary storage. | `btrfs`, `ext4`, `xfs` |
| `hostname` | The hostname assigned to the virtual machine or system. | `vm01` |
| `os` | Operating system to be installed on the VM. | `archlinux`, `almalinux`, `debian11`, `debian12`, `fedora`, `rhel8`, `rhel9`, `rocky`, `ubuntu`, `ubuntu-lts` |

@ -313,7 +313,7 @@
register: result
- name: Disable SELinux
when: os | lower == "fedora" or not selinux | bool
when: os | lower == "fedora" or not (selinux | default(true) | bool)
ansible.builtin.lineinfile:
path: /mnt/etc/selinux/config
regexp: ^SELINUX=