mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
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
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:
parent
41f8e0bad6
commit
8bd68e7e41
50 changed files with 119 additions and 115 deletions
|
@ -24,6 +24,18 @@ run_no_unwanted_files = true
|
|||
no_unwanted_files_module_extensions = [".py"]
|
||||
no_unwanted_files_yaml_extensions = [".yml"]
|
||||
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]]
|
||||
name = "consul"
|
||||
|
|
|
@ -36,7 +36,7 @@ gives
|
|||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
|
|
@ -36,7 +36,7 @@ gives
|
|||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
|
|
@ -37,7 +37,7 @@ gives
|
|||
|
||||
result:
|
||||
{{ tests.0.result | to_yaml(indent=2) | indent(5) }}
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-3 are all the same:
|
||||
|
|
|
@ -44,7 +44,7 @@ gives
|
|||
- {k0_x0: A0, k1_x1: B0}
|
||||
- {k0_x0: A1, k1_x1: B1}
|
||||
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
|
|
@ -46,7 +46,7 @@ gives
|
|||
- k2_x2: [C1]
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-5 are all the same:
|
||||
|
|
|
@ -53,7 +53,7 @@ gives
|
|||
k2_x2: [C1]
|
||||
k3_x3: bar
|
||||
|
||||
|
||||
|
||||
.. versionadded:: 9.1.0
|
||||
|
||||
* The results of the below examples 1-3 are all the same:
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
.. _ansible_collections.community.general.docsite.filter_guide.filter_guide_abstract_informations.lists_of_dicts:
|
||||
|
||||
|
||||
Lists of dictionaries
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
path: "{{ manifest_path }}"
|
||||
regexp: '^version = ".*"$'
|
||||
line: 'version = "1.0.0"'
|
||||
|
||||
|
||||
- name: Ensure package is uninstalled
|
||||
community.general.cargo:
|
||||
name: "{{ package_name }}"
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
0iT9wCS0DRTXu269V264Vf/3jvredZiKRkgwlL9xNAwxXFg0x/XFw005UWVRIkdg
|
||||
cKWTjpBP2dPwVZ4WWC+9aGVd+Gyn1o0CLelf4rEjGoXbAAEgAqeGUxrcIlbjXfbc
|
||||
mwIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
-----END PUBLIC KEY-----
|
||||
|
||||
- name: Create a binding rule
|
||||
community.general.consul_binding_rule:
|
||||
|
|
|
@ -37,4 +37,4 @@ tests:
|
|||
- {k0_x0: A1, k1_x1: B1, k2_x2: [C1], k3_x3: bar}
|
||||
result:
|
||||
- {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}
|
||||
|
|
|
@ -237,7 +237,7 @@
|
|||
- failure_result is failed
|
||||
- >
|
||||
"Expected a list of header names, got a string" in failure_result.msg
|
||||
|
||||
|
||||
- name: Test empty data with non-dictionary column_alignments (expect failure)
|
||||
block:
|
||||
- set_fact:
|
||||
|
@ -263,7 +263,7 @@
|
|||
- failure_result is failed
|
||||
- >
|
||||
"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)
|
||||
block:
|
||||
- set_fact:
|
||||
|
|
|
@ -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)
|
||||
# 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:
|
||||
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']"
|
||||
|
|
|
@ -8,4 +8,4 @@ test_key_name: "ansible-test-key"
|
|||
github_api_url: "https://api.github.com"
|
||||
enterprise_api_url: "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"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
initialize_with_readme: true
|
||||
state: present
|
||||
|
||||
- name: Create branch {{ gitlab_branch }}
|
||||
- name: Create branch {{ gitlab_branch }}
|
||||
community.general.gitlab_branch:
|
||||
api_url: https://gitlab.com
|
||||
api_token: secret_access_token
|
||||
|
@ -54,12 +54,12 @@
|
|||
branch: "{{ gitlab_branch }}"
|
||||
state: absent
|
||||
register: delete_branch
|
||||
|
||||
|
||||
- name: Test module is idempotent
|
||||
assert:
|
||||
that:
|
||||
- delete_branch is changed
|
||||
|
||||
|
||||
- name: Clean up {{ gitlab_project_name }}
|
||||
gitlab_project:
|
||||
server_url: "{{ gitlab_host }}"
|
||||
|
|
|
@ -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)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
gitlab_api_token:
|
||||
gitlab_api_url:
|
||||
gitlab_api_token:
|
||||
gitlab_api_url:
|
||||
gitlab_validate_certs: false
|
||||
gitlab_group_name:
|
||||
gitlab_token_name:
|
||||
gitlab_group_name:
|
||||
gitlab_token_name:
|
||||
|
|
|
@ -242,7 +242,7 @@
|
|||
- gitlab_group_variable_state is changed
|
||||
when: gitlab_premium_tests is defined
|
||||
|
||||
- name: apply again the environment scope change
|
||||
- name: apply again the environment scope change
|
||||
gitlab_group_variable:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--
|
||||
<!--
|
||||
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)
|
||||
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
|
||||
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`
|
||||
4. into the testing image, run
|
||||
4. into the testing image, run
|
||||
```sh
|
||||
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
cd <container_path_to>/workspace/ansible_collections/community/general
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!--
|
||||
<!--
|
||||
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)
|
||||
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
|
||||
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`
|
||||
4. into the testing image, run
|
||||
4. into the testing image, run
|
||||
```sh
|
||||
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
|
||||
cd <container_path_to>/workspace/ansible_collections/community/general
|
||||
|
|
|
@ -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)
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
gitlab_api_token:
|
||||
gitlab_api_url:
|
||||
gitlab_api_token:
|
||||
gitlab_api_url:
|
||||
gitlab_validate_certs: false
|
||||
gitlab_project_name:
|
||||
gitlab_token_name:
|
||||
gitlab_project_name:
|
||||
gitlab_token_name:
|
||||
|
|
|
@ -240,7 +240,7 @@
|
|||
that:
|
||||
- gitlab_project_variable_state is changed
|
||||
|
||||
- name: apply again the environment scope change
|
||||
- name: apply again the environment scope change
|
||||
gitlab_project_variable:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
api_token: "{{ gitlab_login_token }}"
|
||||
|
@ -255,7 +255,7 @@
|
|||
assert:
|
||||
that:
|
||||
- gitlab_project_variable_state is not changed
|
||||
|
||||
|
||||
- name: purge all variables at the beginning
|
||||
gitlab_project_variable:
|
||||
api_url: "{{ gitlab_host }}"
|
||||
|
|
|
@ -97,10 +97,10 @@
|
|||
- package_result is not changed
|
||||
|
||||
# This crashed on 4867eb4 - Ref: issue #9777
|
||||
- name: Install cask using homelab/cask syntax
|
||||
homebrew:
|
||||
- name: Install cask using homelab/cask syntax
|
||||
homebrew:
|
||||
package: "homebrew/cask/{{ package_name }}"
|
||||
state: present
|
||||
update_homebrew: false
|
||||
become: true
|
||||
become: true
|
||||
become_user: "{{ brew_stat.stat.pw_name }}"
|
|
@ -273,7 +273,7 @@
|
|||
skip-name
|
||||
skip-name-resolve
|
||||
max_connections = 500
|
||||
|
||||
|
||||
- name: test-value 12 - Verify content of ini file is as expected
|
||||
assert:
|
||||
that:
|
||||
|
@ -395,7 +395,7 @@
|
|||
set_fact:
|
||||
expected16: |+
|
||||
beverage = coke
|
||||
|
||||
|
||||
content16: "{{ output_content.content | b64decode }}"
|
||||
|
||||
- name: test-value 16 - assert 'changed' is true and content is OK (no section)
|
||||
|
@ -423,7 +423,7 @@
|
|||
set_fact:
|
||||
expected17: |+
|
||||
beverage = water
|
||||
|
||||
|
||||
content17: "{{ output_content.content | b64decode }}"
|
||||
|
||||
- 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
|
||||
set_fact:
|
||||
expected20: |+
|
||||
|
||||
[extensions]
|
||||
evolve =
|
||||
regress =
|
||||
improve =
|
||||
[foobar]
|
||||
foo =
|
||||
expected20: "\n[extensions]\nevolve = \nregress = \nimprove = \n[foobar]\nfoo = \n"
|
||||
content20: "{{ output_content.content | b64decode }}"
|
||||
|
||||
- name: test-value 20 - Verify content of ini file is as expected
|
||||
|
|
|
@ -512,7 +512,7 @@
|
|||
path: "{{ output_file }}"
|
||||
section: drinks
|
||||
state: absent
|
||||
register: result20_remove_again
|
||||
register: result20_remove_again
|
||||
|
||||
- name: test-values 20 - read content from output file
|
||||
slurp:
|
||||
|
@ -571,7 +571,7 @@
|
|||
- name: test-values 22 - Create starting ini file
|
||||
copy:
|
||||
content: |
|
||||
|
||||
|
||||
# Some comment to test
|
||||
[mysqld]
|
||||
connect_timeout = 300
|
||||
|
@ -604,7 +604,7 @@
|
|||
- name: test-values 22 - set expected content and get current ini file content
|
||||
set_fact:
|
||||
expected22: |
|
||||
|
||||
|
||||
# Some comment to test
|
||||
[mysqld]
|
||||
connect_timeout = 300
|
||||
|
@ -634,7 +634,7 @@
|
|||
path: "{{ output_file }}"
|
||||
section: section1
|
||||
option: var2
|
||||
values:
|
||||
values:
|
||||
- foo
|
||||
state: present
|
||||
register: result23
|
||||
|
@ -647,7 +647,7 @@
|
|||
- name: test-values 23 - set expected content and get current ini file content
|
||||
set_fact:
|
||||
expected23: |
|
||||
|
||||
|
||||
# Some comment to test
|
||||
[mysqld]
|
||||
connect_timeout = 300
|
||||
|
@ -691,7 +691,7 @@
|
|||
- name: test-values 24 - set expected content and get current ini file content
|
||||
set_fact:
|
||||
expected24: |
|
||||
|
||||
|
||||
# Some comment to test
|
||||
[mysqld]
|
||||
connect_timeout = 300
|
||||
|
@ -777,7 +777,7 @@
|
|||
expected26: |+
|
||||
beverage = water
|
||||
beverage = orange juice
|
||||
|
||||
|
||||
content26: "{{ output_content.content | b64decode }}"
|
||||
|
||||
- name: test-values 26 - assert 'changed' is true and content is OK (no section)
|
||||
|
@ -820,7 +820,7 @@
|
|||
path: "{{ output_file }}"
|
||||
section: drinks
|
||||
option: beverage
|
||||
values:
|
||||
values:
|
||||
- water
|
||||
- orange juice
|
||||
state: present
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
- name: test-modify_inactive_option 3 - set expected content and get current ini file content
|
||||
set_fact:
|
||||
expected3: |
|
||||
|
||||
|
||||
[section1]
|
||||
# Uncomment the line below to enable foo
|
||||
# foo = bar
|
||||
|
|
|
@ -71,5 +71,5 @@
|
|||
- name: Delete line of file test02.cfg
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ test_dir }}/test02.cfg"
|
||||
regexp: "test"
|
||||
regexp: "test"
|
||||
state: absent
|
||||
|
|
|
@ -35,5 +35,5 @@
|
|||
|
||||
- set_fact:
|
||||
mount_root_dir: "{{ test_dir }}/iso_mount"
|
||||
when:
|
||||
when:
|
||||
- ansible_distribution != "MacOSX"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
dest_iso: "{{ test_dir }}/test.iso"
|
||||
interchange_level: 3
|
||||
|
||||
- include_tasks: iso_customize.yml
|
||||
- include_tasks: iso_customize.yml
|
||||
vars:
|
||||
dest_iso_name: "iso_customize.iso"
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
|||
joliet: 3
|
||||
vol_ident: AUTOINSTALL
|
||||
|
||||
- include_tasks: iso_customize.yml
|
||||
- include_tasks: iso_customize.yml
|
||||
vars:
|
||||
dest_iso_name: "iso_customize_joliet.iso"
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
that:
|
||||
- result is changed
|
||||
|
||||
# Check
|
||||
# Check
|
||||
- name: check that nothing changed after the previous step
|
||||
<<: *task_parameters
|
||||
file:
|
||||
|
@ -96,7 +96,7 @@
|
|||
that:
|
||||
- result is changed
|
||||
|
||||
# Check
|
||||
# Check
|
||||
- name: check that the file is deployed after the previous step
|
||||
<<: *task_parameters
|
||||
file:
|
||||
|
@ -131,7 +131,7 @@
|
|||
that:
|
||||
- result is not changed
|
||||
|
||||
# Check
|
||||
# Check
|
||||
- name: check that nothing changed after the previous step
|
||||
<<: *task_parameters
|
||||
file:
|
||||
|
|
|
@ -7,4 +7,3 @@
|
|||
ansible.builtin.file:
|
||||
path: /etc/modprobe.d
|
||||
state: absent
|
||||
|
|
@ -66,9 +66,9 @@
|
|||
authenticationExecutions:
|
||||
- providerId: "idp-review-profile"
|
||||
requirement: "REQUIRED"
|
||||
authenticationConfig:
|
||||
authenticationConfig:
|
||||
alias: "Test review profile config"
|
||||
config:
|
||||
config:
|
||||
update.profile.on.first.login: "missing"
|
||||
|
||||
- name: Create auth flow
|
||||
|
@ -103,7 +103,7 @@
|
|||
providerId: "auth-conditional-otp-form"
|
||||
authenticationConfig:
|
||||
alias: my-conditional-otp-config
|
||||
config:
|
||||
config:
|
||||
defaultOtpOutcome: "force"
|
||||
noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_orinale }}"
|
||||
state: present
|
||||
|
@ -140,7 +140,7 @@
|
|||
providerId: "auth-conditional-otp-form"
|
||||
authenticationConfig:
|
||||
alias: my-conditional-otp-config
|
||||
config:
|
||||
config:
|
||||
defaultOtpOutcome: "force"
|
||||
noOtpRequiredForHeaderPattern: "{{ keycloak_no_otp_required_pattern_modifed }}"
|
||||
state: present
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
- result.end_state.type == "script-policy-2.js"
|
||||
- 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
|
||||
community.general.keycloak_authz_custom_policy:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
auth_password: "{{ admin_password }}"
|
||||
name: "{{ item }}"
|
||||
realm: "{{ realm }}"
|
||||
with_items:
|
||||
with_items:
|
||||
- "{{ realm_role_admin }}"
|
||||
- "{{ realm_role_user }}"
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
name: "{{ item }}"
|
||||
realm: "{{ realm }}"
|
||||
client_id: "{{ client_name_private }}"
|
||||
with_items:
|
||||
with_items:
|
||||
- "{{ client_role_admin }}"
|
||||
- "{{ client_role_user }}"
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
|||
that:
|
||||
- result is not changed
|
||||
- result.end_state | length == 2
|
||||
|
||||
|
||||
- name: Remove Map role admin to public client
|
||||
community.general.keycloak_client_rolescope:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
|
@ -298,7 +298,7 @@
|
|||
that:
|
||||
- result is changed
|
||||
- result.end_state | length == 2
|
||||
|
||||
|
||||
- name: Check-mode step two, check if change where applied
|
||||
community.general.keycloak_client_rolescope:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
set_fact:
|
||||
myLdapId: "{{ result.components[0].id }}"
|
||||
|
||||
- name: Retrive ldap subcomponents info
|
||||
- name: Retrive ldap subcomponents info
|
||||
community.general.keycloak_component_info:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_realm: "{{ admin_realm }}"
|
||||
|
@ -127,7 +127,7 @@
|
|||
- result is not changed
|
||||
- result.components | length > 0
|
||||
|
||||
- name: Retrive ldap subcomponents filter by name
|
||||
- name: Retrive ldap subcomponents filter by name
|
||||
community.general.keycloak_component_info:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_realm: "{{ admin_realm }}"
|
||||
|
@ -145,7 +145,7 @@
|
|||
- result.components | length == 1
|
||||
- result.components[0].name == "email"
|
||||
|
||||
- name: Retrive ldap subcomponents filter by type
|
||||
- name: Retrive ldap subcomponents filter by type
|
||||
community.general.keycloak_component_info:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_realm: "{{ admin_realm }}"
|
||||
|
|
|
@ -17,10 +17,10 @@ keycloak_role_name: test
|
|||
keycloak_role_description: test
|
||||
keycloak_role_composite: true
|
||||
keycloak_role_composites:
|
||||
- name: view-clients
|
||||
- name: view-clients
|
||||
client_id: "realm-management"
|
||||
state: present
|
||||
- name: query-clients
|
||||
- name: query-clients
|
||||
client_id: "realm-management"
|
||||
state: present
|
||||
- name: offline_access
|
||||
|
@ -31,10 +31,10 @@ keycloak_client_description: This is a client for testing purpose
|
|||
role_state: present
|
||||
|
||||
keycloak_role_composites_with_absent:
|
||||
- name: view-clients
|
||||
- name: view-clients
|
||||
client_id: "realm-management"
|
||||
state: present
|
||||
- name: query-clients
|
||||
- name: query-clients
|
||||
client_id: "realm-management"
|
||||
state: present
|
||||
- name: offline_access
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
# parent_id: "{{ realm }}"
|
||||
# config: "{{ config_updated }}"
|
||||
# register: result
|
||||
#
|
||||
#
|
||||
# - name: Assert that forced update ran correctly
|
||||
# assert:
|
||||
# that:
|
||||
|
@ -292,7 +292,7 @@
|
|||
|
||||
- name: Remove Keycloak test realm
|
||||
community.general.keycloak_realm:
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_keycloak_url: "{{ url }}"
|
||||
auth_realm: "{{ admin_realm }}"
|
||||
auth_username: "{{ admin_user }}"
|
||||
auth_password: "{{ admin_password }}"
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
pvs: "{{ loop_device1 }}"
|
||||
pvresize: false
|
||||
register: cmd_result
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- cmd_result is not changed
|
||||
|
@ -50,7 +50,7 @@
|
|||
pvresize: true
|
||||
check_mode: true
|
||||
register: cmd_result
|
||||
|
||||
|
||||
- name: Assert that the module returned the state was changed
|
||||
assert:
|
||||
that:
|
||||
|
@ -59,7 +59,7 @@
|
|||
- name: Gets current vg size
|
||||
shell: vgs -v testvg -o pv_size --noheading --units b | xargs
|
||||
register: cmd_result
|
||||
|
||||
|
||||
- name: Assert the testvg size is still 33554432B
|
||||
assert:
|
||||
that:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
# TODO: Our current implementation does not handle SMTP authentication
|
||||
|
||||
- when:
|
||||
- when:
|
||||
# TODO: https://github.com/ansible-collections/community.general/issues/4656
|
||||
- ansible_python.version.major != 3 or ansible_python.version.minor < 12
|
||||
block:
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
- include_tasks: ubuntu.yml
|
||||
when:
|
||||
when:
|
||||
- ansible_distribution == 'Ubuntu'
|
||||
- ansible_distribution_release not in ['focal', 'jammy', 'noble']
|
||||
|
|
|
@ -36,7 +36,7 @@ job "example" {
|
|||
#
|
||||
type = "service"
|
||||
|
||||
|
||||
|
||||
# The "constraint" stanza defines additional constraints for placing this job,
|
||||
# in addition to any resource or driver constraints. This stanza may be placed
|
||||
# at the "job", "group", or "task" level, and supports variable interpolation.
|
||||
|
|
|
@ -20,14 +20,14 @@ packages:
|
|||
- postgresql-odbc
|
||||
- unixODBC
|
||||
- unixODBC-devel
|
||||
- gcc
|
||||
- gcc
|
||||
- gcc-c++
|
||||
Debian:
|
||||
- odbc-postgresql
|
||||
- unixodbc
|
||||
- unixodbc-dev
|
||||
- gcc
|
||||
- g++
|
||||
- gcc
|
||||
- g++
|
||||
Suse:
|
||||
- psqlODBC
|
||||
- unixODBC
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
api_url: "{{ opennebula_url }}"
|
||||
api_username: "{{ opennebula_username }}"
|
||||
api_password: "{{ opennebula_password }}"
|
||||
ids:
|
||||
ids:
|
||||
- 2
|
||||
- 2
|
||||
- 8
|
||||
|
|
|
@ -161,7 +161,7 @@
|
|||
api_url: "{{ opennebula_url }}"
|
||||
api_username: "{{ opennebula_username }}"
|
||||
api_password: "{{ opennebula_password }}"
|
||||
name:
|
||||
name:
|
||||
id: 0
|
||||
state: present
|
||||
register: result
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
notify: cleanup redis
|
||||
|
||||
- name: Create redis directories
|
||||
file:
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
state: directory
|
||||
owner: "{{ redis_user[ansible_distribution] }}"
|
||||
group: "{{ redis_user[ansible_distribution] }}"
|
||||
loop:
|
||||
|
|
|
@ -10,6 +10,6 @@ rundeck_war_url:
|
|||
"https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/\
|
||||
rundeck-{{ rundeck_version }}.war/artifacts/rundeck-{{ rundeck_version }}.war/download"
|
||||
|
||||
rundeck_cli_url:
|
||||
rundeck_cli_url:
|
||||
"https://github.com/rundeck/rundeck-cli/releases/download/\
|
||||
v{{ rundeck_cli_version }}/rundeck-cli-{{ rundeck_cli_version }}-all.jar"
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
- name: Verify shutdown command is present in Alpine except systemd
|
||||
assert:
|
||||
that: '"poweroff" in shutdown_result["shutdown_command"]'
|
||||
when:
|
||||
when:
|
||||
- "ansible_os_family == 'Alpine'"
|
||||
- '"systemctl" not in shutdown_result["shutdown_command"]'
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
|||
- name: Verify shutdown command is present in VMKernel except systemd
|
||||
assert:
|
||||
that: '"halt" in shutdown_result["shutdown_command"]'
|
||||
when:
|
||||
when:
|
||||
- "ansible_system == 'VMKernel'"
|
||||
- '"systemctl" not in shutdown_result["shutdown_command"]'
|
||||
|
||||
|
@ -111,7 +111,7 @@
|
|||
community.general.shutdown:
|
||||
register: shutdown_result
|
||||
check_mode: true
|
||||
when:
|
||||
when:
|
||||
- "(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version is version('18', '>=')) or (ansible_distribution == 'Debian')"
|
||||
- '"systemd-sysv" not in ansible_facts.packages'
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
import_tasks: tests.yml
|
||||
|
||||
when: >
|
||||
(ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version is version('7', '>=')) or
|
||||
ansible_distribution == 'Fedora' 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 in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version is version('7', '>=')) or
|
||||
ansible_distribution == 'Fedora' 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_os_family == 'Suse' or
|
||||
ansible_distribution == 'Archlinux'
|
|
@ -24,11 +24,11 @@ terraform_provider_upgrade: true
|
|||
|
||||
# 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
|
||||
terraform_provider_versions:
|
||||
- name: "null"
|
||||
terraform_provider_versions:
|
||||
- name: "null"
|
||||
source: "hashicorp/null"
|
||||
version: ">=2.0.0, < 3.0.0"
|
||||
- name: "null"
|
||||
- name: "null"
|
||||
source: "hashicorp/null"
|
||||
version: ">=3.0.0"
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@
|
|||
- hwclock_set_local_deleted_adjtime_local.changed
|
||||
- hwclock_set_local_deleted_adjtime_local.diff.after.hwclock == 'local'
|
||||
- hwclock_set_local_deleted_adjtime_local.diff.before.hwclock == 'UTC'
|
||||
|
||||
|
||||
|
||||
##
|
||||
## test set hwclock with conf file deleted
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
state: present
|
||||
|
||||
- name: clean zypper RPM cache
|
||||
file:
|
||||
file:
|
||||
name: /var/cache/zypper/RPMS
|
||||
state: absent
|
||||
|
||||
|
@ -267,7 +267,7 @@
|
|||
state: present
|
||||
|
||||
- name: clean zypper RPM cache
|
||||
file:
|
||||
file:
|
||||
name: /var/cache/zypper/RPMS
|
||||
state: absent
|
||||
|
||||
|
@ -354,8 +354,8 @@
|
|||
state: absent
|
||||
|
||||
- name: install and remove in the same run, with +- prefix
|
||||
zypper:
|
||||
name:
|
||||
zypper:
|
||||
name:
|
||||
- -hello
|
||||
- +metamail
|
||||
state: present
|
||||
|
@ -417,13 +417,13 @@
|
|||
|
||||
- name: try rm patch
|
||||
zypper:
|
||||
name: openSUSE-2016-128
|
||||
name: openSUSE-2016-128
|
||||
type: patch
|
||||
state: absent
|
||||
ignore_errors: true
|
||||
register: zypper_patch
|
||||
- assert:
|
||||
that:
|
||||
that:
|
||||
- zypper_patch is failed
|
||||
- zypper_patch.msg.startswith('Can not remove patches.')
|
||||
|
||||
|
@ -434,7 +434,7 @@
|
|||
ignore_errors: true
|
||||
register: zypper_rm
|
||||
- assert:
|
||||
that:
|
||||
that:
|
||||
- zypper_rm is failed
|
||||
- zypper_rm.msg.startswith('Can not remove via URL.')
|
||||
|
||||
|
@ -450,7 +450,7 @@
|
|||
type: pattern
|
||||
state: present
|
||||
register: zypper_install_pattern1
|
||||
|
||||
|
||||
- name: install pattern update_test again
|
||||
zypper:
|
||||
name: update_test
|
||||
|
@ -479,7 +479,7 @@
|
|||
name: hello
|
||||
state: present
|
||||
register: zypperin2
|
||||
|
||||
|
||||
- assert:
|
||||
that:
|
||||
- zypperin1 is succeeded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue