mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
637983cf31
commit c36b66dc952dfff91043ecbca56cf3f1f8f00703 Merge:240d7bf
f4cf934 Author: Michael DeHaan <michael@ansibleworks.com> Date: Tue Jun 18 13:04:51 2013 -0400 Merge branch 'unevaluated-vars' of git://github.com/lorin/ansible into lorin_undefined Conflicts: lib/ansible/runner/__init__.py commit f4cf93436767f73b62a16067ab5e628830045896 Merge: 253144007a1365
Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Thu Jun 6 11:07:41 2013 -0400 Merge branch 'devel' into unevaluated-vars commit 253144045cbafd7d72836f1017c62ac4ba623186 Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Thu Jun 6 11:06:37 2013 -0400 Fail template from file on undefined vars If config option is set, raise an exception if templating from a file and a variable is undefined. commit aecb71d8b75257f0f3e11a9b176fc3737aecef8d Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Wed Jun 5 17:12:12 2013 -0400 Add fail_on_undefined flag Add a fail_on_undefined flag to the template and template_from_string methods. If this flag is true, then re-raise the ninja2.excpetions.UndefinedError instead of swallowing it. commit cbb1808f0585f01536240aee05a1bfd06c4b4647 Merge: d4bbf4941425fb
Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Wed Jun 5 16:14:12 2013 -0400 Merge branch 'devel' into unevaluated-vars commit d4bbf492b0b63c789d66ab60d0ec634d100fca82 Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Mon Jun 3 19:46:13 2013 -0400 template: Raise UndefinedError exception In template_from_string, raise an undefined error if it occurs. Have the caller catch it and throw an AnsibleUndefinedVariable commit c94780280515f1f3756fdc429b2b1e87b365e9b7 Merge: 8d919d6be33bcf
Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Mon Jun 3 10:09:43 2013 -0400 Merge branch 'devel' into unevaluated-vars commit 8d919d6c97b28a42f47ca7248c542695baf6175f Merge: 0f68ad8b8630d2
Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Thu May 30 16:27:48 2013 -0400 Merge branch 'devel' into unevaluated-vars commit 0f68ad8193ac17488e339a258f8c63fdae399c26 Author: Lorin Hochstein <lorin@nimbisservices.com> Date: Thu May 30 14:32:03 2013 -0400 Optionally fail task on undefined variables This patch introduces a new configuration option called error_on_undefined_vars, which defaults to false. If this option is set to true, then a task which has unevaluated variables in its arguments will fail instead of running. Output looks like this: TASK: [set rabbitmq password] ************************************************* fatal: [10.20.0.7] => Undefined variables: rabbitmq_user, rabbitmq_password
99 lines
3.2 KiB
INI
99 lines
3.2 KiB
INI
# config file for ansible -- http://ansibleworks.com/
|
|
# ==================================================
|
|
|
|
# nearly all parameters can be overridden in ansible-playbook
|
|
# or with command line flags. ansible will read ~/.ansible.cfg,
|
|
# ansible.cfg in the current working directory or
|
|
# /etc/ansible/ansible.cfg, whichever it finds first
|
|
|
|
[defaults]
|
|
|
|
# some basic default values...
|
|
|
|
hostfile = /etc/ansible/hosts
|
|
library = /usr/share/ansible
|
|
remote_tmp = $HOME/.ansible/tmp
|
|
pattern = *
|
|
forks = 5
|
|
poll_interval = 15
|
|
sudo_user = root
|
|
#ask_sudo_pass = True
|
|
#ask_pass = True
|
|
transport = paramiko
|
|
remote_port = 22
|
|
|
|
# change this for alternative sudo implementations
|
|
sudo_exe = sudo
|
|
|
|
# what flags to pass to sudo
|
|
# sudo_flags=-H
|
|
|
|
# SSH timeout
|
|
timeout = 10
|
|
|
|
# default user to use for playbooks if user is not specified
|
|
# (/usr/bin/ansible will use current user as default)
|
|
remote_user=root
|
|
|
|
# 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 = command
|
|
|
|
# use this shell for commands executed under sudo
|
|
# you may need to change this to bin/bash in rare instances
|
|
# if sudo is constrained
|
|
# executable = /bin/sh
|
|
|
|
# if inventory variables overlap, does the higher precedence one win
|
|
# or are hash values merged together? The default is 'replace' but
|
|
# this can also be set to 'merge'.
|
|
# hash_behaviour=replace
|
|
|
|
# How to handle variable replacement - as of 1.2, Jinja2 variable syntax is
|
|
# preferred, but we still support the old $variable replacement too.
|
|
# Turn off ${old_style} variables here if you like.
|
|
# legacy_playbook_variables=yes
|
|
|
|
# list any Jinja2 extensions to enable here:
|
|
# jinja2_extensions=jinja2.ext.do,jinja2.ext.i18n
|
|
|
|
# if set, always use this private key file for authentication, same as
|
|
# if passing --private-key to ansible or ansible-playbook
|
|
#private_key_file=/path/to/file
|
|
|
|
# format of string {{ ansible_managed }} available within Jinja2
|
|
# templates indicates to users editing templates files will be replaced.
|
|
, replacing {file}, {host} and {uid} and strftime codes with proper values.
|
|
ansible_managed = Ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}
|
|
|
|
# set plugin path directories here, seperate with colons
|
|
action_plugins = /usr/share/ansible_plugins/action_plugins
|
|
callback_plugins = /usr/share/ansible_plugins/callback_plugins
|
|
connection_plugins = /usr/share/ansible_plugins/connection_plugins
|
|
lookup_plugins = /usr/share/ansible_plugins/lookup_plugins
|
|
vars_plugins = /usr/share/ansible_plugins/vars_plugins
|
|
filter_plugins = /usr/share/ansible_plugins/filter_plugins
|
|
|
|
# don't like cows? that's unfortunate.
|
|
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
|
|
# nocows = 1
|
|
|
|
[paramiko_connection]
|
|
|
|
# nothing configurable yet
|
|
|
|
[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 -o ControlPath=/tmp/ansible-ssh-%h-%p-%r
|
|
|
|
# if True, make ansible use scp if the connection type is ssh
|
|
# (default is sftp)
|
|
#scp_if_ssh=True
|
|
|
|
|