mirror of
https://github.com/rocky-linux/infrastructure
synced 2024-11-25 06:31:27 +00:00
Use template to generate modprobe settings
This commit is contained in:
parent
1f20af2331
commit
902cc8536e
@ -207,15 +207,12 @@
|
|||||||
- efi
|
- efi
|
||||||
|
|
||||||
- name: disable unused filesystems
|
- name: disable unused filesystems
|
||||||
lineinfile:
|
template:
|
||||||
|
src: "etc/modprobe.d/cis.conf.j2"
|
||||||
dest: "/etc/modprobe.d/cis.conf"
|
dest: "/etc/modprobe.d/cis.conf"
|
||||||
owner: root
|
owner: 'root'
|
||||||
group: root
|
group: 'root'
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
line: "install {{ item }} /bin/true"
|
|
||||||
state: present
|
|
||||||
create: true
|
|
||||||
with_items: "{{ modprobe_unused_filesystems }}"
|
|
||||||
tags:
|
tags:
|
||||||
- harden
|
- harden
|
||||||
|
|
||||||
|
4
ansible/playbooks/templates/etc/modprobe.d/cis.conf.j2
Normal file
4
ansible/playbooks/templates/etc/modprobe.d/cis.conf.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Generated by Ansible
|
||||||
|
{% for fs in modprobe_unused_filesystems %}
|
||||||
|
install {{ fs }} /bin/true
|
||||||
|
{% endfor %}
|
Loading…
Reference in New Issue
Block a user