mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make ANSIBLE_NOCOWS configurable
nocows = 1 in ansible.cfg or old environment variable ANSIBLE_NOCOWS=1 add to ansible.cfg example
This commit is contained in:
parent
f36e85efbb
commit
dfd885a012
3 changed files with 7 additions and 1 deletions
|
@ -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…
Reference in a new issue