Skip to content

Commit ac50457

Browse files
authored
Merge pull request #153 from pinguinkiste/fs-whitelist
Prevent disabling of filesystems via whitelist
2 parents 743d2c8 + d429d53 commit ac50457

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ We disable the following filesystems, because they're most likely not used:
8484
* "udf"
8585
* "vfat"
8686

87+
To prevent some of the filesystems from being disabled, add them to the `os_filesystem_whitelist` variable.
88+
8789
## Example Playbook
8890

8991
- hosts: localhost

default.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
os_auth_allow_homeless: true
1919
os_security_suid_sgid_blacklist: ['/bin/umount']
2020
os_security_suid_sgid_whitelist: ['/usr/bin/rlogin']
21+
os_filesystem_whitelist: ['vfat']
2122
sysctl_config:
2223
net.ipv4.ip_forward: 0
2324
net.ipv6.conf.all.forwarding: 0

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,5 @@ os_unused_filesystems:
194194
- "udf"
195195
- "vfat"
196196

197+
# whitelist for used filesystems
198+
os_filesystem_whitelist: []

templates/modprobe.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# {{ ansible_managed | comment }}
1+
{{ ansible_managed | comment }}
22

3-
{% for fs in os_unused_filesystems %}
3+
{% for fs in os_unused_filesystems | difference(os_filesystem_whitelist) %}
44
install {{fs}} /bin/true
55
{% endfor %}

0 commit comments

Comments
 (0)