chore: build
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
# ansible-playbook hardening/playbook-coredump-auditd-hardening.yml --limit pre-prod-uber
|
||||
|
||||
- name: Durcissement core dumps + apport + auditd (CIS Ubuntu 24.04)
|
||||
hosts: prod,pre-prod,bdd-redis-prod,replica-prod,infra,infra-runner,infra-utils,load-balancer
|
||||
hosts: k3s-prod
|
||||
become: true
|
||||
serial: 1
|
||||
any_errors_fatal: true
|
||||
@@ -76,13 +76,16 @@
|
||||
enabled: true
|
||||
state: started
|
||||
|
||||
- name: Verifier la presence de audit=1 dans GRUB_CMDLINE_LINUX
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/default/grub
|
||||
regexp: '^GRUB_CMDLINE_LINUX='
|
||||
line: 'GRUB_CMDLINE_LINUX="audit=1 audit_backlog_limit=8192"'
|
||||
backup: true
|
||||
- name: Ajouter audit=1 audit_backlog_limit=8192 a GRUB_CMDLINE_LINUX (sans ecraser d'autres flags existants, ex: apparmor=1)
|
||||
ansible.builtin.shell: |
|
||||
set -e
|
||||
if ! grep -q 'audit=1' /etc/default/grub; then
|
||||
cp /etc/default/grub /etc/default/grub.bak-cis-audit
|
||||
sed -i 's/^\(GRUB_CMDLINE_LINUX="[^"]*\)"/\1 audit=1 audit_backlog_limit=8192"/' /etc/default/grub
|
||||
echo CHANGED
|
||||
fi
|
||||
register: grub_conf
|
||||
changed_when: "'CHANGED' in grub_conf.stdout"
|
||||
|
||||
- name: Regenerer grub.cfg si la config a change
|
||||
ansible.builtin.command:
|
||||
|
||||
Reference in New Issue
Block a user