Ansible Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Ansible =ansible.cfg= 'ansible.cfg' contains configuration defaults. It can be placed in the following locations: * /etc/ansible/ansible.c...")
 
No edit summary
 
Line 9: Line 9:
* ~/.ansible.cfg
* ~/.ansible.cfg
* the directory that contains the playbook
* the directory that contains the playbook
=Example=
<syntaxhighlight lang='text'>
[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
</syntaxhighlight>
=Configuration=


==SSH Host Key Authenticity Checking==
==SSH Host Key Authenticity Checking==
Line 17: Line 41:
[defaults]
[defaults]
...
...
host_key_checking=False
host_key_checking = False
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 07:54, 12 December 2019

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