ansible.cfg 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. # config file for ansible -- https://ansible.com/
  2. # ===============================================
  3. # nearly all parameters can be overridden in ansible-playbook
  4. # or with command line flags. ansible will read ANSIBLE_CONFIG,
  5. # ansible.cfg in the current working directory, .ansible.cfg in
  6. # the home directory or /etc/ansible/ansible.cfg, whichever it
  7. # finds first
  8. [defaults]
  9. # some basic default values...
  10. #inventory = /etc/ansible/hosts
  11. inventory = /usr/local/src/k8s/logonsvr/ansible/hosts
  12. #library = /usr/share/my_modules/
  13. #module_utils = /usr/share/my_module_utils/
  14. #remote_tmp = ~/.ansible/tmp
  15. #local_tmp = ~/.ansible/tmp
  16. #plugin_filters_cfg = /etc/ansible/plugin_filters.yml
  17. #forks = 5
  18. #poll_interval = 15
  19. #sudo_user = root
  20. #ask_sudo_pass = True
  21. #ask_pass = True
  22. #transport = smart
  23. #remote_port = 22
  24. #module_lang = C
  25. #module_set_locale = False
  26. # plays will gather facts by default, which contain information about
  27. # the remote system.
  28. #
  29. # smart - gather by default, but don't regather if already gathered
  30. # implicit - gather by default, turn off with gather_facts: False
  31. # explicit - do not gather by default, must say gather_facts: True
  32. #gathering = implicit
  33. # This only affects the gathering done by a play's gather_facts directive,
  34. # by default gathering retrieves all facts subsets
  35. # all - gather all subsets
  36. # network - gather min and network facts
  37. # hardware - gather hardware facts (longest facts to retrieve)
  38. # virtual - gather min and virtual facts
  39. # facter - import facts from facter
  40. # ohai - import facts from ohai
  41. # You can combine them using comma (ex: network,virtual)
  42. # You can negate them using ! (ex: !hardware,!facter,!ohai)
  43. # A minimal set of facts is always gathered.
  44. #gather_subset = all
  45. # some hardware related facts are collected
  46. # with a maximum timeout of 10 seconds. This
  47. # option lets you increase or decrease that
  48. # timeout to something more suitable for the
  49. # environment.
  50. # gather_timeout = 10
  51. # Ansible facts are available inside the ansible_facts.* dictionary
  52. # namespace. This setting maintains the behaviour which was the default prior
  53. # to 2.5, duplicating these variables into the main namespace, each with a
  54. # prefix of 'ansible_'.
  55. # This variable is set to True by default for backwards compatibility. It
  56. # will be changed to a default of 'False' in a future release.
  57. # ansible_facts.
  58. # inject_facts_as_vars = True
  59. # additional paths to search for roles in, colon separated
  60. #roles_path = /etc/ansible/roles
  61. # uncomment this to disable SSH key host checking
  62. host_key_checking = False
  63. # change the default callback, you can only have one 'stdout' type enabled at a time.
  64. #stdout_callback = skippy
  65. ## Ansible ships with some plugins that require whitelisting,
  66. ## this is done to avoid running all of a type by default.
  67. ## These setting lists those that you want enabled for your system.
  68. ## Custom plugins should not need this unless plugin author specifies it.
  69. # enable callback plugins, they can output to stdout but cannot be 'stdout' type.
  70. #callback_whitelist = timer, mail
  71. # Determine whether includes in tasks and handlers are "static" by
  72. # default. As of 2.0, includes are dynamic by default. Setting these
  73. # values to True will make includes behave more like they did in the
  74. # 1.x versions.
  75. #task_includes_static = False
  76. #handler_includes_static = False
  77. # Controls if a missing handler for a notification event is an error or a warning
  78. #error_on_missing_handler = True
  79. # change this for alternative sudo implementations
  80. #sudo_exe = sudo
  81. # What flags to pass to sudo
  82. # WARNING: leaving out the defaults might create unexpected behaviours
  83. #sudo_flags = -H -S -n
  84. # SSH timeout
  85. #timeout = 10
  86. # default user to use for playbooks if user is not specified
  87. # (/usr/bin/ansible will use current user as default)
  88. #remote_user = root
  89. # logging is off by default unless this path is defined
  90. # if so defined, consider logrotate
  91. #log_path = /var/log/ansible.log
  92. # default module name for /usr/bin/ansible
  93. #module_name = command
  94. # use this shell for commands executed under sudo
  95. # you may need to change this to bin/bash in rare instances
  96. # if sudo is constrained
  97. #executable = /bin/sh
  98. # if inventory variables overlap, does the higher precedence one win
  99. # or are hash values merged together? The default is 'replace' but
  100. # this can also be set to 'merge'.
  101. #hash_behaviour = replace
  102. # by default, variables from roles will be visible in the global variable
  103. # scope. To prevent this, the following option can be enabled, and only
  104. # tasks and handlers within the role will see the variables there
  105. #private_role_vars = yes
  106. # list any Jinja2 extensions to enable here:
  107. #jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n
  108. # if set, always use this private key file for authentication, same as
  109. # if passing --private-key to ansible or ansible-playbook
  110. private_key_file = /root/.ssh/id_rsa
  111. # If set, configures the path to the Vault password file as an alternative to
  112. # specifying --vault-password-file on the command line.
  113. #vault_password_file = /path/to/vault_password_file
  114. # format of string {{ ansible_managed }} available within Jinja2
  115. # templates indicates to users editing templates files will be replaced.
  116. # replacing {file}, {host} and {uid} and strftime codes with proper values.
  117. #ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
  118. # {file}, {host}, {uid}, and the timestamp can all interfere with idempotence
  119. # in some situations so the default is a static string:
  120. #ansible_managed = Ansible managed
  121. # by default, ansible-playbook will display "Skipping [host]" if it determines a task
  122. # should not be run on a host. Set this to "False" if you don't want to see these "Skipping"
  123. # messages. NOTE: the task header will still be shown regardless of whether or not the
  124. # task is skipped.
  125. #display_skipped_hosts = True
  126. # by default, if a task in a playbook does not include a name: field then
  127. # ansible-playbook will construct a header that includes the task's action but
  128. # not the task's args. This is a security feature because ansible cannot know
  129. # if the *module* considers an argument to be no_log at the time that the
  130. # header is printed. If your environment doesn't have a problem securing
  131. # stdout from ansible-playbook (or you have manually specified no_log in your
  132. # playbook on all of the tasks where you have secret information) then you can
  133. # safely set this to True to get more informative messages.
  134. #display_args_to_stdout = False
  135. # by default (as of 1.3), Ansible will raise errors when attempting to dereference
  136. # Jinja2 variables that are not set in templates or action lines. Uncomment this line
  137. # to revert the behavior to pre-1.3.
  138. #error_on_undefined_vars = False
  139. # by default (as of 1.6), Ansible may display warnings based on the configuration of the
  140. # system running ansible itself. This may include warnings about 3rd party packages or
  141. # other conditions that should be resolved if possible.
  142. # to disable these warnings, set the following value to False:
  143. #system_warnings = True
  144. # by default (as of 1.4), Ansible may display deprecation warnings for language
  145. # features that should no longer be used and will be removed in future versions.
  146. # to disable these warnings, set the following value to False:
  147. #deprecation_warnings = True
  148. # (as of 1.8), Ansible can optionally warn when usage of the shell and
  149. # command module appear to be simplified by using a default Ansible module
  150. # instead. These warnings can be silenced by adjusting the following
  151. # setting or adding warn=yes or warn=no to the end of the command line
  152. # parameter string. This will for example suggest using the git module
  153. # instead of shelling out to the git command.
  154. # command_warnings = False
  155. # set plugin path directories here, separate with colons
  156. #action_plugins = /usr/share/ansible/plugins/action
  157. #cache_plugins = /usr/share/ansible/plugins/cache
  158. #callback_plugins = /usr/share/ansible/plugins/callback
  159. #connection_plugins = /usr/share/ansible/plugins/connection
  160. #lookup_plugins = /usr/share/ansible/plugins/lookup
  161. #inventory_plugins = /usr/share/ansible/plugins/inventory
  162. #vars_plugins = /usr/share/ansible/plugins/vars
  163. #filter_plugins = /usr/share/ansible/plugins/filter
  164. #test_plugins = /usr/share/ansible/plugins/test
  165. #terminal_plugins = /usr/share/ansible/plugins/terminal
  166. #strategy_plugins = /usr/share/ansible/plugins/strategy
  167. # by default, ansible will use the 'linear' strategy but you may want to try
  168. # another one
  169. #strategy = free
  170. # by default callbacks are not loaded for /bin/ansible, enable this if you
  171. # want, for example, a notification or logging callback to also apply to
  172. # /bin/ansible runs
  173. #bin_ansible_callbacks = False
  174. # don't like cows? that's unfortunate.
  175. # set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
  176. #nocows = 1
  177. # set which cowsay stencil you'd like to use by default. When set to 'random',
  178. # a random stencil will be selected for each task. The selection will be filtered
  179. # against the `cow_whitelist` option below.
  180. #cow_selection = default
  181. #cow_selection = random
  182. # when using the 'random' option for cowsay, stencils will be restricted to this list.
  183. # it should be formatted as a comma-separated list with no spaces between names.
  184. # NOTE: line continuations here are for formatting purposes only, as the INI parser
  185. # in python does not support them.
  186. #cow_whitelist=bud-frogs,bunny,cheese,daemon,default,dragon,elephant-in-snake,elephant,eyes,\
  187. # hellokitty,kitty,luke-koala,meow,milk,moofasa,moose,ren,sheep,small,stegosaurus,\
  188. # stimpy,supermilker,three-eyes,turkey,turtle,tux,udder,vader-koala,vader,www
  189. # don't like colors either?
  190. # set to 1 if you don't want colors, or export ANSIBLE_NOCOLOR=1
  191. #nocolor = 1
  192. # if set to a persistent type (not 'memory', for example 'redis') fact values
  193. # from previous runs in Ansible will be stored. This may be useful when
  194. # wanting to use, for example, IP information from one group of servers
  195. # without having to talk to them in the same playbook run to get their
  196. # current IP information.
  197. #fact_caching = memory
  198. #This option tells Ansible where to cache facts. The value is plugin dependent.
  199. #For the jsonfile plugin, it should be a path to a local directory.
  200. #For the redis plugin, the value is a host:port:database triplet: fact_caching_connection = localhost:6379:0
  201. #fact_caching_connection=/tmp
  202. # retry files
  203. # When a playbook fails by default a .retry file will be created in ~/
  204. # You can disable this feature by setting retry_files_enabled to False
  205. # and you can change the location of the files by setting retry_files_save_path
  206. #retry_files_enabled = False
  207. #retry_files_save_path = ~/.ansible-retry
  208. # squash actions
  209. # Ansible can optimise actions that call modules with list parameters
  210. # when looping. Instead of calling the module once per with_ item, the
  211. # module is called once with all items at once. Currently this only works
  212. # under limited circumstances, and only with parameters named 'name'.
  213. #squash_actions = apk,apt,dnf,homebrew,pacman,pkgng,yum,zypper
  214. # prevents logging of task data, off by default
  215. #no_log = False
  216. # prevents logging of tasks, but only on the targets, data is still logged on the master/controller
  217. #no_target_syslog = False
  218. # controls whether Ansible will raise an error or warning if a task has no
  219. # choice but to create world readable temporary files to execute a module on
  220. # the remote machine. This option is False by default for security. Users may
  221. # turn this on to have behaviour more like Ansible prior to 2.1.x. See
  222. # https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user
  223. # for more secure ways to fix this than enabling this option.
  224. #allow_world_readable_tmpfiles = False
  225. # controls the compression level of variables sent to
  226. # worker processes. At the default of 0, no compression
  227. # is used. This value must be an integer from 0 to 9.
  228. #var_compression_level = 9
  229. # controls what compression method is used for new-style ansible modules when
  230. # they are sent to the remote system. The compression types depend on having
  231. # support compiled into both the controller's python and the client's python.
  232. # The names should match with the python Zipfile compression types:
  233. # * ZIP_STORED (no compression. available everywhere)
  234. # * ZIP_DEFLATED (uses zlib, the default)
  235. # These values may be set per host via the ansible_module_compression inventory
  236. # variable
  237. #module_compression = 'ZIP_DEFLATED'
  238. # This controls the cutoff point (in bytes) on --diff for files
  239. # set to 0 for unlimited (RAM may suffer!).
  240. #max_diff_size = 1048576
  241. # This controls how ansible handles multiple --tags and --skip-tags arguments
  242. # on the CLI. If this is True then multiple arguments are merged together. If
  243. # it is False, then the last specified argument is used and the others are ignored.
  244. # This option will be removed in 2.8.
  245. #merge_multiple_cli_flags = True
  246. # Controls showing custom stats at the end, off by default
  247. #show_custom_stats = True
  248. # Controls which files to ignore when using a directory as inventory with
  249. # possibly multiple sources (both static and dynamic)
  250. #inventory_ignore_extensions = ~, .orig, .bak, .ini, .cfg, .retry, .pyc, .pyo
  251. # This family of modules use an alternative execution path optimized for network appliances
  252. # only update this setting if you know how this works, otherwise it can break module execution
  253. #network_group_modules=eos, nxos, ios, iosxr, junos, vyos
  254. # When enabled, this option allows lookups (via variables like {{lookup('foo')}} or when used as
  255. # a loop with `with_foo`) to return data that is not marked "unsafe". This means the data may contain
  256. # jinja2 templating language which will be run through the templating engine.
  257. # ENABLING THIS COULD BE A SECURITY RISK
  258. #allow_unsafe_lookups = False
  259. # set default errors for all plays
  260. #any_errors_fatal = False
  261. [inventory]
  262. # enable inventory plugins, default: 'host_list', 'script', 'yaml', 'ini', 'auto'
  263. #enable_plugins = host_list, virtualbox, yaml, constructed
  264. # ignore these extensions when parsing a directory as inventory source
  265. #ignore_extensions = .pyc, .pyo, .swp, .bak, ~, .rpm, .md, .txt, ~, .orig, .ini, .cfg, .retry
  266. # ignore files matching these patterns when parsing a directory as inventory source
  267. #ignore_patterns=
  268. # If 'true' unparsed inventory sources become fatal errors, they are warnings otherwise.
  269. #unparsed_is_failed=False
  270. [privilege_escalation]
  271. #become=True
  272. #become_method=sudo
  273. #become_user=root
  274. #become_ask_pass=False
  275. [paramiko_connection]
  276. # uncomment this line to cause the paramiko connection plugin to not record new host
  277. # keys encountered. Increases performance on new host additions. Setting works independently of the
  278. # host key checking setting above.
  279. #record_host_keys=False
  280. # by default, Ansible requests a pseudo-terminal for commands executed under sudo. Uncomment this
  281. # line to disable this behaviour.
  282. #pty=False
  283. # paramiko will default to looking for SSH keys initially when trying to
  284. # authenticate to remote devices. This is a problem for some network devices
  285. # that close the connection after a key failure. Uncomment this line to
  286. # disable the Paramiko look for keys function
  287. #look_for_keys = False
  288. # When using persistent connections with Paramiko, the connection runs in a
  289. # background process. If the host doesn't already have a valid SSH key, by
  290. # default Ansible will prompt to add the host key. This will cause connections
  291. # running in background processes to fail. Uncomment this line to have
  292. # Paramiko automatically add host keys.
  293. #host_key_auto_add = True
  294. [ssh_connection]
  295. # ssh arguments to use
  296. # Leaving off ControlPersist will result in poor performance, so use
  297. # paramiko on older platforms rather than removing it, -C controls compression use
  298. #ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
  299. # The base directory for the ControlPath sockets.
  300. # This is the "%(directory)s" in the control_path option
  301. #
  302. # Example:
  303. # control_path_dir = /tmp/.ansible/cp
  304. #control_path_dir = ~/.ansible/cp
  305. # The path to use for the ControlPath sockets. This defaults to a hashed string of the hostname,
  306. # port and username (empty string in the config). The hash mitigates a common problem users
  307. # found with long hostames and the conventional %(directory)s/ansible-ssh-%%h-%%p-%%r format.
  308. # In those cases, a "too long for Unix domain socket" ssh error would occur.
  309. #
  310. # Example:
  311. # control_path = %(directory)s/%%h-%%r
  312. #control_path =
  313. # Enabling pipelining reduces the number of SSH operations required to
  314. # execute a module on the remote server. This can result in a significant
  315. # performance improvement when enabled, however when using "sudo:" you must
  316. # first disable 'requiretty' in /etc/sudoers
  317. #
  318. # By default, this option is disabled to preserve compatibility with
  319. # sudoers configurations that have requiretty (the default on many distros).
  320. #
  321. #pipelining = False
  322. # Control the mechanism for transferring files (old)
  323. # * smart = try sftp and then try scp [default]
  324. # * True = use scp only
  325. # * False = use sftp only
  326. #scp_if_ssh = smart
  327. # Control the mechanism for transferring files (new)
  328. # If set, this will override the scp_if_ssh option
  329. # * sftp = use sftp to transfer files
  330. # * scp = use scp to transfer files
  331. # * piped = use 'dd' over SSH to transfer files
  332. # * smart = try sftp, scp, and piped, in that order [default]
  333. #transfer_method = smart
  334. # if False, sftp will not use batch mode to transfer files. This may cause some
  335. # types of file transfer failures impossible to catch however, and should
  336. # only be disabled if your sftp version has problems with batch mode
  337. #sftp_batch_mode = False
  338. # The -tt argument is passed to ssh when pipelining is not enabled because sudo
  339. # requires a tty by default.
  340. #use_tty = True
  341. # Number of times to retry an SSH connection to a host, in case of UNREACHABLE.
  342. # For each retry attempt, there is an exponential backoff,
  343. # so after the first attempt there is 1s wait, then 2s, 4s etc. up to 30s (max).
  344. #retries = 3
  345. [persistent_connection]
  346. # Configures the persistent connection timeout value in seconds. This value is
  347. # how long the persistent connection will remain idle before it is destroyed.
  348. # If the connection doesn't receive a request before the timeout value
  349. # expires, the connection is shutdown. The default value is 30 seconds.
  350. #connect_timeout = 30
  351. # Configures the persistent connection retry timeout. This value configures the
  352. # the retry timeout that ansible-connection will wait to connect
  353. # to the local domain socket. This value must be larger than the
  354. # ssh timeout (timeout) and less than persistent connection idle timeout (connect_timeout).
  355. # The default value is 15 seconds.
  356. #connect_retry_timeout = 15
  357. # The command timeout value defines the amount of time to wait for a command
  358. # or RPC call before timing out. The value for the command timeout must
  359. # be less than the value of the persistent connection idle timeout (connect_timeout)
  360. # The default value is 10 second.
  361. #command_timeout = 10
  362. [accelerate]
  363. #accelerate_port = 5099
  364. #accelerate_timeout = 30
  365. #accelerate_connect_timeout = 5.0
  366. # The daemon timeout is measured in minutes. This time is measured
  367. # from the last activity to the accelerate daemon.
  368. #accelerate_daemon_timeout = 30
  369. # If set to yes, accelerate_multi_key will allow multiple
  370. # private keys to be uploaded to it, though each user must
  371. # have access to the system via SSH to add a new key. The default
  372. # is "no".
  373. #accelerate_multi_key = yes
  374. [selinux]
  375. # file systems that require special treatment when dealing with security context
  376. # the default behaviour that copies the existing context or uses the user default
  377. # needs to be changed to use the file system dependent context.
  378. #special_context_filesystems=nfs,vboxsf,fuse,ramfs,9p
  379. # Set this to yes to allow libvirt_lxc connections to work without SELinux.
  380. #libvirt_lxc_noseclabel = yes
  381. [colors]
  382. #highlight = white
  383. #verbose = blue
  384. #warn = bright purple
  385. error = red
  386. #debug = dark gray
  387. #deprecate = purple
  388. #skip = cyan
  389. #unreachable = red
  390. ok = green
  391. changed = yellow
  392. #diff_add = green
  393. #diff_remove = red
  394. #diff_lines = cyan
  395. [diff]
  396. # Always print diff when running ( same as always running with -D/--diff )
  397. # always = no
  398. # Set how many context lines to show in diff
  399. # context = 3