mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Add a nocolor setting to ansible.cfg
This commit is contained in:
parent
067cc9274d
commit
0c96d8af6e
3 changed files with 7 additions and 1 deletions
|
@ -17,9 +17,10 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import constants
|
||||
|
||||
ANSIBLE_COLOR=True
|
||||
if os.getenv("ANSIBLE_NOCOLOR") is not None:
|
||||
if constants.ANSIBLE_NOCOLOR is not None:
|
||||
ANSIBLE_COLOR=False
|
||||
elif not hasattr(sys.stdout, 'isatty') or not sys.stdout.isatty():
|
||||
ANSIBLE_COLOR=False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue