Files
a13labs.infra/ansible/roles/cis/tasks/disablenet.yml
T

25 lines
515 B
YAML
Raw Normal View History

2024-09-24 15:19:51 +02:00
---
- name: Disable kernel network modules
become: true
ansible.builtin.lineinfile:
dest: /etc/modprobe.d/disablenet.conf
line: "install {{ item }} /bin/true"
mode: "0644"
owner: root
group: root
state: present
create: true
with_items:
- "{{ net_modules_blocklist }}"
tags:
- modprobe
- CCE-80834-5
- CCE-82028-2
- CCE-82297-3
- CIS-UBUNTU2004-3.4.1
- CIS-UBUNTU2004-3.4.2
- CIS-UBUNTU2004-3.4.3
- CIS-UBUNTU2004-3.4.4
- M1038
- M1042