Ansible quickstart for secure baselines (idempotent and testable)
Outcome: apply your SSHD/PAM/fail2ban defaults across hosts safely, with check/diff runs and a skeleton for tests. 1) Layout baseline/ ├─ inventory.yaml ├─ site.yaml └─ roles/ └─ hardening/ ├─ tasks/main.yaml ├─ templates/sshd_config.j2 └─ files/sudoers_logging 2) Inventory # inventory.yaml all: hosts: web1.example.com: db1.example.com: vars: ansible_user: admin 3) Playbook # site.yaml – hosts: all become: true roles: – … Read more