From 21fc699b7734536d94e0b2d3f2f87f704444959b Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 17 Feb 2023 17:00:41 -0800 Subject: [PATCH] Remove trailing spaces from lines in YAML (#80032) --- .../79422-fix-file-touch-check-mode-status.yaml | 2 +- .../ansible-test-container-management.yml | 2 +- .../ansible-test-payload-file-permissions.yml | 2 +- changelogs/fragments/psscriptanalyzer-1.21.0.yml | 2 +- lib/ansible/plugins/filter/b64decode.yml | 2 +- lib/ansible/plugins/filter/to_yaml.yml | 16 ++++++++-------- test/integration/targets/apt_key/tasks/main.yml | 2 +- test/integration/targets/become/tasks/main.yml | 4 ++-- .../roles/test_check_mode/tasks/main.yml | 8 ++++---- .../targets/file/tasks/link_rewrite.yml | 10 +++++----- test/integration/targets/file/tasks/main.yml | 2 +- .../targets/get_url/tasks/use_netrc.yml | 4 ++-- .../targets/known_hosts/tasks/main.yml | 2 +- .../targets/lookup_fileglob/issue72873/test.yml | 2 +- .../integration/targets/lookup_url/meta/main.yml | 2 +- .../targets/lookup_url/tasks/use_netrc.yml | 2 +- .../tasks/test_different_language_var.yml | 4 ++-- .../roles/test_var_blending/tasks/main.yml | 10 +++++----- 18 files changed, 39 insertions(+), 39 deletions(-) diff --git a/changelogs/fragments/79422-fix-file-touch-check-mode-status.yaml b/changelogs/fragments/79422-fix-file-touch-check-mode-status.yaml index 757cf33e245..c44fd1edfdf 100644 --- a/changelogs/fragments/79422-fix-file-touch-check-mode-status.yaml +++ b/changelogs/fragments/79422-fix-file-touch-check-mode-status.yaml @@ -1,3 +1,3 @@ bugfixes: - - file - touch action in check mode was always returning ok. Fix now evaluates the different conditions and + - file - touch action in check mode was always returning ok. Fix now evaluates the different conditions and returns the appropriate changed status. (https://github.com/ansible/ansible/issues/79360) diff --git a/changelogs/fragments/ansible-test-container-management.yml b/changelogs/fragments/ansible-test-container-management.yml index 0d0c77ed8c3..b55cd62cd5f 100644 --- a/changelogs/fragments/ansible-test-container-management.yml +++ b/changelogs/fragments/ansible-test-container-management.yml @@ -1,5 +1,5 @@ major_changes: - - ansible-test - Docker and Podman are now supported on hosts with cgroup v2 unified. + - ansible-test - Docker and Podman are now supported on hosts with cgroup v2 unified. Previously only cgroup v1 and cgroup v2 hybrid were supported. - ansible-test - Docker Desktop on WSL2 is now supported (additional configuration required). - ansible-test - Podman on WSL2 is now supported. diff --git a/changelogs/fragments/ansible-test-payload-file-permissions.yml b/changelogs/fragments/ansible-test-payload-file-permissions.yml index e6f0fb8c53a..be0a481cb76 100644 --- a/changelogs/fragments/ansible-test-payload-file-permissions.yml +++ b/changelogs/fragments/ansible-test-payload-file-permissions.yml @@ -5,5 +5,5 @@ bugfixes: (Resolves issue https://github.com/ansible/ansible/issues/75079) breaking_changes: - ansible-test - Integration tests which depend on specific file permissions when running in an ansible-test managed - host environment may require changes. Tests that require permissions other than ``755`` or ``644`` + host environment may require changes. Tests that require permissions other than ``755`` or ``644`` may need to be updated to set the necessary permissions as part of the test run. diff --git a/changelogs/fragments/psscriptanalyzer-1.21.0.yml b/changelogs/fragments/psscriptanalyzer-1.21.0.yml index e74b3d6b83a..71d4a498f60 100644 --- a/changelogs/fragments/psscriptanalyzer-1.21.0.yml +++ b/changelogs/fragments/psscriptanalyzer-1.21.0.yml @@ -1,4 +1,4 @@ minor_changes: -- >- +- >- ansible-test pslint - Upgrade PSScriptAnalyzer to ``1.21.0`` which enables the ``AvoidMultipleTypeAttributes``, ``AvoidSemicolonsAsLineTerminators``, and ``AvoidUsingBrokenHashAlgorithms`` rules diff --git a/lib/ansible/plugins/filter/b64decode.yml b/lib/ansible/plugins/filter/b64decode.yml index 30565fa9c88..fbc0bb174bd 100644 --- a/lib/ansible/plugins/filter/b64decode.yml +++ b/lib/ansible/plugins/filter/b64decode.yml @@ -7,7 +7,7 @@ DOCUMENTATION: - Base64 decoding function. - The return value is a string. - Trying to store a binary blob in a string most likely corrupts the binary. To base64 decode a binary blob, - use the ``base64`` command and pipe the encoded data through standard input. + use the ``base64`` command and pipe the encoded data through standard input. For example, in the ansible.builtin.shell`` module, ``cmd="base64 --decode > myfile.bin" stdin="{{ encoded }}"``. positional: _input options: diff --git a/lib/ansible/plugins/filter/to_yaml.yml b/lib/ansible/plugins/filter/to_yaml.yml index 2e7be604a83..d2fc9d7e9dc 100644 --- a/lib/ansible/plugins/filter/to_yaml.yml +++ b/lib/ansible/plugins/filter/to_yaml.yml @@ -25,18 +25,18 @@ DOCUMENTATION: # TODO: find docs for these #allow_unicode: - # description: + # description: # type: bool # default: true #default_flow_style #default_style - #canonical=None, - #width=None, - #line_break=None, - #encoding=None, - #explicit_start=None, - #explicit_end=None, - #version=None, + #canonical=None, + #width=None, + #line_break=None, + #encoding=None, + #explicit_start=None, + #explicit_end=None, + #version=None, #tags=None EXAMPLES: | diff --git a/test/integration/targets/apt_key/tasks/main.yml b/test/integration/targets/apt_key/tasks/main.yml index ffb89b22fa3..7aee56a77ef 100644 --- a/test/integration/targets/apt_key/tasks/main.yml +++ b/test/integration/targets/apt_key/tasks/main.yml @@ -21,7 +21,7 @@ - import_tasks: 'apt_key_inline_data.yml' when: ansible_distribution in ('Ubuntu', 'Debian') - + - import_tasks: 'file.yml' when: ansible_distribution in ('Ubuntu', 'Debian') diff --git a/test/integration/targets/become/tasks/main.yml b/test/integration/targets/become/tasks/main.yml index 4a2ce64b2ce..c05824d712c 100644 --- a/test/integration/targets/become/tasks/main.yml +++ b/test/integration/targets/become/tasks/main.yml @@ -11,8 +11,8 @@ ansible_become_user: "{{ become_test_config.user }}" ansible_become_method: "{{ become_test_config.method }}" ansible_become_password: "{{ become_test_config.password | default(None) }}" - loop: "{{ - (become_methods | selectattr('skip', 'undefined') | list)+ + loop: "{{ + (become_methods | selectattr('skip', 'undefined') | list)+ (become_methods | selectattr('skip', 'defined') | rejectattr('skip') | list) }}" loop_control: diff --git a/test/integration/targets/check_mode/roles/test_check_mode/tasks/main.yml b/test/integration/targets/check_mode/roles/test_check_mode/tasks/main.yml index f926d144461..ce9ecbf49ae 100644 --- a/test/integration/targets/check_mode/roles/test_check_mode/tasks/main.yml +++ b/test/integration/targets/check_mode/roles/test_check_mode/tasks/main.yml @@ -25,8 +25,8 @@ register: foo - name: verify that the file was marked as changed in check mode - assert: - that: + assert: + that: - "template_result is changed" - "not foo.stat.exists" @@ -44,7 +44,7 @@ check_mode: no - name: verify that the file was not changed - assert: - that: + assert: + that: - "checkmode_disabled is changed" - "template_result2 is not changed" diff --git a/test/integration/targets/file/tasks/link_rewrite.yml b/test/integration/targets/file/tasks/link_rewrite.yml index b0e1af3ec21..2416c2ca53d 100644 --- a/test/integration/targets/file/tasks/link_rewrite.yml +++ b/test/integration/targets/file/tasks/link_rewrite.yml @@ -16,11 +16,11 @@ dest: "{{ tempdir.path }}/somelink" state: link -- stat: +- stat: path: "{{ tempdir.path }}/somelink" register: link -- stat: +- stat: path: "{{ tempdir.path }}/somefile" register: file @@ -32,12 +32,12 @@ - file: path: "{{ tempdir.path }}/somelink" mode: 0644 - -- stat: + +- stat: path: "{{ tempdir.path }}/somelink" register: link -- stat: +- stat: path: "{{ tempdir.path }}/somefile" register: file diff --git a/test/integration/targets/file/tasks/main.yml b/test/integration/targets/file/tasks/main.yml index 17b0fae68ad..8e14618118f 100644 --- a/test/integration/targets/file/tasks/main.yml +++ b/test/integration/targets/file/tasks/main.yml @@ -779,7 +779,7 @@ register: touch_result_in_check_mode_fails_not_existing_group - assert: - that: + that: - touch_result_in_check_mode_not_existing.changed - touch_result_in_check_mode_preserve_access_time.changed - touch_result_in_check_mode_change_only_mode.changed diff --git a/test/integration/targets/get_url/tasks/use_netrc.yml b/test/integration/targets/get_url/tasks/use_netrc.yml index 1acf4cdc92e..234c904ae4e 100644 --- a/test/integration/targets/get_url/tasks/use_netrc.yml +++ b/test/integration/targets/get_url/tasks/use_netrc.yml @@ -22,7 +22,7 @@ register: response_failed - name: Parse token from msg.txt - set_fact: + set_fact: token: "{{ (response_failed['content'] | b64decode | from_json).token }}" - name: assert Test Bearer authorization is failed with netrc @@ -48,7 +48,7 @@ register: response - name: Parse token from msg.txt - set_fact: + set_fact: token: "{{ (response['content'] | b64decode | from_json).token }}" - name: assert Test Bearer authorization is successfull with use_netrc=False diff --git a/test/integration/targets/known_hosts/tasks/main.yml b/test/integration/targets/known_hosts/tasks/main.yml index dc00dedd871..d5ffec4dc6d 100644 --- a/test/integration/targets/known_hosts/tasks/main.yml +++ b/test/integration/targets/known_hosts/tasks/main.yml @@ -99,7 +99,7 @@ # https://github.com/ansible/ansible/issues/78598 # test removing nonexistent host key when the other keys exist for the host - name: remove different key - known_hosts: + known_hosts: name: example.org key: "{{ example_org_ed25519_key }}" state: absent diff --git a/test/integration/targets/lookup_fileglob/issue72873/test.yml b/test/integration/targets/lookup_fileglob/issue72873/test.yml index 218ee58d903..4c1c1b1c538 100644 --- a/test/integration/targets/lookup_fileglob/issue72873/test.yml +++ b/test/integration/targets/lookup_fileglob/issue72873/test.yml @@ -5,7 +5,7 @@ dir: files tasks: - file: path='{{ dir }}' state=directory - + - file: path='setvars.bat' state=touch # in current directory! - file: path='{{ dir }}/{{ item }}' state=touch diff --git a/test/integration/targets/lookup_url/meta/main.yml b/test/integration/targets/lookup_url/meta/main.yml index 374b5fdf25f..6853708fdd7 100644 --- a/test/integration/targets/lookup_url/meta/main.yml +++ b/test/integration/targets/lookup_url/meta/main.yml @@ -1,2 +1,2 @@ -dependencies: +dependencies: - prepare_http_tests diff --git a/test/integration/targets/lookup_url/tasks/use_netrc.yml b/test/integration/targets/lookup_url/tasks/use_netrc.yml index b78d7a6fe3b..1d68b9e692c 100644 --- a/test/integration/targets/lookup_url/tasks/use_netrc.yml +++ b/test/integration/targets/lookup_url/tasks/use_netrc.yml @@ -18,7 +18,7 @@ that: - "web_data.token.find('v=' ~ 'Zm9vOmJhcg==') == -1" fail_msg: "Was expecting 'foo:bar' in base64, but received: {{ web_data }}" - success_msg: "Expected Basic authentication even Bearer headers were sent" + success_msg: "Expected Basic authentication even Bearer headers were sent" - name: test Url lookup with use_netrc=False set_fact: diff --git a/test/integration/targets/unarchive/tasks/test_different_language_var.yml b/test/integration/targets/unarchive/tasks/test_different_language_var.yml index 9eec658e7d5..32c84f4b27b 100644 --- a/test/integration/targets/unarchive/tasks/test_different_language_var.yml +++ b/test/integration/targets/unarchive/tasks/test_different_language_var.yml @@ -2,10 +2,10 @@ when: ansible_os_family == 'Debian' block: - name: install fr language pack - apt: + apt: name: language-pack-fr state: present - + - name: create our unarchive destination file: path: "{{ remote_tmp_dir }}/test-unarchive-nonascii-くらとみ-tar-gz" diff --git a/test/integration/targets/var_blending/roles/test_var_blending/tasks/main.yml b/test/integration/targets/var_blending/roles/test_var_blending/tasks/main.yml index f2b2e54a648..ef2a06e1f0d 100644 --- a/test/integration/targets/var_blending/roles/test_var_blending/tasks/main.yml +++ b/test/integration/targets/var_blending/roles/test_var_blending/tasks/main.yml @@ -1,4 +1,4 @@ -# test code +# test code # (c) 2014, Michael DeHaan # This file is part of Ansible @@ -22,7 +22,7 @@ output_dir: "{{ lookup('env', 'OUTPUT_DIR') }}" - name: deploy a template that will use variables at various levels - template: src=foo.j2 dest={{output_dir}}/foo.templated + template: src=foo.j2 dest={{output_dir}}/foo.templated register: template_result - name: copy known good into place @@ -33,9 +33,9 @@ register: diff_result - name: verify templated file matches known good - assert: - that: - - 'diff_result.stdout == ""' + assert: + that: + - 'diff_result.stdout == ""' - name: check debug variable with same name as var content debug: var=same_value_as_var_name_var