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:
Jan-Piet Mens 2013-04-23 16:40:11 +02:00
commit dfd885a012
3 changed files with 7 additions and 1 deletions

View file

@ -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"