Remove and prevent trailing whitespace (#10199)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run

* Remove trailing whitespace.

* Add no-trailing-whitespace extra test.

* Re-add needed trailing whitespace.

* Remove one more trailing whitespace.
This commit is contained in:
Felix Fontein 2025-06-07 17:47:22 +02:00 committed by GitHub
parent 41f8e0bad6
commit 8bd68e7e41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
50 changed files with 119 additions and 115 deletions

View file

@ -24,6 +24,18 @@ run_no_unwanted_files = true
no_unwanted_files_module_extensions = [".py"] no_unwanted_files_module_extensions = [".py"]
no_unwanted_files_yaml_extensions = [".yml"] no_unwanted_files_yaml_extensions = [".yml"]
run_action_groups = true run_action_groups = true
run_no_trailing_whitespace = true
no_trailing_whitespace_skip_paths = [
"tests/integration/targets/iso_extract/files/test.iso",
"tests/integration/targets/java_cert/files/testpkcs.p12",
"tests/integration/targets/one_host/files/testhost/tmp/opennebula-fixtures.json.gz",
"tests/integration/targets/one_template/files/testhost/tmp/opennebula-fixtures.json.gz",
"tests/integration/targets/setup_flatpak_remote/files/repo.tar.xz",
]
no_trailing_whitespace_skip_directories = [
"tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/golden_output/",
"tests/unit/plugins/modules/interfaces_file/interfaces_file_fixtures/input/",
]
[[sessions.extra_checks.action_groups_config]] [[sessions.extra_checks.action_groups_config]]
name = "consul" name = "consul"

View file

@ -36,7 +36,7 @@ gives
result: result:
{{ tests.0.result | to_yaml(indent=2) | indent(5) }} {{ tests.0.result | to_yaml(indent=2) | indent(5) }}
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-5 are all the same: * The results of the below examples 1-5 are all the same:

View file

@ -36,7 +36,7 @@ gives
result: result:
{{ tests.0.result | to_yaml(indent=2) | indent(5) }} {{ tests.0.result | to_yaml(indent=2) | indent(5) }}
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-5 are all the same: * The results of the below examples 1-5 are all the same:

View file

@ -37,7 +37,7 @@ gives
result: result:
{{ tests.0.result | to_yaml(indent=2) | indent(5) }} {{ tests.0.result | to_yaml(indent=2) | indent(5) }}
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-3 are all the same: * The results of the below examples 1-3 are all the same:

View file

@ -44,7 +44,7 @@ gives
- {k0_x0: A0, k1_x1: B0} - {k0_x0: A0, k1_x1: B0}
- {k0_x0: A1, k1_x1: B1} - {k0_x0: A1, k1_x1: B1}
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-5 are all the same: * The results of the below examples 1-5 are all the same:

View file

@ -46,7 +46,7 @@ gives
- k2_x2: [C1] - k2_x2: [C1]
k3_x3: bar k3_x3: bar
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-5 are all the same: * The results of the below examples 1-5 are all the same:

View file

@ -53,7 +53,7 @@ gives
k2_x2: [C1] k2_x2: [C1]
k3_x3: bar k3_x3: bar
.. versionadded:: 9.1.0 .. versionadded:: 9.1.0
* The results of the below examples 1-3 are all the same: * The results of the below examples 1-3 are all the same:

View file

@ -4,7 +4,7 @@
SPDX-License-Identifier: GPL-3.0-or-later SPDX-License-Identifier: GPL-3.0-or-later
.. _ansible_collections.community.general.docsite.filter_guide.filter_guide_abstract_informations.lists_of_dicts: .. _ansible_collections.community.general.docsite.filter_guide.filter_guide_abstract_informations.lists_of_dicts:
Lists of dictionaries Lists of dictionaries
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^

View file

@ -24,7 +24,7 @@
path: "{{ manifest_path }}" path: "{{ manifest_path }}"
regexp: '^version = ".*"$' regexp: '^version = ".*"$'
line: 'version = "1.0.0"' line: 'version = "1.0.0"'
- name: Ensure package is uninstalled - name: Ensure package is uninstalled
community.general.cargo: community.general.cargo:
name: "{{ package_name }}" name: "{{ package_name }}"

View file

@ -18,7 +18,7 @@
0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg 0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg
cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc
mwIDAQAB mwIDAQAB
-----END PUBLIC KEY----- -----END PUBLIC KEY-----
- name: Create a binding rule - name: Create a binding rule
community.general.consul_binding_rule: community.general.consul_binding_rule:

View file

@ -37,4 +37,4 @@ tests:
- {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar} - {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar}
result: result:
- {k1_x1: B0, k2_x2: [C0], k3_x3: foo} - {k1_x1: B0, k2_x2: [C0], k3_x3: foo}
- {k1_x1: B1, k2_x2: [C1], k3_x3: bar} - {k1_x1: B1, k2_x2: [C1], k3_x3: bar}

View file

@ -237,7 +237,7 @@
- failure_result is failed - failure_result is failed
- > - >
"Expected a list of header names, got a string" in failure_result.msg "Expected a list of header names, got a string" in failure_result.msg
- name: Test empty data with non-dictionary column_alignments (expect failure) - name: Test empty data with non-dictionary column_alignments (expect failure)
block: block:
- set_fact: - set_fact:
@ -263,7 +263,7 @@
- failure_result is failed - failure_result is failed
- > - >
"Expected a string for column_alignments value, got a int" in failure_result.msg "Expected a string for column_alignments value, got a int" in failure_result.msg
- name: Test empty data with invalid alignment value in column_alignments (expect failure) - name: Test empty data with invalid alignment value in column_alignments (expect failure)
block: block:
- set_fact: - set_fact:

View file

@ -8,7 +8,7 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- name: validate that versions are properly sorted in a stable way - name: validate that versions are properly sorted in a stable way
assert: assert:
that: that:
- "['a-1.9.rpm', 'a-1.10-1.rpm', 'a-1.09.rpm', 'b-1.01.rpm', 'a-2.1-0.rpm', 'a-1.10-0.rpm'] | community.general.version_sort == ['a-1.9.rpm', 'a-1.09.rpm', 'a-1.10-0.rpm', 'a-1.10-1.rpm', 'a-2.1-0.rpm', 'b-1.01.rpm']" - "['a-1.9.rpm', 'a-1.10-1.rpm', 'a-1.09.rpm', 'b-1.01.rpm', 'a-2.1-0.rpm', 'a-1.10-0.rpm'] | community.general.version_sort == ['a-1.9.rpm', 'a-1.09.rpm', 'a-1.10-0.rpm', 'a-1.10-1.rpm', 'a-2.1-0.rpm', 'b-1.01.rpm']"

View file

@ -8,4 +8,4 @@ test_key_name: "ansible-test-key"
github_api_url: "https://api.github.com" github_api_url: "https://api.github.com"
enterprise_api_url: "https://github.company.com/api/v3" enterprise_api_url: "https://github.company.com/api/v3"
enterprise_api_url_trailing: "https://github.company.com/api/v3/" enterprise_api_url_trailing: "https://github.company.com/api/v3/"
test_pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTgvwjlRHZ8E1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ test@example.com" test_pubkey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDTgvwjlRHZ8E1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ test@example.com"

View file

@ -22,7 +22,7 @@
initialize_with_readme: true initialize_with_readme: true
state: present state: present
- name: Create branch {{ gitlab_branch }} - name: Create branch {{ gitlab_branch }}
community.general.gitlab_branch: community.general.gitlab_branch:
api_url: https://gitlab.com api_url: https://gitlab.com
api_token: secret_access_token api_token: secret_access_token
@ -54,12 +54,12 @@
branch: "{{ gitlab_branch }}" branch: "{{ gitlab_branch }}"
state: absent state: absent
register: delete_branch register: delete_branch
- name: Test module is idempotent - name: Test module is idempotent
assert: assert:
that: that:
- delete_branch is changed - delete_branch is changed
- name: Clean up {{ gitlab_project_name }} - name: Clean up {{ gitlab_project_name }}
gitlab_project: gitlab_project:
server_url: "{{ gitlab_host }}" server_url: "{{ gitlab_host }}"

View file

@ -8,8 +8,8 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
gitlab_api_token: gitlab_api_token:
gitlab_api_url: gitlab_api_url:
gitlab_validate_certs: false gitlab_validate_certs: false
gitlab_group_name: gitlab_group_name:
gitlab_token_name: gitlab_token_name:

View file

@ -242,7 +242,7 @@
- gitlab_group_variable_state is changed - gitlab_group_variable_state is changed
when: gitlab_premium_tests is defined when: gitlab_premium_tests is defined
- name: apply again the environment scope change - name: apply again the environment scope change
gitlab_group_variable: gitlab_group_variable:
api_url: "{{ gitlab_host }}" api_url: "{{ gitlab_host }}"
api_token: "{{ gitlab_login_token }}" api_token: "{{ gitlab_login_token }}"

View file

@ -1,4 +1,4 @@
<!-- <!--
Copyright (c) Ansible Project Copyright (c) Ansible Project
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
SPDX-License-Identifier: GPL-3.0-or-later SPDX-License-Identifier: GPL-3.0-or-later
@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
1. to run integration tests locally, I've setup a podman pod with both gitlab-ee image and the testing image 1. to run integration tests locally, I've setup a podman pod with both gitlab-ee image and the testing image
2. gitlab's related information were taken from [here](https://docs.gitlab.com/ee/install/docker.html), about the variable it needs (hostname, ports, volumes); volumes were pre-made before launching the image 2. gitlab's related information were taken from [here](https://docs.gitlab.com/ee/install/docker.html), about the variable it needs (hostname, ports, volumes); volumes were pre-made before launching the image
3. image that run integration tests is started with `podman run --rm -it --pod <pod_name> --name <image_name> --network=host --volume <path_to_git_repo>/ansible_community/community.general:<container_path_to>/workspace/ansible_collections/community/general quay.io/ansible/azure-pipelines-test-container:4.0.1` 3. image that run integration tests is started with `podman run --rm -it --pod <pod_name> --name <image_name> --network=host --volume <path_to_git_repo>/ansible_community/community.general:<container_path_to>/workspace/ansible_collections/community/general quay.io/ansible/azure-pipelines-test-container:4.0.1`
4. into the testing image, run 4. into the testing image, run
```sh ```sh
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
cd <container_path_to>/workspace/ansible_collections/community/general cd <container_path_to>/workspace/ansible_collections/community/general

View file

@ -1,4 +1,4 @@
<!-- <!--
Copyright (c) Ansible Project Copyright (c) Ansible Project
GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
SPDX-License-Identifier: GPL-3.0-or-later SPDX-License-Identifier: GPL-3.0-or-later
@ -9,7 +9,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
1. to run integration tests locally, I've setup a podman pod with both gitlab-ee image and the testing image 1. to run integration tests locally, I've setup a podman pod with both gitlab-ee image and the testing image
2. gitlab's related information were taken from [here](https://docs.gitlab.com/ee/install/docker.html), about the variable it needs (hostname, ports, volumes); volumes were pre-made before launching the image 2. gitlab's related information were taken from [here](https://docs.gitlab.com/ee/install/docker.html), about the variable it needs (hostname, ports, volumes); volumes were pre-made before launching the image
3. image that run integration tests is started with `podman run --rm -it --pod <pod_name> --name <image_name> --network=host --volume <path_to_git_repo>/ansible_community/community.general:<container_path_to>/workspace/ansible_collections/community/general quay.io/ansible/azure-pipelines-test-container:4.0.1` 3. image that run integration tests is started with `podman run --rm -it --pod <pod_name> --name <image_name> --network=host --volume <path_to_git_repo>/ansible_community/community.general:<container_path_to>/workspace/ansible_collections/community/general quay.io/ansible/azure-pipelines-test-container:4.0.1`
4. into the testing image, run 4. into the testing image, run
```sh ```sh
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
cd <container_path_to>/workspace/ansible_collections/community/general cd <container_path_to>/workspace/ansible_collections/community/general

View file

@ -8,8 +8,8 @@
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
gitlab_api_token: gitlab_api_token:
gitlab_api_url: gitlab_api_url:
gitlab_validate_certs: false gitlab_validate_certs: false
gitlab_project_name: gitlab_project_name:
gitlab_token_name: gitlab_token_name:

View file

@ -240,7 +240,7 @@
that: that:
- gitlab_project_variable_state is changed - gitlab_project_variable_state is changed
- name: apply again the environment scope change - name: apply again the environment scope change
gitlab_project_variable: gitlab_project_variable:
api_url: "{{ gitlab_host }}" api_url: "{{ gitlab_host }}"
api_token: "{{ gitlab_login_token }}" api_token: "{{ gitlab_login_token }}"
@ -255,7 +255,7 @@
assert: assert:
that: that:
- gitlab_project_variable_state is not changed - gitlab_project_variable_state is not changed
- name: purge all variables at the beginning - name: purge all variables at the beginning
gitlab_project_variable: gitlab_project_variable:
api_url: "{{ gitlab_host }}" api_url: "{{ gitlab_host }}"

View file

@ -97,10 +97,10 @@
- package_result is not changed - package_result is not changed
# This crashed on 4867eb4 - Ref: issue #9777 # This crashed on 4867eb4 - Ref: issue #9777
- name: Install cask using homelab/cask syntax - name: Install cask using homelab/cask syntax
homebrew: homebrew:
package: "homebrew/cask/{{ package_name }}" package: "homebrew/cask/{{ package_name }}"
state: present state: present
update_homebrew: false update_homebrew: false
become: true become: true
become_user: "{{ brew_stat.stat.pw_name }}" become_user: "{{ brew_stat.stat.pw_name }}"

View file

@ -273,7 +273,7 @@
skip-name skip-name
skip-name-resolve skip-name-resolve
max_connections = 500 max_connections = 500
- name: test-value 12 - Verify content of ini file is as expected - name: test-value 12 - Verify content of ini file is as expected
assert: assert:
that: that:
@ -395,7 +395,7 @@
set_fact: set_fact:
expected16: |+ expected16: |+
beverage = coke beverage = coke
content16: "{{ output_content.content | b64decode }}" content16: "{{ output_content.content | b64decode }}"
- name: test-value 16 - assert 'changed' is true and content is OK (no section) - name: test-value 16 - assert 'changed' is true and content is OK (no section)
@ -423,7 +423,7 @@
set_fact: set_fact:
expected17: |+ expected17: |+
beverage = water beverage = water
content17: "{{ output_content.content | b64decode }}" content17: "{{ output_content.content | b64decode }}"
- name: test-value 17 - assert 'changed' is true and content is OK (no section) - name: test-value 17 - assert 'changed' is true and content is OK (no section)
@ -532,14 +532,7 @@
- name: test-value 20 - set expected content and get current ini file content - name: test-value 20 - set expected content and get current ini file content
set_fact: set_fact:
expected20: |+ expected20: "\n[extensions]\nevolve = \nregress = \nimprove = \n[foobar]\nfoo = \n"
[extensions]
evolve =
regress =
improve =
[foobar]
foo =
content20: "{{ output_content.content | b64decode }}" content20: "{{ output_content.content | b64decode }}"
- name: test-value 20 - Verify content of ini file is as expected - name: test-value 20 - Verify content of ini file is as expected

View file

@ -512,7 +512,7 @@
path: "{{ output_file }}" path: "{{ output_file }}"
section: drinks section: drinks
state: absent state: absent
register: result20_remove_again register: result20_remove_again
- name: test-values 20 - read content from output file - name: test-values 20 - read content from output file
slurp: slurp:
@ -571,7 +571,7 @@
- name: test-values 22 - Create starting ini file - name: test-values 22 - Create starting ini file
copy: copy:
content: | content: |
# Some comment to test # Some comment to test
[mysqld] [mysqld]
connect_timeout = 300 connect_timeout = 300
@ -604,7 +604,7 @@
- name: test-values 22 - set expected content and get current ini file content - name: test-values 22 - set expected content and get current ini file content
set_fact: set_fact:
expected22: | expected22: |
# Some comment to test # Some comment to test
[mysqld] [mysqld]
connect_timeout = 300 connect_timeout = 300
@ -634,7 +634,7 @@
path: "{{ output_file }}" path: "{{ output_file }}"
section: section1 section: section1
option: var2 option: var2
values: values:
- foo - foo
state: present state: present
register: result23 register: result23
@ -647,7 +647,7 @@
- name: test-values 23 - set expected content and get current ini file content - name: test-values 23 - set expected content and get current ini file content
set_fact: set_fact:
expected23: | expected23: |
# Some comment to test # Some comment to test
[mysqld] [mysqld]
connect_timeout = 300 connect_timeout = 300
@ -691,7 +691,7 @@
- name: test-values 24 - set expected content and get current ini file content - name: test-values 24 - set expected content and get current ini file content
set_fact: set_fact:
expected24: | expected24: |
# Some comment to test # Some comment to test
[mysqld] [mysqld]
connect_timeout = 300 connect_timeout = 300
@ -777,7 +777,7 @@
expected26: |+ expected26: |+
beverage = water beverage = water
beverage = orange juice beverage = orange juice
content26: "{{ output_content.content | b64decode }}" content26: "{{ output_content.content | b64decode }}"
- name: test-values 26 - assert 'changed' is true and content is OK (no section) - name: test-values 26 - assert 'changed' is true and content is OK (no section)
@ -820,7 +820,7 @@
path: "{{ output_file }}" path: "{{ output_file }}"
section: drinks section: drinks
option: beverage option: beverage
values: values:
- water - water
- orange juice - orange juice
state: present state: present

View file

@ -108,7 +108,7 @@
- name: test-modify_inactive_option 3 - set expected content and get current ini file content - name: test-modify_inactive_option 3 - set expected content and get current ini file content
set_fact: set_fact:
expected3: | expected3: |
[section1] [section1]
# Uncomment the line below to enable foo # Uncomment the line below to enable foo
# foo = bar # foo = bar

View file

@ -71,5 +71,5 @@
- name: Delete line of file test02.cfg - name: Delete line of file test02.cfg
ansible.builtin.lineinfile: ansible.builtin.lineinfile:
path: "{{ test_dir }}/test02.cfg" path: "{{ test_dir }}/test02.cfg"
regexp: "test" regexp: "test"
state: absent state: absent

View file

@ -35,5 +35,5 @@
- set_fact: - set_fact:
mount_root_dir: "{{ test_dir }}/iso_mount" mount_root_dir: "{{ test_dir }}/iso_mount"
when: when:
- ansible_distribution != "MacOSX" - ansible_distribution != "MacOSX"

View file

@ -25,7 +25,7 @@
dest_iso: "{{ test_dir }}/test.iso" dest_iso: "{{ test_dir }}/test.iso"
interchange_level: 3 interchange_level: 3
- include_tasks: iso_customize.yml - include_tasks: iso_customize.yml
vars: vars:
dest_iso_name: "iso_customize.iso" dest_iso_name: "iso_customize.iso"
@ -51,7 +51,7 @@
joliet: 3 joliet: 3
vol_ident: AUTOINSTALL vol_ident: AUTOINSTALL
- include_tasks: iso_customize.yml - include_tasks: iso_customize.yml
vars: vars:
dest_iso_name: "iso_customize_joliet.iso" dest_iso_name: "iso_customize_joliet.iso"

View file

@ -73,7 +73,7 @@
that: that:
- result is changed - result is changed
# Check # Check
- name: check that nothing changed after the previous step - name: check that nothing changed after the previous step
<<: *task_parameters <<: *task_parameters
file: file:
@ -96,7 +96,7 @@
that: that:
- result is changed - result is changed
# Check # Check
- name: check that the file is deployed after the previous step - name: check that the file is deployed after the previous step
<<: *task_parameters <<: *task_parameters
file: file:
@ -131,7 +131,7 @@
that: that:
- result is not changed - result is not changed
# Check # Check
- name: check that nothing changed after the previous step - name: check that nothing changed after the previous step
<<: *task_parameters <<: *task_parameters
file: file:

View file

@ -7,4 +7,3 @@
ansible.builtin.file: ansible.builtin.file:
path: /etc/modprobe.d path: /etc/modprobe.d
state: absent state: absent

View file

@ -66,9 +66,9 @@
authenticationExecutions: authenticationExecutions:
- providerId: "idp-review-profile" - providerId: "idp-review-profile"
requirement: "REQUIRED" requirement: "REQUIRED"
authenticationConfig: authenticationConfig:
alias: "Test review profile config" alias: "Test review profile config"
config: config:
update.profile.on.first.login: "missing" update.profile.on.first.login: "missing"
- name: Create auth flow - name: Create auth flow
@ -103,7 +103,7 @@
providerId: "auth-conditional-otp-form" providerId: "auth-conditional-otp-form"
authenticationConfig: authenticationConfig:
alias: my-conditional-otp-config alias: my-conditional-otp-config
config: config:
defaultOtpOutcome: "force" defaultOtpOutcome: "force"
noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_orinale }}" noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_orinale }}"
state: present state: present
@ -140,7 +140,7 @@
providerId: "auth-conditional-otp-form" providerId: "auth-conditional-otp-form"
authenticationConfig: authenticationConfig:
alias: my-conditional-otp-config alias: my-conditional-otp-config
config: config:
defaultOtpOutcome: "force" defaultOtpOutcome: "force"
noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_modifed }}" noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_modifed }}"
state: present state: present

