From 7077ea7f95700718ffbe5557f2690b27f11a6509 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Thu, 6 Oct 2022 17:59:30 -0400 Subject: [PATCH] Backport hactoberfest 1 (#79065) * apt_key, fix example indentation Co-authored-by: Matt Clay (cherry picked from commit cee9872605b3ff20d3ce326881da515eba17f72f) * Docs: Add code-block wrappers to code examples: testing_documentation.rst (#78966) * Docs: Add code-block wrappers to code examples: testing_documentation.rst List of changed files: - docs/docsite/rst/dev_guide/testing_documentation.rst * Fix: match whitespace convention of other occurences (cherry picked from commit 538b99781f81b87ff2cd18ee6eae1db49a29c37a) * added code-blocks according to #78962 (#78972) (cherry picked from commit 01484cdc68e2c8634bab5d8ffc2043e8d7471ee6) * Adding code-block wrappers to code examples (#78968) (cherry picked from commit 1db75a41bff0eedc0fafaaef0180b1c7c6912b2a) * added code-blocks according to #78963 (#78969) * added code-blocks according to #78963 * Update testing.rst, added newlines (cherry picked from commit 446406a0c844c365fb12fbf03579ee286847d964) * Docs: Add code-block wrappers to code examples in style_guide (#78970) * Docs: Add code-block wrappers to code examples in style_guide List of changed files: - docs/docsite/rst/dev-guide/style_guide/index.rst - docs/docsite/rst/dev-guide/style_guide/basic_rules.rst (cherry picked from commit 3dc0c2135ed451e7fe0839740ad539b73ee4bdc9) * #78971 Update module_lifecycle.rst (#78974) * Update module_lifecycle.rst (cherry picked from commit 93c2cb2b8e1df8a5e31c2119f4c13bc8f97ed775) * #78965 Adding the code-block to prevent the translation (#78979) * Adding the code-block to prevent the translation (cherry picked from commit 9afb37eda605d79348a19d49cd0a615a6691aa3a) * Adds code-block in collection documentation (#78977) * fix issue #78976 (cherry picked from commit 1b922b42dd5e18aeff789f2ee6fcb0a43485ac12) * docs - Use code-block to format examples in Windows module development walkthrough (#78985) (cherry picked from commit 56c48d1c4507754be9bb1b557ed6681306492180) * Docs: true/false with boolean values in docsite/rst/os_guide (#78957) (cherry picked from commit fb8c2daf46d3a9293ee9ea6555279aca0fb62b9a) * Update porting_guide_2.0.rst (#78951) Replaced http link with rst version - issue https://github.com/ansible/ansible/issues/78914 (cherry picked from commit dc2d15fca4e22f7c9debc1fa69e0b2af27e972e3) * Update porting_guide_3.rst (#78952) Fixes #78914 (cherry picked from commit 919c449256d3fb6e87bd1169827ffd5355495fb9) * Update porting_guide_4.rst (#78953) (cherry picked from commit ba3264253859b95d621727259615546c0927ca63) * Update porting_guide_5.rst (#78954) (cherry picked from commit 5137cb16e915bd8d0a06bdc659cbc0f65ea9a6b2) * scenario guide doc changes (#78934) (cherry picked from commit 5b333c9665182e20c2dfbed64006ced12e897ccb) Co-authored-by: Jasper <44026484+jasperjonker@users.noreply.github.com> Co-authored-by: Ozan Uslan <54141068+ozanuslan@users.noreply.github.com> Co-authored-by: Lukas Grimm Co-authored-by: Deepshri M <92997066+Deepshaded@users.noreply.github.com> Co-authored-by: IMvision12 <88665786+IMvision12@users.noreply.github.com> Co-authored-by: Luigi Giugliano Co-authored-by: Thomas Doczkal Co-authored-by: jmakhack Co-authored-by: Sudipto Ghosh Co-authored-by: Kampftoast Co-authored-by: J-F-Far --- .../developing_collections_distributing.rst | 4 +++- .../dev_guide/developing_module_utilities.rst | 4 +++- .../developing_modules_general_windows.rst | 8 +++++-- .../rst/dev_guide/module_lifecycle.rst | 6 ++--- .../rst/dev_guide/style_guide/basic_rules.rst | 4 +++- .../rst/dev_guide/style_guide/index.rst | 4 +++- docs/docsite/rst/dev_guide/testing.rst | 8 +++++-- .../rst/dev_guide/testing/sanity/ignores.rst | 8 +++++-- .../rst/dev_guide/testing_documentation.rst | 4 +++- docs/docsite/rst/dev_guide/testing_pep8.rst | 3 ++- docs/docsite/rst/os_guide/intro_bsd.rst | 4 ++-- docs/docsite/rst/os_guide/windows_dsc.rst | 22 +++++++++---------- docs/docsite/rst/os_guide/windows_setup.rst | 2 +- docs/docsite/rst/os_guide/windows_usage.rst | 8 +++---- .../rst/porting_guides/porting_guide_2.0.rst | 2 +- .../rst/porting_guides/porting_guide_3.rst | 2 +- .../rst/porting_guides/porting_guide_4.rst | 6 ++--- .../rst/porting_guides/porting_guide_5.rst | 4 ++-- .../docsite/rst/scenario_guides/guide_aci.rst | 6 ++--- .../rst/scenario_guides/guide_azure.rst | 2 +- .../docsite/rst/scenario_guides/guide_gce.rst | 4 ++-- .../docsite/rst/scenario_guides/guide_rax.rst | 20 ++++++++--------- .../rst/scenario_guides/guide_scaleway.rst | 4 ++-- lib/ansible/modules/apt_key.py | 4 ++-- 24 files changed, 83 insertions(+), 60 deletions(-) diff --git a/docs/docsite/rst/dev_guide/developing_collections_distributing.rst b/docs/docsite/rst/dev_guide/developing_collections_distributing.rst index d07e6f1382f..124d112439c 100644 --- a/docs/docsite/rst/dev_guide/developing_collections_distributing.rst +++ b/docs/docsite/rst/dev_guide/developing_collections_distributing.rst @@ -132,7 +132,9 @@ After configuring one or more distribution servers, build a collection tarball. collection_dir#> ansible-galaxy collection build -This command builds a tarball of the collection in the current directory, which you can upload to your selected distribution server:: +This command builds a tarball of the collection in the current directory, which you can upload to your selected distribution server: + +.. code-block:: shell my_collection/ ├── galaxy.yml diff --git a/docs/docsite/rst/dev_guide/developing_module_utilities.rst b/docs/docsite/rst/dev_guide/developing_module_utilities.rst index 504a7911feb..eca64005ef4 100644 --- a/docs/docsite/rst/dev_guide/developing_module_utilities.rst +++ b/docs/docsite/rst/dev_guide/developing_module_utilities.rst @@ -20,7 +20,9 @@ resolving those matching the namespace against a :ref:`search path `_:: +For code or command snippets, use the RST `code-block directive `_: + +.. code-block:: rst .. code-block:: bash diff --git a/docs/docsite/rst/dev_guide/style_guide/index.rst b/docs/docsite/rst/dev_guide/style_guide/index.rst index 0183ba99212..b43b9164d31 100644 --- a/docs/docsite/rst/dev_guide/style_guide/index.rst +++ b/docs/docsite/rst/dev_guide/style_guide/index.rst @@ -192,7 +192,9 @@ Adding anchors * Include at least one anchor on every page * Place the main anchor above the main header -* If the file has a unique title, use that for the main page anchor:: +* If the file has a unique title, use that for the main page anchor: + +.. code-block:: text .. _unique_page:: diff --git a/docs/docsite/rst/dev_guide/testing.rst b/docs/docsite/rst/dev_guide/testing.rst index 02a1f27655c..a587a746088 100644 --- a/docs/docsite/rst/dev_guide/testing.rst +++ b/docs/docsite/rst/dev_guide/testing.rst @@ -129,7 +129,9 @@ Create a fresh area to work: git clone https://github.com/ansible/ansible.git ansible-pr-testing cd ansible-pr-testing -Next, find the pull request you'd like to test and make note of its number. It will look something like this:: +Next, find the pull request you'd like to test and make note of its number. It will look something like this: + +.. code-block:: text Use os.path.sep instead of hardcoding / #65381 @@ -204,7 +206,9 @@ More information: :ref:`testing_integration` Any potential issues should be added as comments on the pull request (and it's acceptable to comment if the feature works as well), remembering to include the output of ``ansible --version`` -Example:: +Example: + +.. code-block:: text Works for me! Tested on `Ansible 2.3.0`. I verified this on CentOS 6.5 and also Ubuntu 14.04. diff --git a/docs/docsite/rst/dev_guide/testing/sanity/ignores.rst b/docs/docsite/rst/dev_guide/testing/sanity/ignores.rst index 942b48f82ee..69190c8d739 100644 --- a/docs/docsite/rst/dev_guide/testing/sanity/ignores.rst +++ b/docs/docsite/rst/dev_guide/testing/sanity/ignores.rst @@ -71,7 +71,9 @@ This will be the name of the sanity test. If the sanity test is specific to a version of Python, the name will include a dash (``-``) and the relevant Python version. If the named test uses error codes then the error code to ignore must be appended to the name of the test, separated by a colon (``:``). -Below are some example ignore entries for an Ansible collection:: +Below are some example ignore entries for an Ansible collection: + +.. code-block:: text roles/my_role/files/my_script.sh shellcheck:SC2154 # ignore undefined variable plugins/modules/my_module.py validate-modules:missing-gplv3-license # ignore license check @@ -81,7 +83,9 @@ It is also possible to skip a sanity test for a specific file. This is done by adding ``!skip`` after the sanity test name in the second column. When this is done, no error code is included, even if the sanity test uses error codes. -Below are some example skip entries for an Ansible collection:: +Below are some example skip entries for an Ansible collection: + +.. code-block:: text plugins/module_utils/my_util.py validate-modules!skip # waiting for bug fix in module validator plugins/lookup/my_plugin.py compile-2.6!skip # Python 2.6 is not supported on the controller diff --git a/docs/docsite/rst/dev_guide/testing_documentation.rst b/docs/docsite/rst/dev_guide/testing_documentation.rst index f998939524b..cfd309d6698 100644 --- a/docs/docsite/rst/dev_guide/testing_documentation.rst +++ b/docs/docsite/rst/dev_guide/testing_documentation.rst @@ -31,6 +31,8 @@ To ensure that your module documentation matches your ``argument_spec``: pip install --user -r test/lib/ansible_test/_data/requirements/sanity.txt -#. run the ``validate-modules`` test:: +#. run the ``validate-modules`` test: + + .. code-block:: bash ansible-test sanity --test validate-modules mymodule diff --git a/docs/docsite/rst/dev_guide/testing_pep8.rst b/docs/docsite/rst/dev_guide/testing_pep8.rst index 92630995c38..7c19b2a13dc 100644 --- a/docs/docsite/rst/dev_guide/testing_pep8.rst +++ b/docs/docsite/rst/dev_guide/testing_pep8.rst @@ -13,8 +13,9 @@ PEP 8 Running Locally =============== -The `PEP 8`_ check can be run locally with:: +The `PEP 8`_ check can be run locally with: +.. code-block:: shell ansible-test sanity --test pep8 [file-or-directory-path-to-check] ... diff --git a/docs/docsite/rst/os_guide/intro_bsd.rst b/docs/docsite/rst/os_guide/intro_bsd.rst index 7f1d1f45ab3..6e92b2a3d4e 100644 --- a/docs/docsite/rst/os_guide/intro_bsd.rst +++ b/docs/docsite/rst/os_guide/intro_bsd.rst @@ -129,7 +129,7 @@ For example, given the inventory [test:vars] ansible_connection=ssh ansible_user=admin - ansible_become=yes + ansible_become=true ansible_become_user=root ansible_become_method=sudo ansible_interpreter_python_fallback=['/usr/local/bin/python', '/usr/local/bin/python3', '/usr/local/bin/python3.8'] @@ -213,7 +213,7 @@ You can either ignore it or get rid of it by setting the variable ``ansible_pyth [test:vars] ansible_connection=ssh ansible_user=admin - ansible_become=yes + ansible_become=true ansible_become_user=root ansible_become_method=sudo ansible_interpreter_python_fallback=['/usr/local/bin/python', '/usr/local/bin/python3', '/usr/local/bin/python3.8'] diff --git a/docs/docsite/rst/os_guide/windows_dsc.rst b/docs/docsite/rst/os_guide/windows_dsc.rst index ffda84f2566..1588a2329fc 100644 --- a/docs/docsite/rst/os_guide/windows_dsc.rst +++ b/docs/docsite/rst/os_guide/windows_dsc.rst @@ -187,7 +187,7 @@ For example: SourceCredential_username: AdminUser SourceCredential_password: PasswordForAdminUser -.. Note:: On versions of Ansible older than 2.8, you should set ``no_log: yes`` +.. Note:: On versions of Ansible older than 2.8, you should set ``no_log: true`` on the task definition in Ansible to ensure any credentials used are not stored in any log file or console output. @@ -205,10 +205,10 @@ For example, to define a ``[CimInstance]`` value in Ansible: # [CimInstance]AuthenticationInfo == MSFT_xWebAuthenticationInformation AuthenticationInfo: - Anonymous: no - Basic: yes - Digest: no - Windows: yes + Anonymous: false + Basic: true + Digest: false + Windows: true In the above example, the CIM instance is a representation of the class `MSFT_xWebAuthenticationInformation `_. @@ -317,7 +317,7 @@ to access the ``HKEY_CURRENT_USER`` hive of the Ansible user: ValueData: TestData PsDscRunAsCredential_username: '{{ ansible_user }}' PsDscRunAsCredential_password: '{{ ansible_password }}' - no_log: yes + no_log: true Custom DSC Resources ```````````````````` @@ -435,7 +435,7 @@ Interact with Azure ServiceName: ServiceName StorageAccountName: StorageAccountName InstanceSize: Medium - Windows: yes + Windows: true Ensure: Present Credential_username: '{{ ansible_user }}' Credential_password: '{{ ansible_password }}' @@ -489,10 +489,10 @@ Setup IIS Website Port: 8080 IPAddress: '*' AuthenticationInfo: - Anonymous: no - Basic: yes - Digest: no - Windows: yes + Anonymous: false + Basic: true + Digest: false + Windows: true .. seealso:: diff --git a/docs/docsite/rst/os_guide/windows_setup.rst b/docs/docsite/rst/os_guide/windows_setup.rst index 015e7fdf478..7baf837e2ae 100644 --- a/docs/docsite/rst/os_guide/windows_setup.rst +++ b/docs/docsite/rst/os_guide/windows_setup.rst @@ -495,7 +495,7 @@ Ansible, select one of these installation options: # main.yml - name: install Win32-OpenSSH service hosts: windows - gather_facts: no + gather_facts: false roles: - role: jborean93.win_openssh opt_openssh_setup_service: True diff --git a/docs/docsite/rst/os_guide/windows_usage.rst b/docs/docsite/rst/os_guide/windows_usage.rst index 998562c11ed..687b59fa97d 100644 --- a/docs/docsite/rst/os_guide/windows_usage.rst +++ b/docs/docsite/rst/os_guide/windows_usage.rst @@ -161,8 +161,8 @@ access a folder on the same host: name: '{{ item.name }}' password: '{{ item.password }}' groups: LocalGroup - update_password: no - password_never_expires: yes + update_password: false + password_never_expires: true loop: - name: User1 password: Password1 @@ -185,7 +185,7 @@ access a folder on the same host: - name: Remove parent inheritance of Development folder win_acl_inheritance: path: C:\Development - reorganize: yes + reorganize: true state: absent Domain @@ -201,7 +201,7 @@ are created: name: '{{ item.name }}' upn: '{{ item.name }}@MY.DOMAIN.COM' password: '{{ item.password }}' - password_never_expires: no + password_never_expires: false groups: - Test User - Application diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.0.rst b/docs/docsite/rst/porting_guides/porting_guide_2.0.rst index a552a6a26ae..67a8c461c47 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.0.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.0.rst @@ -92,7 +92,7 @@ uses key=value escaping which has not changed. The other option is to check for * porting task includes * More dynamic. Corner-case formats that were not supposed to work now do not, as expected. -* variables defined in the yaml dict format https://github.com/ansible/ansible/issues/13324 +* variables defined in the yaml dict format see `issue 13324 `_ * templating (variables in playbooks and template lookups) has improved with regard to keeping the original instead of turning everything into a string. If you need the old behavior, quote the value to pass it around as a string. * Empty variables and variables set to null in yaml are no longer converted to empty strings. They will retain the value of `None`. diff --git a/docs/docsite/rst/porting_guides/porting_guide_3.rst b/docs/docsite/rst/porting_guides/porting_guide_3.rst index ba64b85977b..2f387bb9035 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_3.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_3.rst @@ -207,7 +207,7 @@ Breaking Changes Ansible-base ~~~~~~~~~~~~ -- ansible-galaxy login command has been removed (see https://github.com/ansible/ansible/issues/71560) +- ansible-galaxy login command has been removed ( see `issue 71560 `_) ansible.utils ~~~~~~~~~~~~~ diff --git a/docs/docsite/rst/porting_guides/porting_guide_4.rst b/docs/docsite/rst/porting_guides/porting_guide_4.rst index 1bcd0fae624..003faba37f4 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_4.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_4.rst @@ -194,7 +194,7 @@ Breaking Changes community.zabbix ~~~~~~~~~~~~~~~~ -- all roles now reference other roles and modules via their fully qualified collection names, which makes Ansible 2.10 minimum supported version for roles (See https://github.com/ansible-collections/community.zabbix/pull/477). +- all roles now reference other roles and modules via their fully qualified collection names, which makes Ansible 2.10 minimum supported version for roles (see `issue 477 `_). Deprecated Features ------------------- @@ -522,7 +522,7 @@ Known Issues Ansible-core ~~~~~~~~~~~~ -- ansible-test - The ``pylint`` sanity test no longer correctly detects "bad" variable names for non-constants. See https://github.com/PyCQA/pylint/issues/3701 for additional details. +- ansible-test - The ``pylint`` sanity test no longer correctly detects "bad" variable names for non-constants. See `issue 3701 `_ for additional details. dellemc.openmanage ~~~~~~~~~~~~~~~~~~ @@ -547,7 +547,7 @@ Ansible-core - NetBSD virtualization facts (specifically ``ansible_virtualization_type``) now returns a more accurate value by checking the value of the ``machdep.hypervisor`` ``sysctl`` key. This change is breaking because in some cases previously, we would erroneously report ``xen`` even when the target is not running on Xen. This prevents that behavior in most cases. (https://github.com/ansible/ansible/issues/69352) - Replaced the in-tree dependency resolver with an external implementation that pip >= 20.3 uses now by default — ``resolvelib``. (https://github.com/ansible/ansible/issues/71784) - The ``meta`` module now supports tags for user-defined tasks. Internal ``meta`` tasks continue to always run. (https://github.com/ansible/ansible/issues/64558) -- ansible-galaxy login command has been removed (see https://github.com/ansible/ansible/issues/71560) +- ansible-galaxy login command has been removed (see `issue 71560 `_) ansible.netcommon ~~~~~~~~~~~~~~~~~ diff --git a/docs/docsite/rst/porting_guides/porting_guide_5.rst b/docs/docsite/rst/porting_guides/porting_guide_5.rst index d3ba694e8f3..f26d7fb2a17 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_5.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_5.rst @@ -441,7 +441,7 @@ Known Issues Ansible-core ~~~~~~~~~~~~ -- ansible-test - Tab completion anywhere other than the end of the command with the new composite options will provide incorrect results. See https://github.com/kislyuk/argcomplete/issues/351 for additional details. +- ansible-test - Tab completion anywhere other than the end of the command with the new composite options will provide incorrect results. See `issue 351 `_ for additional details. dellemc.openmanage ~~~~~~~~~~~~~~~~~~ @@ -572,7 +572,7 @@ community.routeros community.zabbix ~~~~~~~~~~~~~~~~ -- all roles now reference other roles and modules via their fully qualified collection names, which makes Ansible 2.10 minimum supported version for roles (See https://github.com/ansible-collections/community.zabbix/pull/477). +- all roles now reference other roles and modules via their fully qualified collection names, which makes Ansible 2.10 minimum supported version for roles (See `issue 477 `_). kubernetes.core ~~~~~~~~~~~~~~~ diff --git a/docs/docsite/rst/scenario_guides/guide_aci.rst b/docs/docsite/rst/scenario_guides/guide_aci.rst index 370ec13b0f3..e2e66138971 100644 --- a/docs/docsite/rst/scenario_guides/guide_aci.rst +++ b/docs/docsite/rst/scenario_guides/guide_aci.rst @@ -111,14 +111,14 @@ For this very reason, the modules need to run on the local Ansible controller (o Gathering facts ``````````````` -Because we run the modules on the Ansible controller gathering facts will not work. That is why when using these ACI modules it is mandatory to disable facts gathering. You can do this globally in your ``ansible.cfg`` or by adding ``gather_facts: no`` to every play. +Because we run the modules on the Ansible controller gathering facts will not work. That is why when using these ACI modules it is mandatory to disable facts gathering. You can do this globally in your ``ansible.cfg`` or by adding ``gather_facts: false`` to every play. .. code-block:: yaml :emphasize-lines: 3 - name: Another play in my playbook hosts: my-apic-1 - gather_facts: no + gather_facts: false tasks: - name: Create a tenant aci_tenant: @@ -235,7 +235,7 @@ By default, if an environment variable ``_proxy`` is set on the target HTTP redirects can redirect from HTTP to HTTPS so ensure that the proxy environment for both protocols is correctly configured. -If proxy support is not needed, but the system may have it configured nevertheless, use the parameter ``use_proxy: no`` to avoid accidental system proxy usage. +If proxy support is not needed, but the system may have it configured nevertheless, use the parameter ``use_proxy: false`` to avoid accidental system proxy usage. .. hint:: Selective proxy support using the ``no_proxy`` environment variable is also supported. diff --git a/docs/docsite/rst/scenario_guides/guide_azure.rst b/docs/docsite/rst/scenario_guides/guide_azure.rst index 548ee36cdb4..c60ec334259 100644 --- a/docs/docsite/rst/scenario_guides/guide_azure.rst +++ b/docs/docsite/rst/scenario_guides/guide_azure.rst @@ -460,7 +460,7 @@ Here is a simple playbook to exercise the Azure inventory script: - name: Test the inventory script hosts: azure connection: local - gather_facts: no + gather_facts: false tasks: - debug: msg: "{{ inventory_hostname }} has powerstate {{ powerstate }}" diff --git a/docs/docsite/rst/scenario_guides/guide_gce.rst b/docs/docsite/rst/scenario_guides/guide_gce.rst index 6d9ca65a1fc..54071040e2d 100644 --- a/docs/docsite/rst/scenario_guides/guide_gce.rst +++ b/docs/docsite/rst/scenario_guides/guide_gce.rst @@ -89,7 +89,7 @@ you can use the following configuration: - name: Create IP address hosts: localhost - gather_facts: no + gather_facts: false vars: service_account_file: /home/my_account.json @@ -168,7 +168,7 @@ rest. - name: Create an instance hosts: localhost - gather_facts: no + gather_facts: false vars: gcp_project: my-project gcp_cred_kind: serviceaccount diff --git a/docs/docsite/rst/scenario_guides/guide_rax.rst b/docs/docsite/rst/scenario_guides/guide_rax.rst index 1d9b380da8a..706115e3bbd 100644 --- a/docs/docsite/rst/scenario_guides/guide_rax.rst +++ b/docs/docsite/rst/scenario_guides/guide_rax.rst @@ -118,7 +118,7 @@ Here's what it would look like in a playbook, assuming the parameters were defin image: "{{ rax_image }}" count: "{{ rax_count }}" group: "{{ group }}" - wait: yes + wait: true register: rax delegate_to: localhost @@ -442,9 +442,9 @@ Create an isolated cloud network and build a server region: IAD state: present count: 5 - exact_count: yes + exact_count: true group: web - wait: yes + wait: true wait_timeout: 360 register: rax delegate_to: localhost @@ -473,7 +473,7 @@ Build a complete webserver environment with servers, custom networks and load ba type: PUBLIC timeout: 30 region: IAD - wait: yes + wait: true state: present meta: app: my-cool-app @@ -502,9 +502,9 @@ Build a complete webserver environment with servers, custom networks and load ba region: IAD state: present count: 5 - exact_count: yes + exact_count: true group: web - wait: yes + wait: true register: rax - name: Add servers to web host group @@ -525,7 +525,7 @@ Build a complete webserver environment with servers, custom networks and load ba port: 80 condition: enabled type: primary - wait: yes + wait: true region: IAD loop: "{{ rax.success }}" when: rax.action == 'create' @@ -583,9 +583,9 @@ Using a Control Machine region: DFW state: present count: 1 - exact_count: yes + exact_count: true group: web - wait: yes + wait: true register: rax - name: Add servers to in memory groups @@ -676,7 +676,7 @@ Using Ansible Pull - name: Wait for rackconnect automation to complete uri: url: "https://{{ rax_region.stdout|trim }}.api.rackconnect.rackspace.com/v1/automation_status?format=json" - return_content: yes + return_content: true register: automation_status when: bootstrap.stat.exists != True until: automation_status['automation_status']|default('') == 'DEPLOYED' diff --git a/docs/docsite/rst/scenario_guides/guide_scaleway.rst b/docs/docsite/rst/scenario_guides/guide_scaleway.rst index ede7d897892..ba399049e65 100644 --- a/docs/docsite/rst/scenario_guides/guide_scaleway.rst +++ b/docs/docsite/rst/scenario_guides/guide_scaleway.rst @@ -70,7 +70,7 @@ The ``ssh_pub_key`` parameter contains your ssh public key as a string. Here is - name: Test SSH key lifecycle on a Scaleway account hosts: localhost - gather_facts: no + gather_facts: false environment: SCW_API_KEY: "" @@ -120,7 +120,7 @@ Take a look at this short playbook to see a working example using ``scaleway_com - name: Test compute instance lifecycle on a Scaleway account hosts: localhost - gather_facts: no + gather_facts: false environment: SCW_API_KEY: "" diff --git a/lib/ansible/modules/apt_key.py b/lib/ansible/modules/apt_key.py index 4c4c3efb852..f4a4126dcbd 100644 --- a/lib/ansible/modules/apt_key.py +++ b/lib/ansible/modules/apt_key.py @@ -90,8 +90,8 @@ EXAMPLES = ''' - name: somerepo | apt source ansible.builtin.apt_repository: - repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/somerepo.asc] https://download.example.com/linux/ubuntu {{ ansible_distribution_release }} stable" - state: present + repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/myrepo.asc] https://download.example.com/linux/ubuntu {{ ansible_distribution_release }} stable" + state: present - name: Add an apt key by id from a keyserver ansible.builtin.apt_key: