Interview Prep/Ansible/Project Structure and Design

What goes into a project-level `ansible.cfg` for production?

BeginnerProductionProject Structure and Design
Answer
[defaults]
roles_path          = roles
collections_path    = collections
forks               = 20
host_key_checking   = True
interpreter_python  = auto_silent
callbacks_enabled   = ansible.posix.profile_tasks, ansible.posix.timer
retry_files_enabled = False
timeout             = 30

[ssh_connection]
pipelining = True
ssh_args   = -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=30

Commit it with the project, so CI and developers behave the same. Keep host-specific overrides (private key paths) out of it, using environment variables instead.

All Ansible questions Roadmap: Ansible

More on Project Structure and Design