From c66f0e246d1a82b55943ceac3c89df8192f184c2 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Fri, 31 Oct 2025 18:39:07 +0100 Subject: [PATCH 01/12] Fix ansible-doc redirect with ansi escapes Problem: When ansible-doc is redirected to a file ansi escape sequences are written. This can cause issues when interfacing with other tools and is usually not desired. Solution: Import everything from ansible.utils.color and check ANSIBLE_COLOR as well. Signed-off-by: Bjoern Foersterling --- lib/ansible/cli/doc.py | 4 +-- test/integration/targets/ansible-doc/test.yml | 35 ++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 870d7df0e7c..8cac7139eca 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -40,7 +40,7 @@ from ansible.plugins.list import _list_plugins_with_info, _PluginDocMetadata from ansible.plugins.loader import action_loader, fragment_loader from ansible.utils.collection_loader import AnsibleCollectionConfig, AnsibleCollectionRef from ansible.utils.collection_loader._collection_finder import _get_collection_name_from_path -from ansible.utils.color import stringc +from ansible.utils.color import * from ansible.utils.display import Display from ansible.utils.plugin_docs import get_plugin_docs, get_docstring, get_versioned_doclink from ansible.template import trust_as_template @@ -423,7 +423,7 @@ def _format(string, *args): if style not in ref_style and style.upper() not in STYLE and style not in C.COLOR_CODES: raise KeyError("Invalid format value supplied: %s" % style) - if C.ANSIBLE_NOCOLOR: + if C.ANSIBLE_NOCOLOR or not ANSIBLE_COLOR: # ignore most styles, but some already had 'identifier strings' if style in NOCOLOR: string = NOCOLOR[style] % string diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index fbf36ae2593..cac6b948a40 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -1,5 +1,5 @@ - hosts: localhost - gather_facts: no + gather_facts: true environment: ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" ANSIBLE_NOCOLOR: 1 @@ -10,6 +10,39 @@ actual_output_clean: '{{ actual_output.splitlines()[1:] }}' expected_output_clean: '{{ expected_output.splitlines()[1:] }}' tasks: + - name: create temporary file + ansible.builtin.tempfile: + state: file + register: temp_file + + - name: redirect stdout and stderr to file + ansible.builtin.shell: | + ansible-doc test_docs &> {{ temp_file.path }} + args: + executable: "{{ ansible_user_shell }}" + environment: + ANSIBLE_DEPRECATION_WARNINGS: 0 + ANSIBLE_DEVEL_WARNING: 0 + ANSIBLE_DOC_FRAGMENT_PLUGINS: "{{ playbook_dir }}/doc_fragments" + ANSIBLE_FORCE_COLOR: 0 + ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" + ANSIBLE_NOCOLOR: 0 + + - name: assert that file does not contain ansi escape sequences + assert: + that: + - actual_output[0][:20] == "> MODULE test_docs (" + fail_msg: | + actual_output[0][:20]: {{ actual_output[0][:20] }} + actual_output: {{ actual_output }} + vars: + actual_output: "{{ lookup('file', temp_file.path).splitlines() }}" + + - name: remove tempfile + ansible.builtin.file: + path: "{{ temp_file.path }}" + state: absent + - name: module with missing description return docs command: ansible-doc test_docs_missing_description register: result From 4b48a7302508e3e672dc7a6807e7315dc56f753c Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Fri, 31 Oct 2025 19:24:41 +0100 Subject: [PATCH 02/12] appease pylint Signed-off-by: Bjoern Foersterling --- lib/ansible/cli/doc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 8cac7139eca..dcd28755264 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -40,7 +40,7 @@ from ansible.plugins.list import _list_plugins_with_info, _PluginDocMetadata from ansible.plugins.loader import action_loader, fragment_loader from ansible.utils.collection_loader import AnsibleCollectionConfig, AnsibleCollectionRef from ansible.utils.collection_loader._collection_finder import _get_collection_name_from_path -from ansible.utils.color import * +from ansible.utils.color import ANSIBLE_COLOR,stringc from ansible.utils.display import Display from ansible.utils.plugin_docs import get_plugin_docs, get_docstring, get_versioned_doclink from ansible.template import trust_as_template From 161483c884099ff5f9612e36212d1ced0bb33324 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Fri, 31 Oct 2025 20:18:20 +0100 Subject: [PATCH 03/12] use fully qualified ansible facts name and removed redundant env vars Signed-off-by: Bjoern Foersterling --- test/integration/targets/ansible-doc/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index cac6b948a40..9530428e40f 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -19,13 +19,11 @@ ansible.builtin.shell: | ansible-doc test_docs &> {{ temp_file.path }} args: - executable: "{{ ansible_user_shell }}" + executable: "{{ ansible_facts.user_shell }}" environment: ANSIBLE_DEPRECATION_WARNINGS: 0 ANSIBLE_DEVEL_WARNING: 0 - ANSIBLE_DOC_FRAGMENT_PLUGINS: "{{ playbook_dir }}/doc_fragments" ANSIBLE_FORCE_COLOR: 0 - ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" ANSIBLE_NOCOLOR: 0 - name: assert that file does not contain ansi escape sequences From 3f1eecdde4a8b1f96ebe00154d573bcfa4ea6f60 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Fri, 31 Oct 2025 22:12:12 +0100 Subject: [PATCH 04/12] add space after comma, use posix shell to remove shell executable Signed-off-by: Bjoern Foersterling --- lib/ansible/cli/doc.py | 2 +- test/integration/targets/ansible-doc/test.yml | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index dcd28755264..59697766955 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -40,7 +40,7 @@ from ansible.plugins.list import _list_plugins_with_info, _PluginDocMetadata from ansible.plugins.loader import action_loader, fragment_loader from ansible.utils.collection_loader import AnsibleCollectionConfig, AnsibleCollectionRef from ansible.utils.collection_loader._collection_finder import _get_collection_name_from_path -from ansible.utils.color import ANSIBLE_COLOR,stringc +from ansible.utils.color import ANSIBLE_COLOR, stringc from ansible.utils.display import Display from ansible.utils.plugin_docs import get_plugin_docs, get_docstring, get_versioned_doclink from ansible.template import trust_as_template diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index 9530428e40f..af2e7a34661 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -17,9 +17,7 @@ - name: redirect stdout and stderr to file ansible.builtin.shell: | - ansible-doc test_docs &> {{ temp_file.path }} - args: - executable: "{{ ansible_facts.user_shell }}" + ansible-doc test_docs > {{ temp_file.path }} 2>&1 environment: ANSIBLE_DEPRECATION_WARNINGS: 0 ANSIBLE_DEVEL_WARNING: 0 From 6bf1a0a8babccc3abb6087beef5ec65f452a0617 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Fri, 31 Oct 2025 22:49:17 +0100 Subject: [PATCH 05/12] gathering facts is not necessary anymore --- test/integration/targets/ansible-doc/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index af2e7a34661..408f1b4e385 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -1,5 +1,5 @@ - hosts: localhost - gather_facts: true + gather_facts: false environment: ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" ANSIBLE_NOCOLOR: 1 From 7fd21995747bc7396dc38c5fe03640a6da28ecd7 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Sat, 1 Nov 2025 09:49:47 +0100 Subject: [PATCH 06/12] only check ANSIBLE_COLOR, pytest is successful, ansible-test is not Signed-off-by: Bjoern Foersterling --- lib/ansible/cli/doc.py | 2 +- test/units/requirements.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 59697766955..cd6f524cd54 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -423,7 +423,7 @@ def _format(string, *args): if style not in ref_style and style.upper() not in STYLE and style not in C.COLOR_CODES: raise KeyError("Invalid format value supplied: %s" % style) - if C.ANSIBLE_NOCOLOR or not ANSIBLE_COLOR: + if not ANSIBLE_COLOR: # ignore most styles, but some already had 'identifier strings' if style in NOCOLOR: string = NOCOLOR[style] % string diff --git a/test/units/requirements.txt b/test/units/requirements.txt index 43bd7bda7e7..78de23e9227 100644 --- a/test/units/requirements.txt +++ b/test/units/requirements.txt @@ -1,5 +1,7 @@ bcrypt < 5 ; python_version >= '3.12' # controller only, bcrypt 5+ not compatible with passlib passlib ; python_version >= '3.12' # controller only pexpect ; python_version >= '3.12' # controller only +pytest +pytest-mock pywinrm ; python_version >= '3.12' # controller only typing_extensions; python_version < '3.11' # some unit tests need Annotated and get_type_hints(include_extras=True) From 53a88033659b6e3e055447c6cc870265ce8ac5df Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Mon, 3 Nov 2025 18:22:54 +0100 Subject: [PATCH 07/12] need to disable colors for unit tests in ansible-test to not set ANSIBLE_FORCE_COLOR Signed-off-by: Bjoern Foersterling --- test/integration/targets/ansible-doc/runme.sh | 1 + test/integration/targets/ansible-doc/test.yml | 5 +++-- .../ansible_test/_internal/commands/integration/__init__.py | 2 +- test/lib/ansible_test/_internal/commands/units/__init__.py | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/ansible-doc/runme.sh b/test/integration/targets/ansible-doc/runme.sh index 6ce15b0a9da..05672b2d9c1 100755 --- a/test/integration/targets/ansible-doc/runme.sh +++ b/test/integration/targets/ansible-doc/runme.sh @@ -36,6 +36,7 @@ ansible-doc --playbook-dir ./ testns.testcol.randommodule 2>&1 | grep "${GREP_OP # collections testing ( unset ANSIBLE_PLAYBOOK_DIR +export ANSIBLE_FORCE_COLOR=0 export ANSIBLE_NOCOLOR=1 cd "$(dirname "$0")" diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index 408f1b4e385..aedee9db2a1 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -1,10 +1,11 @@ - hosts: localhost gather_facts: false environment: - ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" - ANSIBLE_NOCOLOR: 1 ANSIBLE_DEPRECATION_WARNINGS: 1 ANSIBLE_DOC_FRAGMENT_PLUGINS: "{{ playbook_dir }}/doc_fragments" + ANSIBLE_FORCE_COLOR: 0 + ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" + ANSIBLE_NOCOLOR: 1 vars: # avoid header that has full path and won't work across random paths for tests actual_output_clean: '{{ actual_output.splitlines()[1:] }}' diff --git a/test/lib/ansible_test/_internal/commands/integration/__init__.py b/test/lib/ansible_test/_internal/commands/integration/__init__.py index 421c3d4a3d4..c2b035b37c6 100644 --- a/test/lib/ansible_test/_internal/commands/integration/__init__.py +++ b/test/lib/ansible_test/_internal/commands/integration/__init__.py @@ -793,7 +793,7 @@ def integration_environment( host_state: HostState, ) -> dict[str, str]: """Return a dictionary of environment variables to use when running the given integration test target.""" - env = ansible_environment(args, ansible_config=ansible_config) + env = ansible_environment(args) callback_plugins = ['junit'] + (env_config.callback_plugins or [] if env_config else []) diff --git a/test/lib/ansible_test/_internal/commands/units/__init__.py b/test/lib/ansible_test/_internal/commands/units/__init__.py index 91562da1c11..93f36f8d451 100644 --- a/test/lib/ansible_test/_internal/commands/units/__init__.py +++ b/test/lib/ansible_test/_internal/commands/units/__init__.py @@ -208,7 +208,7 @@ def command_units(args: UnitsConfig) -> None: if not paths: continue - env = ansible_environment(args) + env = ansible_environment(args, False) env.update( PYTHONPATH=get_units_ansible_python_path(args, test_context), From 456ca36718ab1f9af33ff14039b2326ddecceebe Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Mon, 3 Nov 2025 19:14:35 +0100 Subject: [PATCH 08/12] restore test/lib/ansible_test/_internal/commands/integration/__init__.py Signed-off-by: Bjoern Foersterling --- .../lib/ansible_test/_internal/commands/integration/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lib/ansible_test/_internal/commands/integration/__init__.py b/test/lib/ansible_test/_internal/commands/integration/__init__.py index c2b035b37c6..421c3d4a3d4 100644 --- a/test/lib/ansible_test/_internal/commands/integration/__init__.py +++ b/test/lib/ansible_test/_internal/commands/integration/__init__.py @@ -793,7 +793,7 @@ def integration_environment( host_state: HostState, ) -> dict[str, str]: """Return a dictionary of environment variables to use when running the given integration test target.""" - env = ansible_environment(args) + env = ansible_environment(args, ansible_config=ansible_config) callback_plugins = ['junit'] + (env_config.callback_plugins or [] if env_config else []) From f5f3a5e7a7b9d983c03e73cbddac25bcfb038157 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Tue, 4 Nov 2025 07:00:20 +0100 Subject: [PATCH 09/12] add justfile to run tests locally --- justfile | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 00000000000..c7955ace4d2 --- /dev/null +++ b/justfile @@ -0,0 +1,39 @@ +default: + @just -l + +start_docker: + sudo systemctl start docker + +test_unit_ansible_doc: start_docker + source hacking/env-setup && \ + ansible-test units --docker -v test/units/cli/test_doc.py + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc: start_docker + source ../../../../hacking/env-setup && \ + ansible-test integration --docker -v -- ansible-doc + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc_alpine322: start_docker + source ../../../../hacking/env-setup && \ + ansible-test integration --docker alpine322 -v -- ansible-doc + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc_fedora42: start_docker + source ../../../../hacking/env-setup && \ + ansible-test integration --docker fedora42 -v -- ansible-doc + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc_ubuntu2204: start_docker + source ../../../../hacking/env-setup && \ + ansible-test integration --docker ubuntu2204 -v -- ansible-doc + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc_ubuntu2404: start_docker + source ../../../../hacking/env-setup && \ + ansible-test integration --docker ubuntu2404 -v -- ansible-doc + +[working-directory("test/integration/targets/ansible-doc")] +test_int_ansible_doc_local: + source ../../../../hacking/env-setup && \ + ansible-test integration -v -- ansible-doc From aef149964c707c2830bc68b0f3584270e9032163 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Tue, 4 Nov 2025 08:05:13 +0100 Subject: [PATCH 10/12] added recipe to run alpine integration tests --- justfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/justfile b/justfile index c7955ace4d2..90fa7befe9e 100644 --- a/justfile +++ b/justfile @@ -8,6 +8,10 @@ test_unit_ansible_doc: start_docker source hacking/env-setup && \ ansible-test units --docker -v test/units/cli/test_doc.py +test_int_alpine: start_docker + source hacking/env-setup && \ + time ansible-test integration --docker alpine322 -v + [working-directory("test/integration/targets/ansible-doc")] test_int_ansible_doc: start_docker source ../../../../hacking/env-setup && \ From bc55c8cc5585232f1ca23c81571e72092bf7b3f5 Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Wed, 5 Nov 2025 17:31:58 +0100 Subject: [PATCH 11/12] revert back to simple workaround --- justfile | 43 ------------------- lib/ansible/cli/doc.py | 2 +- test/integration/targets/ansible-doc/runme.sh | 1 - test/integration/targets/ansible-doc/test.yml | 1 - .../_internal/commands/units/__init__.py | 2 +- test/units/requirements.txt | 2 - 6 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 justfile diff --git a/justfile b/justfile deleted file mode 100644 index 90fa7befe9e..00000000000 --- a/justfile +++ /dev/null @@ -1,43 +0,0 @@ -default: - @just -l - -start_docker: - sudo systemctl start docker - -test_unit_ansible_doc: start_docker - source hacking/env-setup && \ - ansible-test units --docker -v test/units/cli/test_doc.py - -test_int_alpine: start_docker - source hacking/env-setup && \ - time ansible-test integration --docker alpine322 -v - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc: start_docker - source ../../../../hacking/env-setup && \ - ansible-test integration --docker -v -- ansible-doc - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc_alpine322: start_docker - source ../../../../hacking/env-setup && \ - ansible-test integration --docker alpine322 -v -- ansible-doc - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc_fedora42: start_docker - source ../../../../hacking/env-setup && \ - ansible-test integration --docker fedora42 -v -- ansible-doc - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc_ubuntu2204: start_docker - source ../../../../hacking/env-setup && \ - ansible-test integration --docker ubuntu2204 -v -- ansible-doc - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc_ubuntu2404: start_docker - source ../../../../hacking/env-setup && \ - ansible-test integration --docker ubuntu2404 -v -- ansible-doc - -[working-directory("test/integration/targets/ansible-doc")] -test_int_ansible_doc_local: - source ../../../../hacking/env-setup && \ - ansible-test integration -v -- ansible-doc diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index cd6f524cd54..59697766955 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -423,7 +423,7 @@ def _format(string, *args): if style not in ref_style and style.upper() not in STYLE and style not in C.COLOR_CODES: raise KeyError("Invalid format value supplied: %s" % style) - if not ANSIBLE_COLOR: + if C.ANSIBLE_NOCOLOR or not ANSIBLE_COLOR: # ignore most styles, but some already had 'identifier strings' if style in NOCOLOR: string = NOCOLOR[style] % string diff --git a/test/integration/targets/ansible-doc/runme.sh b/test/integration/targets/ansible-doc/runme.sh index 05672b2d9c1..6ce15b0a9da 100755 --- a/test/integration/targets/ansible-doc/runme.sh +++ b/test/integration/targets/ansible-doc/runme.sh @@ -36,7 +36,6 @@ ansible-doc --playbook-dir ./ testns.testcol.randommodule 2>&1 | grep "${GREP_OP # collections testing ( unset ANSIBLE_PLAYBOOK_DIR -export ANSIBLE_FORCE_COLOR=0 export ANSIBLE_NOCOLOR=1 cd "$(dirname "$0")" diff --git a/test/integration/targets/ansible-doc/test.yml b/test/integration/targets/ansible-doc/test.yml index aedee9db2a1..625473b1fb5 100644 --- a/test/integration/targets/ansible-doc/test.yml +++ b/test/integration/targets/ansible-doc/test.yml @@ -3,7 +3,6 @@ environment: ANSIBLE_DEPRECATION_WARNINGS: 1 ANSIBLE_DOC_FRAGMENT_PLUGINS: "{{ playbook_dir }}/doc_fragments" - ANSIBLE_FORCE_COLOR: 0 ANSIBLE_LIBRARY: "{{ playbook_dir }}/library" ANSIBLE_NOCOLOR: 1 vars: diff --git a/test/lib/ansible_test/_internal/commands/units/__init__.py b/test/lib/ansible_test/_internal/commands/units/__init__.py index 93f36f8d451..91562da1c11 100644 --- a/test/lib/ansible_test/_internal/commands/units/__init__.py +++ b/test/lib/ansible_test/_internal/commands/units/__init__.py @@ -208,7 +208,7 @@ def command_units(args: UnitsConfig) -> None: if not paths: continue - env = ansible_environment(args, False) + env = ansible_environment(args) env.update( PYTHONPATH=get_units_ansible_python_path(args, test_context), diff --git a/test/units/requirements.txt b/test/units/requirements.txt index 78de23e9227..43bd7bda7e7 100644 --- a/test/units/requirements.txt +++ b/test/units/requirements.txt @@ -1,7 +1,5 @@ bcrypt < 5 ; python_version >= '3.12' # controller only, bcrypt 5+ not compatible with passlib passlib ; python_version >= '3.12' # controller only pexpect ; python_version >= '3.12' # controller only -pytest -pytest-mock pywinrm ; python_version >= '3.12' # controller only typing_extensions; python_version < '3.11' # some unit tests need Annotated and get_type_hints(include_extras=True) From 7f4239db76b2866e0f05421b50d384f0fc03d50c Mon Sep 17 00:00:00 2001 From: Bjoern Foersterling Date: Tue, 18 Nov 2025 18:15:30 +0100 Subject: [PATCH 12/12] added changelog fragment --- changelogs/fragments/fix_ansible-doc_colors_without_tty.yaml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/fix_ansible-doc_colors_without_tty.yaml diff --git a/changelogs/fragments/fix_ansible-doc_colors_without_tty.yaml b/changelogs/fragments/fix_ansible-doc_colors_without_tty.yaml new file mode 100644 index 00000000000..7fa96885e51 --- /dev/null +++ b/changelogs/fragments/fix_ansible-doc_colors_without_tty.yaml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-doc - don't write ansi escape sequences without interactive tty / respect ANSIBLE_COLOR