diff --git a/examples/ansible.cfg b/examples/ansible.cfg index 4c7cbb6548..c7fefb4fa7 100644 --- a/examples/ansible.cfg +++ b/examples/ansible.cfg @@ -131,6 +131,10 @@ lookup_plugins = /usr/share/ansible_plugins/lookup_plugins vars_plugins = /usr/share/ansible_plugins/vars_plugins filter_plugins = /usr/share/ansible_plugins/filter_plugins +# set to 1 if you don't want cowsay support. Alternatively, set ANSIBLE_NOCOWS=1 +# in your environment +# nocows = 1 + [paramiko_connection] # nothing to configure yet diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index a483517bb4..487da7666f 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -34,6 +34,8 @@ if constants.DEFAULT_LOG_PATH != '': callback_plugins = [x for x in utils.plugins.callback_loader.all()] def get_cowsay_info(): + if constants.ANSIBLE_NOCOWS is not None: + return (None, None) cowsay = None if os.getenv("ANSIBLE_NOCOWS") is not None: cowsay = None diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 486a63cdf0..499f6e2e7c 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -105,8 +105,9 @@ DEFAULT_VARS_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'vars DEFAULT_FILTER_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '/usr/share/ansible_plugins/filter_plugins')) DEFAULT_LOG_PATH = shell_expand_path(get_config(p, DEFAULTS, 'log_path', 'ANSIBLE_LOG_PATH', '')) -ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None) -ZEROMQ_PORT = int(get_config(p, 'fireball', 'zeromq_port', 'ANSIBLE_ZEROMQ_PORT', 5099)) +ANSIBLE_NOCOWS = get_config(p, DEFAULTS, 'nocows', 'ANSIBLE_NOCOWS', None) +ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None) +ZEROMQ_PORT = int(get_config(p, 'fireball', 'zeromq_port', 'ANSIBLE_ZEROMQ_PORT', 5099)) # non-configurable things DEFAULT_SUDO_PASS = None