View file

@ -93,7 +93,7 @@
- result.end_state.type == "script-policy-2.js" - result.end_state.type == "script-policy-2.js"
- result.msg == 'Custom policy FirstCustomPolicy already exists' - result.msg == 'Custom policy FirstCustomPolicy already exists'
# Ensure that we can create multiple instances of the custom policy # Ensure that we can create multiple instances of the custom policy
- name: Create second instance of the custom policy - name: Create second instance of the custom policy
community.general.keycloak_authz_custom_policy: community.general.keycloak_authz_custom_policy:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"

View file

@ -39,7 +39,7 @@
auth_password: "{{ admin_password }}" auth_password: "{{ admin_password }}"
name: "{{ item }}" name: "{{ item }}"
realm: "{{ realm }}" realm: "{{ realm }}"
with_items: with_items:
- "{{ realm_role_admin }}" - "{{ realm_role_admin }}"
- "{{ realm_role_user }}" - "{{ realm_role_user }}"
@ -67,7 +67,7 @@
name: "{{ item }}" name: "{{ item }}"
realm: "{{ realm }}" realm: "{{ realm }}"
client_id: "{{ client_name_private }}" client_id: "{{ client_name_private }}"
with_items: with_items:
- "{{ client_role_admin }}" - "{{ client_role_admin }}"
- "{{ client_role_user }}" - "{{ client_role_user }}"
@ -124,7 +124,7 @@
that: that:
- result is not changed - result is not changed
- result.end_state | length == 2 - result.end_state | length == 2
- name: Remove Map role admin to public client - name: Remove Map role admin to public client
community.general.keycloak_client_rolescope: community.general.keycloak_client_rolescope:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"
@ -298,7 +298,7 @@
that: that:
- result is changed - result is changed
- result.end_state | length == 2 - result.end_state | length == 2
- name: Check-mode step two, check if change where applied - name: Check-mode step two, check if change where applied
community.general.keycloak_client_rolescope: community.general.keycloak_client_rolescope:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"

