Skip to content

Instantly share code, notes, and snippets.

@vanzhiganov
Forked from wbcurry/.ansible.cfg
Last active June 9, 2024 00:47
Show Gist options
  • Save vanzhiganov/088d9b5ca52a4ae670ce624c9409bbe8 to your computer and use it in GitHub Desktop.
Save vanzhiganov/088d9b5ca52a4ae670ce624c9409bbe8 to your computer and use it in GitHub Desktop.
Ansible: .ansible.cfg
# config file for ansible -- http://ansible.com/
# ==============================================
# nearly all parameters can be overridden in ansible-playbook
# or with command line flags. ansible will read ANSIBLE_CONFIG,
# ansible.cfg in the current working directory, .ansible.cfg in
# the home directory or /etc/ansible/ansible.cfg, whichever it
# finds first
[defaults]
# some basic default values...
inventory = $HOME/.ansible/hosts
remote_tmp = $HOME/.ansible/tmp
forks = 150
sudo_user = root
# plays will gather facts by default, which contain information about
# the remote system.
#
# smart - gather by default, but don't regather if already gathered
# implicit - gather by default, turn off with gather_facts: False
# explicit - do not gather by default, must say gather_facts: True
gathering = smart
# additional paths to search for roles in, colon separated
roles_path = $HOME/.ansible/roles
# uncomment this to disable SSH key host checking
host_key_checking = False
# logging is off by default unless this path is defined
# if so defined, consider logrotate
log_path = /var/log/ansible.log
# default module name for /usr/bin/ansible
module_name = shell
# set plugin path directories here, separate with colons
action_plugins = /usr/share/ansible_plugins/action_plugins:$HOME/.ansible/plugins/action_plugins
callback_plugins = /usr/share/ansible_plugins/callback_plugins:$HOME/.ansible/plugins/callback_plugins
connection_plugins = /usr/share/ansible_plugins/connection_plugins:$HOME/.ansible/plugins/connection_plugins
lookup_plugins = /usr/share/ansible_plugins/lookup_plugins:$HOME/.ansible/plugins/lookup_plugins
vars_plugins = /usr/share/ansible_plugins/vars_plugins:$HOME/.ansible/plugins/vars_plugins
filter_plugins = /usr/share/ansible_plugins/filter_plugins:$HOME/.ansible/plugins/filter_plugins
# by default callbacks are not loaded for /bin/ansible, enable this if you
# want, for example, a notification or logging callback to also apply to
# /bin/ansible runs
#bin_ansible_callbacks = False
# the CA certificate path used for validating SSL certs. This path
# should exist on the controlling node, not the target nodes
# common locations:
# RHEL/CentOS: /etc/pki/tls/certs/ca-bundle.crt
# Fedora : /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
# Ubuntu : /usr/share/ca-certificates/cacert.org/cacert.org.crt
ca_file_path = /usr/share/ca-certificates/cacert.org/cacert.org.crt
# if set to a persistent type (not 'memory', for example 'redis') fact values
# from previous runs in Ansible will be stored. This may be useful when
# wanting to use, for example, IP information from one group of servers
# without having to talk to them in the same playbook run to get their
# current IP information.
fact_caching = jsonfile
fact_caching_connection = $HOME/.ansible/facts
fact_caching_timeout = 600
# retry files
#retry_files_enabled = False
retry_files_save_path = ~/.ansible/retry
[privilege_escalation]
#become=True
#become_method=sudo
#become_user=root
#become_ask_pass=False
[ssh_connection]
# ssh arguments to use
# Leaving off ControlPersist will result in poor performance, so use
# paramiko on older platforms rather than removing it
ssh_args = -o ControlMaster=auto -o ControlPersist=60s
# The path to use for the ControlPath sockets. This defaults to
# "%(directory)s/ansible-ssh-%%h-%%p-%%r", however on some systems with
# very long hostnames or very long path names (caused by long user names or
# deeply nested home directories) this can exceed the character limit on
# file socket names (108 characters for most platforms). In that case, you
# may wish to shorten the string below.
#
# Example:
# control_path = %(directory)s/%%h-%%r
control_path = %(directory)s/ansible-ssh-%%h-%%p-%%r
# Enabling pipelining reduces the number of SSH operations required to
# execute a module on the remote server. This can result in a significant
# performance improvement when enabled, however when using "sudo:" you must
# first disable 'requiretty' in /etc/sudoers
#
# By default, this option is disabled to preserve compatibility with
# sudoers configurations that have requiretty (the default on many distros).
#
pipelining = True
# if True, make ansible use scp if the connection type is ssh
# (default is sftp)
scp_if_ssh = True
[accelerate]
accelerate_port = 5099
accelerate_timeout = 30
accelerate_connect_timeout = 5.0
# The daemon timeout is measured in minutes. This time is measured
# from the last activity to the accelerate daemon.
accelerate_daemon_timeout = 30
# If set to yes, accelerate_multi_key will allow multiple
# private keys to be uploaded to it, though each user must
# have access to the system via SSH to add a new key. The default
# is "no".
#accelerate_multi_key = yes
[selinux]
# file systems that require special treatment when dealing with security context
# the default behaviour that copies the existing context or uses the user default
# needs to be changed to use the file system dependent context.
#special_context_filesystems=nfs,vboxsf,fuse,ramfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment