Make ANSIBLE_NOCOWS configurable

nocows = 1 in ansible.cfg
	or old environment variable ANSIBLE_NOCOWS=1
add to ansible.cfg example
pull/2755/head
Jan-Piet Mens 11 years ago
parent f36e85efbb
commit dfd885a012

@ -125,6 +125,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

@ -23,9 +23,10 @@ import subprocess
import random
import fnmatch
from ansible.color import stringc
import ansible.constants as C
cowsay = None
if os.getenv("ANSIBLE_NOCOWS") is not None:
if C.ANSIBLE_NOCOWS is not None:
cowsay = None
elif os.path.exists("/usr/bin/cowsay"):
cowsay = "/usr/bin/cowsay"

@ -103,6 +103,7 @@ DEFAULT_CONNECTION_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'conn
DEFAULT_LOOKUP_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'lookup_plugins', 'ANSIBLE_LOOKUP_PLUGINS', '/usr/share/ansible_plugins/lookup_plugins'))
DEFAULT_VARS_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'vars_plugins', 'ANSIBLE_VARS_PLUGINS', '/usr/share/ansible_plugins/vars_plugins'))
DEFAULT_FILTER_PLUGIN_PATH = shell_expand_path(get_config(p, DEFAULTS, 'filter_plugins', 'ANSIBLE_FILTER_PLUGINS', '/usr/share/ansible_plugins/filter_plugins'))
ANSIBLE_NOCOWS = get_config(p, DEFAULTS, 'nocows', 'ANSIBLE_NOCOWS', None)
# non-configurable things
DEFAULT_SUDO_PASS = None

Loading…
Cancel
Save