-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathansible.cfg
95 lines (74 loc) · 3.8 KB
/
ansible.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[defaults]
# default user to use for playbooks if user is not specified
# (/usr/bin/ansible will use current user as default)
# Use the YAML callback plugin.
## ref: https://www.jeffgeerling.com/blog/2018/use-ansibles-yaml-callback-plugin-better-cli-experience
stdout_callback = yaml
## ref: https://stackoverflow.com/questions/50009505/ansible-stdout-formatting/50017860
# Use the stdout_callback when running ad-hoc commands.
bin_ansible_callbacks = True
#ansible_user = deployer
#remote_user = root
#remote_user = deployer
host_key_checking = False
## ref: https://github.com/ansible/ansible/issues/21562
#remote_tmp = $HOME/.ansible/tmp
#local_tmp = $HOME/.ansible/tmp
## https://github.com/ansible/ansible/blob/308723c3ca1122363e419070f1fa1d76ff5611a9/docs/docsite/rst/user_guide/intro_dynamic_inventory.rst#using-inventory-directories-and-multiple-inventory-sources
#inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo
inventory_ignore_extensions = ~, .orig, .bak, .cfg, .retry, .pyc, .pyo
## ref: https://serverfault.com/questions/628989/how-to-set-default-ansible-username-password-for-ssh-connection
#inventory = ./hosts.ini
#inventory = inventory/hosts.ini
## ref: https://github.com/ansible/ansible/issues/5316#issuecomment-30749291
#inventory = inventory/hosts.ini,inventory/hosts-openstack.ini,inventory/openstack_inventory.py
inventory = inventory
forks=100
# pipelining
# Improves performance of execution
# Must be False for compatibility with sudoers (user postgres on rhel7) - role remote db
#
# Ansible page:
# This can result in a very significant performance improvement when enabled,
# however when using “sudo:” operations you must first disable ‘requiretty’ in /etc/sudoers on all managed hosts.
#pipelining = False
## to resolve "Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user"
## ref: https://github.com/georchestra/ansible/issues/55
## ref: https://github.com/plone/ansible.plone_server/issues/86#issuecomment-226457346
pipelining=True
## ref: https://github.com/ansible/ansible/issues/21562
#remote_tmp = ~/.ansible/tmp
#local_tmp = ~/.ansible/tmp
## ref: https://docs.ansible.com/ansible/2.4/intro_configuration.html#log-path
#log_path=/var/log/ansible.log
log_path=ansible.log
[ssh_connection]
# when ssh throws 'unix domain socket "too long"' error
# see
# - https://github.com/ansible/ansible/issues/11536
# - http://stackoverflow.com/q/35970686/3834059
# - http://stackoverflow.com/q/35595468/3834059
#control_path = %(directory)s/%%h-%%p-%%r)
#ssh_args =
#ssh_args = -o StrictHostKeyChecking=no
## ref: https://stackoverflow.com/questions/51675831/ansible-stops-connecting-to-the-host-via-ssh
## ref: https://github.com/ansible/ansible/issues/16929
#ssh_args = -o ServerAliveInterval=50
#ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o ServerAliveInterval=50
#ssh_args = -C -o ControlMaster=auto -o ControlPersist=30m -o ServerAliveInterval=50
#ssh_args = -o ControlMaster=no -o ControlPersist=2m -o ServerAliveInterval=50
ssh_args = -o ControlMaster=auto -o ControlPersist=2m -o ServerAliveInterval=50
scp_if_ssh = True
[inventory]
## how to enable fact caching on the ansible server
## ref: https://docs.ansible.com/ansible/latest/plugins/cache.html
cache=True
#cache=False
## If you configure Ansible with just the inventory plugin you are using,
## you avoid warnings about files not meeting the requirements of the other plugins.
## ref: https://github.com/ansible/ansible/issues/48859
#enable_plugins = ini
## ref: https://github.com/ansible/ansible/issues/40903
#enable_plugins = openstack
## ref: http://willthames.github.io/2017/11/01/generating-inventory.html
enable_plugins = host_list,script,auto,yaml,ini,toml,openstack