View file

@ -111,7 +111,7 @@
set_fact: set_fact:
myLdapId: "{{ result.components[0].id }}" myLdapId: "{{ result.components[0].id }}"
- name: Retrive ldap subcomponents info - name: Retrive ldap subcomponents info
community.general.keycloak_component_info: community.general.keycloak_component_info:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}" auth_realm: "{{ admin_realm }}"
@ -127,7 +127,7 @@
- result is not changed - result is not changed
- result.components | length > 0 - result.components | length > 0
- name: Retrive ldap subcomponents filter by name - name: Retrive ldap subcomponents filter by name
community.general.keycloak_component_info: community.general.keycloak_component_info:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}" auth_realm: "{{ admin_realm }}"
@ -145,7 +145,7 @@
- result.components | length == 1 - result.components | length == 1
- result.components[0].name == "email" - result.components[0].name == "email"
- name: Retrive ldap subcomponents filter by type - name: Retrive ldap subcomponents filter by type
community.general.keycloak_component_info: community.general.keycloak_component_info:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}" auth_realm: "{{ admin_realm }}"

View file

@ -17,10 +17,10 @@ keycloak_role_name: test
keycloak_role_description: test keycloak_role_description: test
keycloak_role_composite: true keycloak_role_composite: true
keycloak_role_composites: keycloak_role_composites:
- name: view-clients - name: view-clients
client_id: "realm-management" client_id: "realm-management"
state: present state: present
- name: query-clients - name: query-clients
client_id: "realm-management" client_id: "realm-management"
state: present state: present
- name: offline_access - name: offline_access
@ -31,10 +31,10 @@ keycloak_client_description: This is a client for testing purpose
role_state: present role_state: present
keycloak_role_composites_with_absent: keycloak_role_composites_with_absent:
- name: view-clients - name: view-clients
client_id: "realm-management" client_id: "realm-management"
state: present state: present
- name: query-clients - name: query-clients
client_id: "realm-management" client_id: "realm-management"
state: present state: present
- name: offline_access - name: offline_access

