Use template to generate modprobe settings

This commit is contained in:
danielkubat 2020-12-12 02:11:30 +01:00
parent 1f20af2331
commit 902cc8536e
2 changed files with 8 additions and 7 deletions

View File

@ -207,15 +207,12 @@
- efi
- name: disable unused filesystems
lineinfile:
template:
src: "etc/modprobe.d/cis.conf.j2"
dest: "/etc/modprobe.d/cis.conf"
owner: root
group: root
owner: 'root'
group: 'root'
mode: '0644'
line: "install {{ item }} /bin/true"
state: present
create: true
with_items: "{{ modprobe_unused_filesystems }}"
tags:
- harden

View File

@ -0,0 +1,4 @@
# Generated by Ansible
{% for fs in modprobe_unused_filesystems %}
install {{ fs }} /bin/true
{% endfor %}