This is an old revision of the document!
Reference: xavki (youtube)
/etc/ansible/ansible.cfg
[defaults] host_key_checking = False # don't ask for accepting ssh keys callback_whithelist = profile_task # Print tasks duration forks = 30 # Parallel sessions [ssh_connection] pipelining = True # Send python command to target directly to python interpreter, better for perf ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s PreferredAuthentification=publickey
Collect only one time (during one hour) info (gather_cache) on target…os_version…
[defaults] fact_caching = jsonfile fact_caching_timeout = 3600 fact_caching_connection = /tmp/myfacts
Test you playbook
# ansible-playbook -i inventories/production myplaybook.yml --check
Or
# ansible-playbook -i inventories/production myplaybook.yml --dry-run
[ansible@lnxa100 ~]$ ansible-galaxy init test-role-1 - Role test-role-1 was created successfully [ansible@lnxa100 ~]$ ll drwxrwxr-x 2 ansible ansible 39 Mar 6 13:17 facts drwxrwxr-x 10 ansible ansible 154 Mar 6 14:21 test-role-1 [ansible@lnxa100 ~]$ cd test-role-1/ [ansible@lnxa100 test-role-1]$ ll drwxrwxr-x 2 ansible ansible 22 Mar 6 14:21 defaults drwxrwxr-x 2 ansible ansible 6 Mar 6 14:21 files drwxrwxr-x 2 ansible ansible 22 Mar 6 14:21 handlers drwxrwxr-x 2 ansible ansible 22 Mar 6 14:21 meta -rw-rw-r-- 1 ansible ansible 1328 Mar 6 14:21 README.md drwxrwxr-x 2 ansible ansible 22 Mar 6 14:21 tasks drwxrwxr-x 2 ansible ansible 6 Mar 6 14:21 templates drwxrwxr-x 2 ansible ansible 39 Mar 6 14:21 tests drwxrwxr-x 2 ansible ansible 22 Mar 6 14:21 vars