From fe696e47200ce068ebcc64c938e4fa4f0d1cb885 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 16 Mar 2014 17:08:26 -0400 Subject: [PATCH] Merge commit. --- lib/ansible/color.py | 3 +-- lib/ansible/constants.py | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/ansible/color.py b/lib/ansible/color.py index e5f6f4d2ba..069684f16c 100644 --- a/lib/ansible/color.py +++ b/lib/ansible/color.py @@ -15,7 +15,6 @@ # You should have received a copy of the GNU General Public License # along with Ansible. If not, see . -import os import sys import constants @@ -37,7 +36,7 @@ else: # curses returns an error (e.g. could not find terminal) ANSIBLE_COLOR=False -if os.getenv("ANSIBLE_FORCE_COLOR") is not None: +if constants.ANSIBLE_FORCE_COLOR: ANSIBLE_COLOR=True # --- begin "pretty" diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 9d3f37c180..f9cd208c4a 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -143,10 +143,7 @@ DEFAULT_VARS_PLUGIN_PATH = get_config(p, DEFAULTS, 'vars_plugins', ' DEFAULT_FILTER_PLUGIN_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', '')) -# URL Arguments for generic module urllib2 use -DEFAULT_HTTP_USER_AGENT = get_config(p, DEFAULTS, 'http_user_agent', 'ANSIBLE_HTTP_USER_AGENT', 'ansible-agent') -DEFAULT_CA_FILE_PATH = shell_expand_path(get_config(p, DEFAULTS, 'ca_file_path', 'ANSIBLE_CA_FILE_PATH', '')) - +ANSIBLE_FORCE_COLOR = get_config(p, DEFAULTS, 'force_color', 'ANSIBLE_FORCE_COLOR', None, boolean=True) ANSIBLE_NOCOLOR = get_config(p, DEFAULTS, 'nocolor', 'ANSIBLE_NOCOLOR', None, boolean=True) ANSIBLE_NOCOWS = get_config(p, DEFAULTS, 'nocows', 'ANSIBLE_NOCOWS', None, boolean=True) DISPLAY_SKIPPED_HOSTS = get_config(p, DEFAULTS, 'display_skipped_hosts', 'DISPLAY_SKIPPED_HOSTS', True, boolean=True)