View file

@ -180,7 +180,7 @@
# parent_id: "{{ realm }}" # parent_id: "{{ realm }}"
# config: "{{ config_updated }}" # config: "{{ config_updated }}"
# register: result # register: result
# #
# - name: Assert that forced update ran correctly # - name: Assert that forced update ran correctly
# assert: # assert:
# that: # that:
@ -292,7 +292,7 @@
- name: Remove Keycloak test realm - name: Remove Keycloak test realm
community.general.keycloak_realm: community.general.keycloak_realm:
auth_keycloak_url: "{{ url }}" auth_keycloak_url: "{{ url }}"
auth_realm: "{{ admin_realm }}" auth_realm: "{{ admin_realm }}"
auth_username: "{{ admin_user }}" auth_username: "{{ admin_user }}"
auth_password: "{{ admin_password }}" auth_password: "{{ admin_password }}"

View file

@ -29,7 +29,7 @@
pvs: "{{ loop_device1 }}" pvs: "{{ loop_device1 }}"
pvresize: false pvresize: false
register: cmd_result register: cmd_result
- assert: - assert:
that: that:
- cmd_result is not changed - cmd_result is not changed
@ -50,7 +50,7 @@
pvresize: true pvresize: true
check_mode: true check_mode: true
register: cmd_result register: cmd_result
- name: Assert that the module returned the state was changed - name: Assert that the module returned the state was changed
assert: assert:
that: that:
@ -59,7 +59,7 @@
- name: Gets current vg size - name: Gets current vg size
shell: vgs -v testvg -o pv_size --noheading --units b | xargs shell: vgs -v testvg -o pv_size --noheading --units b | xargs
register: cmd_result register: cmd_result
- name: Assert the testvg size is still 33554432B - name: Assert the testvg size is still 33554432B
assert: assert:
that: that:

