mirror of
https://github.com/rocky-linux/infrastructure
synced 2024-12-27 21:20:55 +00:00
Merge pull request #18 from danielkubat/harden
Use template to generate modprobe settings
This commit is contained in:
commit
3f85cb863a
2 changed files with 9 additions and 8 deletions
|
@ -175,7 +175,7 @@
|
|||
dest: "/etc/audit/rules.d/collection.rules"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '600'
|
||||
mode: '0600'
|
||||
backup: true
|
||||
notify:
|
||||
- regenerate_auditd_rules
|
||||
|
@ -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
|
||||
|
||||
|
|
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 a new issue