From ee3dfd2d4af821b76e5b834bd132062045389118 Mon Sep 17 00:00:00 2001 From: flowerysong Date: Thu, 9 May 2024 12:22:27 -0400 Subject: [PATCH] ansible-doc: fix typo in output (#83205) (#83207) (cherry picked from commit f5b945bf6a53c8a2b4c900f28d1790818d7b934f) --- changelogs/fragments/ansible-doc-inicate.yml | 2 ++ lib/ansible/cli/doc.py | 4 ++-- test/integration/targets/ansible-doc/fakecollrole.output | 2 +- test/integration/targets/ansible-doc/fakemodule.output | 2 +- test/integration/targets/ansible-doc/fakerole.output | 2 +- .../targets/ansible-doc/randommodule-text-verbose.output | 2 +- test/integration/targets/ansible-doc/randommodule-text.output | 2 +- .../targets/ansible-doc/test_docs_suboptions.output | 2 +- .../targets/ansible-doc/test_docs_yaml_anchors.output | 2 +- test/integration/targets/ansible-doc/yolo-text.output | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 changelogs/fragments/ansible-doc-inicate.yml diff --git a/changelogs/fragments/ansible-doc-inicate.yml b/changelogs/fragments/ansible-doc-inicate.yml new file mode 100644 index 00000000000..519730869fd --- /dev/null +++ b/changelogs/fragments/ansible-doc-inicate.yml @@ -0,0 +1,2 @@ +bugfixes: + - ansible-doc - fixed "inicates" typo in output diff --git a/lib/ansible/cli/doc.py b/lib/ansible/cli/doc.py index 16033f8e112..71b8dd64597 100755 --- a/lib/ansible/cli/doc.py +++ b/lib/ansible/cli/doc.py @@ -1303,7 +1303,7 @@ class DocCLI(CLI, RoleMixin): text.append('') if doc.get('options'): - text.append(_format("Options", 'bold') + " (%s inicates it is required):" % ("=" if C.ANSIBLE_NOCOLOR else 'red')) + text.append(_format("Options", 'bold') + " (%s indicates it is required):" % ("=" if C.ANSIBLE_NOCOLOR else 'red')) DocCLI.add_fields(text, doc.pop('options'), limit, opt_indent) if doc.get('attributes', False): @@ -1385,7 +1385,7 @@ class DocCLI(CLI, RoleMixin): if doc.get('options', False): text.append("") - text.append(_format("OPTIONS", 'bold') + " (%s inicates it is required):" % ("=" if C.ANSIBLE_NOCOLOR else 'red')) + text.append(_format("OPTIONS", 'bold') + " (%s indicates it is required):" % ("=" if C.ANSIBLE_NOCOLOR else 'red')) DocCLI.add_fields(text, doc.pop('options'), limit, opt_indent, man=(display.verbosity == 0)) if doc.get('attributes', False): diff --git a/test/integration/targets/ansible-doc/fakecollrole.output b/test/integration/targets/ansible-doc/fakecollrole.output index b41a35d4d5e..77ac928025f 100644 --- a/test/integration/targets/ansible-doc/fakecollrole.output +++ b/test/integration/targets/ansible-doc/fakecollrole.output @@ -5,7 +5,7 @@ ENTRY POINT: *alternate* - testns.testcol.testrole short description for alterna Longer description for testns.testcol.testrole alternate entry point. -Options (= inicates it is required): +Options (= indicates it is required): = altopt1 altopt1 description type: int diff --git a/test/integration/targets/ansible-doc/fakemodule.output b/test/integration/targets/ansible-doc/fakemodule.output index 5e2e3c8e002..42fbaad2d25 100644 --- a/test/integration/targets/ansible-doc/fakemodule.output +++ b/test/integration/targets/ansible-doc/fakemodule.output @@ -2,7 +2,7 @@ this is a fake module -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): - _notreal really not a real option default: null diff --git a/test/integration/targets/ansible-doc/fakerole.output b/test/integration/targets/ansible-doc/fakerole.output index 0e82b7f9de4..3f4302a04e1 100644 --- a/test/integration/targets/ansible-doc/fakerole.output +++ b/test/integration/targets/ansible-doc/fakerole.output @@ -11,7 +11,7 @@ ENTRY POINT: *main* - test_role1 from roles subdir fat case left use. Match round scale now style far times. Your me past an much. -Options (= inicates it is required): +Options (= indicates it is required): = myopt1 First option. type: str diff --git a/test/integration/targets/ansible-doc/randommodule-text-verbose.output b/test/integration/targets/ansible-doc/randommodule-text-verbose.output index e7ec706b628..cfcba46ff9e 100644 --- a/test/integration/targets/ansible-doc/randommodule-text-verbose.output +++ b/test/integration/targets/ansible-doc/randommodule-text-verbose.output @@ -7,7 +7,7 @@ DEPRECATED: Will be removed in: Ansible 3.0.0 Alternatives: Use some other module -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): - sub Suboptions. set_via: diff --git a/test/integration/targets/ansible-doc/randommodule-text.output b/test/integration/targets/ansible-doc/randommodule-text.output index e647576fa71..d017579fb51 100644 --- a/test/integration/targets/ansible-doc/randommodule-text.output +++ b/test/integration/targets/ansible-doc/randommodule-text.output @@ -13,7 +13,7 @@ DEPRECATED: Will be removed in: Ansible 3.0.0 Alternatives: Use some other module -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): - sub Suboptions. Contains `sub.subtest', which can be set to `123'. You can use `TEST_ENV' to set this. diff --git a/test/integration/targets/ansible-doc/test_docs_suboptions.output b/test/integration/targets/ansible-doc/test_docs_suboptions.output index 028f0487393..2ca337753d9 100644 --- a/test/integration/targets/ansible-doc/test_docs_suboptions.output +++ b/test/integration/targets/ansible-doc/test_docs_suboptions.output @@ -1,6 +1,6 @@ Test module -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): - with_suboptions An option with suboptions. Use with care. diff --git a/test/integration/targets/ansible-doc/test_docs_yaml_anchors.output b/test/integration/targets/ansible-doc/test_docs_yaml_anchors.output index 2ae912ca7bd..abe26a486fa 100644 --- a/test/integration/targets/ansible-doc/test_docs_yaml_anchors.output +++ b/test/integration/targets/ansible-doc/test_docs_yaml_anchors.output @@ -1,6 +1,6 @@ Test module -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): - at_the_top Short desc default: some string diff --git a/test/integration/targets/ansible-doc/yolo-text.output b/test/integration/targets/ansible-doc/yolo-text.output index 70e6a41f829..f9d4fe87bd9 100644 --- a/test/integration/targets/ansible-doc/yolo-text.output +++ b/test/integration/targets/ansible-doc/yolo-text.output @@ -2,7 +2,7 @@ This is always true -OPTIONS (= inicates it is required): +OPTIONS (= indicates it is required): = _input does not matter type: raw