Skip to content

Instantly share code, notes, and snippets.

@mhutter
Last active November 26, 2019 19:24
Show Gist options
  • Save mhutter/30ff2df9b1f7291ac07b12dc9bdb8608 to your computer and use it in GitHub Desktop.
Save mhutter/30ff2df9b1f7291ac07b12dc9bdb8608 to your computer and use it in GitHub Desktop.
Ansible project template
[defaults]
forks = 20
inventory = ./hosts.yml
# Allow displaying and gathering custom stats
show_custom_stats = True
callback_whitelist = profile_tasks
# Speed up fact gathering
# Don't gather facts on each role (can be overwritten in playbooks)
gathering = smart
# Don't gather Puppet or Chef facts
gather_subset = all,!facter,!ohai
# Cache facts
fact_caching = jsonfile
fact_caching_connection = .ansible/facts
fact_caching_timeout = 600
# Disable useless features
nocows = True
retry_files_enabled = False
[inventory]
unparsed_is_failed = True
[privilege_escalation]
become = True
[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=600s
control_path = %(directory)s/ssh-%%h-%%p-%%r
control_path_dir = ~/.ansible/cp
pipelining = True
scp_if_ssh = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment