Prevent disabling of filesystems via whitelist

This commit is contained in:
Manuel Prinz 2017-10-30 19:00:47 +01:00
parent bf6cb73cd5
commit d429d53c60
4 changed files with 7 additions and 2 deletions

View file

@ -84,6 +84,8 @@ We disable the following filesystems, because they're most likely not used:
* "udf"
* "vfat"
To prevent some of the filesystems from being disabled, add them to the `os_filesystem_whitelist` variable.
## Example Playbook
- hosts: localhost

View file

@ -18,6 +18,7 @@
os_auth_allow_homeless: true
os_security_suid_sgid_blacklist: ['/bin/umount']
os_security_suid_sgid_whitelist: ['/usr/bin/rlogin']
os_filesystem_whitelist: ['vfat']
sysctl_config:
net.ipv4.ip_forward: 0
net.ipv6.conf.all.forwarding: 0

View file

@ -194,3 +194,5 @@ os_unused_filesystems:
- "udf"
- "vfat"
# whitelist for used filesystems
os_filesystem_whitelist: []

View file

@ -1,5 +1,5 @@
# {{ ansible_managed | comment }}
{{ ansible_managed | comment }}
{% for fs in os_unused_filesystems %}
{% for fs in os_unused_filesystems | difference(os_filesystem_whitelist) %}
install {{fs}} /bin/true
{% endfor %}