Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
2064d260
Commit
2064d260
authored
Sep 10, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation about bin_ansible_callbacks setting. Standardization and cleanup.
parent
65c6e7fc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
docsite/rst/intro_configuration.rst
+17
-20
examples/ansible.cfg
+6
-0
lib/ansible/constants.py
+1
-1
No files found.
docsite/rst/intro_configuration.rst
View file @
2064d260
...
...
@@ -99,7 +99,7 @@ ask_pass
This controls whether an Ansible playbook should prompt for a password by default. The default behavior is no::
#
ask_pass=True
ask_pass=True
If using SSH keys for authentication, it's probably not needed to change this setting.
...
...
@@ -111,10 +111,21 @@ ask_sudo_pass
Similar to ask_pass, this controls whether an Ansible playbook should prompt for a sudo password by default when
sudoing. The default behavior is also no::
#
ask_sudo_pass=True
ask_sudo_pass=True
Users on platforms where sudo passwords are enabled should consider changing this setting.
.. _bin_ansible_callbacks:
bin_ansible_callbacks
=====================
Controls whether callback plugins are loaded when running /usr/bin/ansible. This may be used to log activity from
the command line, send notifications, and so on. Callback plugins are always loaded for /usr/bin/ansible-playbook
if present and cannot be disabled::
bin_ansible_callbacks=False
.. _callback_plugins:
callback_plugins
...
...
@@ -183,7 +194,7 @@ display_skipped_hosts
If set to `False`, ansible will not display any status for a task that is skipped. The default behavior is to display skipped tasks::
#
display_skipped_hosts=True
display_skipped_hosts=True
Note that Ansible will always show the task header for any task, regardless of whether or not the task is skipped.
...
...
@@ -195,7 +206,7 @@ error_on_undefined_vars
On by default since Ansible 1.3, this causes ansible to fail steps that reference variable names that are likely
typoed::
#
error_on_undefined_vars=True
error_on_undefined_vars=True
If set to False, any '{{ template_expression }}' that contains undefined variables will be rendered in a template
or ansible action line exactly as written.
...
...
@@ -208,7 +219,7 @@ executable
This indicates the command to use to spawn a shell under a sudo environment. Users may need to change this in
rare instances to /bin/bash in rare instances when sudo is constrained, but in most cases it may be left as is::
#
executable = /bin/bash
executable = /bin/bash
.. _filter_plugins:
...
...
@@ -256,7 +267,7 @@ Some users prefer that variables that are hashes (aka 'dictionaries' in Python t
arrays. We generally recommend not using this setting unless you think you have an absolute need for it, and playbooks in the
official examples repos do not use this setting::
#
hash_behaviour=replace
hash_behaviour=replace
The valid values are either 'replace' (the default) or 'merge'.
...
...
@@ -291,20 +302,6 @@ This is a developer-specific feature that allows enabling additional Jinja2 exte
If you do not know what these do, you probably don't need to change this setting :)
.. _legacy_playbook_variables:
legacy_playbook_variables
=========================
Ansible prefers to use Jinja2 syntax '{{ like_this }}' to indicate a variable should be substituted in a particular string. However,
older versions of playbooks used a more Perl-style syntax. This syntax was undesirable as it frequently conflicted with bash and
was hard to explain to new users when referencing complicated variable hierarchies, so we have standardized on the '{{ jinja2 }}' way.
To ensure a string like '$foo' is not inadvertently replaced in a Perl or Bash script template, the old form of templating (which is
still enabled as of Ansible 1.4) can be disabled like so ::
legacy_playbook_variables = no
.. _library:
library
...
...
examples/ansible.cfg
View file @
2064d260
...
...
@@ -119,6 +119,12 @@ lookup_plugins = /usr/share/ansible_plugins/lookup_plugins
vars_plugins = /usr/share/ansible_plugins/vars_plugins
filter_plugins = /usr/share/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
# don't like cows? that's unfortunate.
# set to 1 if you don't want cowsay support or export ANSIBLE_NOCOWS=1
#nocows = 1
...
...
lib/ansible/constants.py
View file @
2064d260
...
...
@@ -175,7 +175,7 @@ SYSTEM_WARNINGS = get_config(p, DEFAULTS, 'system_warnings', 'ANS
DEPRECATION_WARNINGS
=
get_config
(
p
,
DEFAULTS
,
'deprecation_warnings'
,
'ANSIBLE_DEPRECATION_WARNINGS'
,
True
,
boolean
=
True
)
DEFAULT_CALLABLE_WHITELIST
=
get_config
(
p
,
DEFAULTS
,
'callable_whitelist'
,
'ANSIBLE_CALLABLE_WHITELIST'
,
[],
islist
=
True
)
COMMAND_WARNINGS
=
get_config
(
p
,
DEFAULTS
,
'command_warnings'
,
'ANSIBLE_COMMAND_WARNINGS'
,
False
,
boolean
=
True
)
DEFAULT_LOAD_CALLBACK_PLUGINS
=
get_config
(
p
,
DEFAULTS
,
'
load_callback_plugin
s'
,
'ANSIBLE_LOAD_CALLBACK_PLUGINS'
,
False
,
boolean
=
True
)
DEFAULT_LOAD_CALLBACK_PLUGINS
=
get_config
(
p
,
DEFAULTS
,
'
bin_ansible_callback
s'
,
'ANSIBLE_LOAD_CALLBACK_PLUGINS'
,
False
,
boolean
=
True
)
# CONNECTION RELATED
ANSIBLE_SSH_ARGS
=
get_config
(
p
,
'ssh_connection'
,
'ssh_args'
,
'ANSIBLE_SSH_ARGS'
,
None
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment