Files
portfolio/infra-run/ansible/roles/cis-debian-ubuntu-hardening/tasks/sysctl.yml
T
Mateusz Suski ca5a876d03
lint / shell-yaml-ansible (push) Failing after 21s
Improve infra-run portfolio credibility
2026-05-08 21:18:22 +00:00

18 lines
594 B
YAML

---
- name: Apply selected sysctl settings
ansible.posix.sysctl:
name: "{{ item.key }}"
value: "{{ item.value }}"
sysctl_file: "{{ cis_sysctl_config_file }}"
state: present
reload: true
loop: "{{ cis_sysctl_settings | dict2items }}"
loop_control:
label: "{{ item.key }}"
when: not cis_container_detected | default(false) | bool
- name: Report skipped sysctl hardening inside containers
ansible.builtin.debug:
msg: "WARNING: Sysctl hardening skipped because a containerized environment was detected."
when: cis_container_detected | default(false) | bool