View file

@ -10,7 +10,7 @@
# TODO: Our current implementation does not handle SMTP authentication # TODO: Our current implementation does not handle SMTP authentication
- when: - when:
# TODO: https://github.com/ansible-collections/community.general/issues/4656 # TODO: https://github.com/ansible-collections/community.general/issues/4656
- ansible_python.version.major != 3 or ansible_python.version.minor < 12 - ansible_python.version.major != 3 or ansible_python.version.minor < 12
block: block:

View file

@ -9,6 +9,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
- include_tasks: ubuntu.yml - include_tasks: ubuntu.yml
when: when:
- ansible_distribution == 'Ubuntu' - ansible_distribution == 'Ubuntu'
- ansible_distribution_release not in ['focal', 'jammy', 'noble'] - ansible_distribution_release not in ['focal', 'jammy', 'noble']

View file

@ -36,7 +36,7 @@ job "example" {
# #
type = "service" type = "service"
# The "constraint" stanza defines additional constraints for placing this job, # The "constraint" stanza defines additional constraints for placing this job,
# in addition to any resource or driver constraints. This stanza may be placed # in addition to any resource or driver constraints. This stanza may be placed
# at the "job", "group", or "task" level, and supports variable interpolation. # at the "job", "group", or "task" level, and supports variable interpolation.

View file

@ -20,14 +20,14 @@ packages:
- postgresql-odbc - postgresql-odbc
- unixODBC - unixODBC
- unixODBC-devel - unixODBC-devel
- gcc - gcc
- gcc-c++ - gcc-c++
Debian: Debian:
- odbc-postgresql - odbc-postgresql
- unixodbc - unixodbc
- unixodbc-dev - unixodbc-dev
- gcc - gcc
- g++ - g++
Suse: Suse:
- psqlODBC - psqlODBC
- unixODBC - unixODBC

View file

@ -27,7 +27,7 @@
api_url: "{{ opennebula_url }}" api_url: "{{ opennebula_url }}"
api_username: "{{ opennebula_username }}" api_username: "{{ opennebula_username }}"
api_password: "{{ opennebula_password }}" api_password: "{{ opennebula_password }}"
ids: ids:
- 2 - 2
- 2 - 2
- 8 - 8

View file

@ -161,7 +161,7 @@
api_url: "{{ opennebula_url }}" api_url: "{{ opennebula_url }}"
api_username: "{{ opennebula_username }}" api_username: "{{ opennebula_username }}"
api_password: "{{ opennebula_password }}" api_password: "{{ opennebula_password }}"
name: name:
id: 0 id: 0
state: present state: present
register: result register: result

View file

@ -21,9 +21,9 @@
notify: cleanup redis notify: cleanup redis
- name: Create redis directories - name: Create redis directories
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
owner: "{{ redis_user[ansible_distribution] }}" owner: "{{ redis_user[ansible_distribution] }}"
group: "{{ redis_user[ansible_distribution] }}" group: "{{ redis_user[ansible_distribution] }}"
loop: loop:

View file

@ -10,6 +10,6 @@ rundeck_war_url:
"https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/\ "https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/\
rundeck-{{ rundeck_version }}.war/artifacts/rundeck-{{ rundeck_version }}.war/download" rundeck-{{ rundeck_version }}.war/artifacts/rundeck-{{ rundeck_version }}.war/download"
rundeck_cli_url: rundeck_cli_url:
"https://github.com/rundeck/rundeck-cli/releases/download/\ "https://github.com/rundeck/rundeck-cli/releases/download/\
v{{ rundeck_cli_version }}/rundeck-cli-{{ rundeck_cli_version }}-all.jar" v{{ rundeck_cli_version }}/rundeck-cli-{{ rundeck_cli_version }}-all.jar"

View file

@ -44,7 +44,7 @@
- name: Verify shutdown command is present in Alpine except systemd - name: Verify shutdown command is present in Alpine except systemd
assert: assert:
that: '"poweroff" in shutdown_result["shutdown_command"]' that: '"poweroff" in shutdown_result["shutdown_command"]'
when: when:
- "ansible_os_family == 'Alpine'" - "ansible_os_family == 'Alpine'"
- '"systemctl" not in shutdown_result["shutdown_command"]' - '"systemctl" not in shutdown_result["shutdown_command"]'
@ -52,7 +52,7 @@
- name: Verify shutdown command is present in VMKernel except systemd - name: Verify shutdown command is present in VMKernel except systemd
assert: assert:
that: '"halt" in shutdown_result["shutdown_command"]' that: '"halt" in shutdown_result["shutdown_command"]'
when: when:
- "ansible_system == 'VMKernel'" - "ansible_system == 'VMKernel'"
- '"systemctl" not in shutdown_result["shutdown_command"]' - '"systemctl" not in shutdown_result["shutdown_command"]'
@ -111,7 +111,7 @@
community.general.shutdown: community.general.shutdown:
register: shutdown_result register: shutdown_result
check_mode: true check_mode: true
when: when:
- "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18', '>=')) or (ansible_distribution == 'Debian')" - "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18', '>=')) or (ansible_distribution == 'Debian')"
- '"systemd-sysv" not in ansible_facts.packages' - '"systemd-sysv" not in ansible_facts.packages'

View file

@ -18,9 +18,9 @@
import_tasks: tests.yml import_tasks: tests.yml
when: > when: >
(ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version is version('7', '>=')) or (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version is version('7', '>=')) or
ansible_distribution == 'Fedora' or ansible_distribution == 'Fedora' or
(ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('15.04', '>=')) or (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('15.04', '>=')) or
(ansible_distribution == 'Debian' and ansible_distribution_version is version('8', '>=')) or (ansible_distribution == 'Debian' and ansible_distribution_version is version('8', '>=')) or
ansible_os_family == 'Suse' or ansible_os_family == 'Suse' or
ansible_distribution == 'Archlinux' ansible_distribution == 'Archlinux'

View file

@ -24,11 +24,11 @@ terraform_provider_upgrade: true
# list of dicts containing Terraform providers that will be tested # list of dicts containing Terraform providers that will be tested
# The null provider is a good candidate, as it's small and has no external dependencies # The null provider is a good candidate, as it's small and has no external dependencies
terraform_provider_versions: terraform_provider_versions:
- name: "null" - name: "null"
source: "hashicorp/null" source: "hashicorp/null"
version: ">=2.0.0, < 3.0.0" version: ">=2.0.0, < 3.0.0"
- name: "null" - name: "null"
source: "hashicorp/null" source: "hashicorp/null"
version: ">=3.0.0" version: ">=3.0.0"

View file

@ -431,7 +431,7 @@
- hwclock_set_local_deleted_adjtime_local.changed - hwclock_set_local_deleted_adjtime_local.changed
- hwclock_set_local_deleted_adjtime_local.diff.after.hwclock == 'local' - hwclock_set_local_deleted_adjtime_local.diff.after.hwclock == 'local'
- hwclock_set_local_deleted_adjtime_local.diff.before.hwclock == 'UTC' - hwclock_set_local_deleted_adjtime_local.diff.before.hwclock == 'UTC'
## ##
## test set hwclock with conf file deleted ## test set hwclock with conf file deleted

View file

@ -190,7 +190,7 @@
state: present state: present
- name: clean zypper RPM cache - name: clean zypper RPM cache
file: file:
name: /var/cache/zypper/RPMS name: /var/cache/zypper/RPMS
state: absent state: absent
@ -267,7 +267,7 @@
state: present state: present
- name: clean zypper RPM cache - name: clean zypper RPM cache
file: file:
name: /var/cache/zypper/RPMS name: /var/cache/zypper/RPMS
state: absent state: absent
@ -354,8 +354,8 @@
state: absent state: absent
- name: install and remove in the same run, with +- prefix - name: install and remove in the same run, with +- prefix
zypper: zypper:
name: name:
- -hello - -hello
- +metamail - +metamail
state: present state: present
@ -417,13 +417,13 @@
- name: try rm patch - name: try rm patch
zypper: zypper:
name: openSUSE-2016-128 name: openSUSE-2016-128
type: patch type: patch
state: absent state: absent
ignore_errors: true ignore_errors: true
register: zypper_patch register: zypper_patch
- assert: - assert:
that: that:
- zypper_patch is failed - zypper_patch is failed
- zypper_patch.msg.startswith('Can not remove patches.') - zypper_patch.msg.startswith('Can not remove patches.')
@ -434,7 +434,7 @@
ignore_errors: true ignore_errors: true
register: zypper_rm register: zypper_rm
- assert: - assert:
that: that:
- zypper_rm is failed - zypper_rm is failed
- zypper_rm.msg.startswith('Can not remove via URL.') - zypper_rm.msg.startswith('Can not remove via URL.')
@ -450,7 +450,7 @@
type: pattern type: pattern
state: present state: present
register: zypper_install_pattern1 register: zypper_install_pattern1
- name: install pattern update_test again - name: install pattern update_test again
zypper: zypper:
name: update_test name: update_test
@ -479,7 +479,7 @@
name: hello name: hello
state: present state: present
register: zypperin2 register: zypperin2
- assert: - assert:
that: that:
- zypperin1 is succeeded - zypperin1 is succeeded