๐ค Ansible Security Baseline and Top 10 Misconfigurations
Intro: Automation magnifies intent. Secure Ansible design is mostly about source control, credential handling, approval flow, and limiting what automation can reach.
What this page includes
- baseline security guidance
- top 10 Ansible and AWX / Controller misconfigurations
- comments on practical rollout
Baseline
- keep playbooks, inventories, and roles in version control
- require peer review before automation reaches production
- separate playbook authors, credential admins, and platform admins where practical
- store secrets in Vault or equivalent secret backends
- do not expose AWX / Controller broadly to the internet
- minimize superuser and sudo access
- use signed or trusted collections and dependencies where possible
- limit inventory and credential visibility to those who need it
Top 10 misconfigurations
- Production credentials visible to too many users
- AWX / Controller exposed directly to the public internet
- Shared admin or superuser accounts
- Playbooks that shell out excessively when safer modules exist
- Inventories with stale, privileged, or unscoped targets
- Secrets committed to repos or stored in plain variables
- Automation accounts with broad root or domain-admin reach
- No branch protection or approval flow on playbooks
- Third-party roles and collections used without review
- Logs or job outputs exposing secrets
Example checks
ansible-lint site.yml
ansible-playbook --syntax-check site.yml
grep -R "become: yes" .
grep -R "password:" .
Design comment
The most dangerous Ansible environments are the ones that feel efficient because they skip review, overtrust automation accounts, and treat inventories as harmless metadata.
2026 modernization notes
- normalize older Ansible Tower references to AWX or Ansible Automation Platform Controller depending on whether you mean the community or supported product line;
- prefer reviewed job definitions and execution environments over controller-local package sprawl;
- treat
ansible-containeras historical context, not as a current recommendation; - validate playbooks and roles against newer ansible-core templating behavior before major upgrades.