Ansible Configuration

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

ansible.cfg

'ansible.cfg' contains configuration defaults. It can be placed in the following locations:

  • /etc/ansible/ansible.cfg
  • ~/.ansible.cfg
  • the directory that contains the playbook

Example

[ssh_connection]
pipelining=True
ssh_args = -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null
[defaults]
strategy_plugins = plugins/mitogen/ansible_mitogen/plugins/strategy
force_valid_group_names = ignore
host_key_checking = False
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp
stdout_callback = skippy
library = ./library
callback_whitelist = profile_tasks
roles_path = roles:$VIRTUAL_ENV/usr/local/share/kubespray/roles:$VIRTUAL_ENV/usr/local/share/ansible/roles:/usr/share/kubespray/roles
deprecation_warnings=False
inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo, .creds
[inventory]
ignore_patterns = artifacts, credentials

Configuration

SSH Host Key Authenticity Checking

In ansible.cfg:

[defaults]
...
host_key_checking = False