From fe6edbabdb7f3fcf62c823f582a53843286bd80d Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 17 Jan 2023 11:20:10 +0100 Subject: [PATCH 1/5] .ansible-lint: Deactivate experimental and name[template] tests The experimental tests is running several additional tests like for example to check module arg values. It fails everytime a variable is used to pass the value in. Examples: - playbooks/topology/add-topologysegments.yml:15: args[module]: value of suffix must be one of: domain, ca, domain+ca, got: {{ item.suffix }} - tests/host/test_host.yml:21: args[module]: value of ipaapi_context must be one of: server, client, got: {{ ipa_context | default(omit) }} The name template test is failing for every template use inside of a name. This is forcing to have only generic names and nothing specific in the log anymore. These two tests have been deactivated to have less overflow in the ansible-lint output. --- .ansible-lint | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.ansible-lint b/.ansible-lint index 3fde5995a7..abb18e9275 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -33,6 +33,8 @@ skip_list: - '305' # Use shell only when shell functionality is required - '306' # risky-shell-pipe - yaml # yamllint should be executed separately. + - experimental # Do not run any experimental tests + - name[template] # Allow Jinja templating inside task names use_default_rules: true From cc6a80fa88416dcb5e89c27f4f7b343790146a98 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 17 Jan 2023 11:28:27 +0100 Subject: [PATCH 2/5] .github/workflows/lint.yml: Enable ansible-lint for the whole collection The whole collection is tested with this change. Before it has been limited to the roles and plugins folder. --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c3b484fa41..b4d64066e5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: pip install "ansible-core >=2.14,<2.15" ansible-lint utils/build-galaxy-release.sh -ki cd .galaxy-build - ansible-lint roles plugins + ansible-lint yamllint: name: Verify yamllint From d7c02d13479de87ebb2fe78007f9c218b32a8495 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 17 Jan 2023 11:51:38 +0100 Subject: [PATCH 3/5] Improve jinja2 spacing: Remove space between join and () This change removes the space between join and (): "join ()" to "join()" --- tests/automember/test_automember_orphans_removed.yml | 2 +- tests/automember/test_automember_rebuilt.yml | 2 +- tests/ca-less/install_replica_without_ca.yml | 2 +- tests/ca-less/install_server_without_ca.yml | 2 +- tests/dnsrecord/env_vars.yml | 6 +++--- tests/env_freeipa_facts.yml | 2 +- ...nstall-server-with-external-ca-with-automatic-copy.yml | 2 +- .../install-server-with-external-ca-with-manual-copy.yml | 2 +- tests/hbacrule/test_hbacrule.yml | 2 +- tests/hbacrule/test_hbacrule_member_empty.yml | 2 +- tests/host/certificate/test_host_certificate.yml | 2 +- tests/host/certificate/test_hosts_certificate.yml | 2 +- tests/host/test_host.yml | 2 +- tests/host/test_host_allow_create_keytab.yml | 4 ++-- tests/host/test_host_allow_retrieve_keytab.yml | 4 ++-- tests/host/test_host_bool_params.yml | 2 +- tests/host/test_host_empty_string_params.yml | 2 +- tests/host/test_host_ipaddresses.yml | 2 +- tests/host/test_host_managedby_host.yml | 2 +- tests/host/test_host_principal.yml | 4 ++-- tests/host/test_host_random.yml | 2 +- tests/host/test_host_reverse.yml | 8 ++++---- tests/host/test_host_sshpubkey.yml | 2 +- tests/host/test_hosts.yml | 2 +- tests/host/test_hosts_managedby_host.yml | 2 +- tests/host/test_hosts_principal.yml | 4 ++-- tests/hostgroup/test_hostgroup.yml | 2 +- tests/netgroup/test_netgroup.yml | 2 +- tests/netgroup/test_netgroup_member.yml | 2 +- tests/netgroup/test_netgroup_member_absent.yml | 2 +- tests/netgroup/test_netgroup_member_case_insensitive.yml | 2 +- tests/role/env_facts.yml | 2 +- tests/service/certificate/test_service_certificate.yml | 2 +- .../test_servicedelegationrule_hostprincipal.yml | 2 +- .../test_servicedelegationtarget_hostprincipal.yml | 2 +- tests/sudorule/test_sudorule_categories.yml | 2 +- tests/sudorule/test_sudorule_single_hostnames.yml | 2 +- 37 files changed, 46 insertions(+), 46 deletions(-) diff --git a/tests/automember/test_automember_orphans_removed.yml b/tests/automember/test_automember_orphans_removed.yml index 697f78d418..33d3dc9fdb 100644 --- a/tests/automember/test_automember_orphans_removed.yml +++ b/tests/automember/test_automember_orphans_removed.yml @@ -10,7 +10,7 @@ - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | - join ('.') }}" + join('.') }}" when: ipaserver_domain is not defined # CLEANUP TEST ITEMS diff --git a/tests/automember/test_automember_rebuilt.yml b/tests/automember/test_automember_rebuilt.yml index 34b981b78a..6ac865541e 100644 --- a/tests/automember/test_automember_rebuilt.yml +++ b/tests/automember/test_automember_rebuilt.yml @@ -10,7 +10,7 @@ - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | - join ('.') }}" + join('.') }}" when: ipaserver_domain is not defined # CLEANUP TEST ITEMS diff --git a/tests/ca-less/install_replica_without_ca.yml b/tests/ca-less/install_replica_without_ca.yml index 676083129a..4e6952bb71 100644 --- a/tests/ca-less/install_replica_without_ca.yml +++ b/tests/ca-less/install_replica_without_ca.yml @@ -9,7 +9,7 @@ /bin/bash generate-certificates.sh create "{{ groups.ipareplicas[0] }}" - "{{ ipareplica_domain | default(groups.ipareplicas[0].split('.')[1:] | join ('.')) }}" + "{{ ipareplica_domain | default(groups.ipareplicas[0].split('.')[1:] | join('.')) }}" args: chdir: "{{ playbook_dir }}" diff --git a/tests/ca-less/install_server_without_ca.yml b/tests/ca-less/install_server_without_ca.yml index a29cb0c231..c5206e1aac 100644 --- a/tests/ca-less/install_server_without_ca.yml +++ b/tests/ca-less/install_server_without_ca.yml @@ -9,7 +9,7 @@ /bin/bash generate-certificates.sh create "{{ groups.ipaserver[0] }}" - "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join ('.')) }}" + "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join('.')) }}" args: chdir: "{{ playbook_dir }}" diff --git a/tests/dnsrecord/env_vars.yml b/tests/dnsrecord/env_vars.yml index dfa7a8cddb..c2e180bcc3 100644 --- a/tests/dnsrecord/env_vars.yml +++ b/tests/dnsrecord/env_vars.yml @@ -15,6 +15,6 @@ zone_ipv6_reverse: "ip6.arpa." zone_ipv6_reverse_workaround: "d.f.ip6.arpa." zone_prefix_reverse: "in-addr.arpa." - zone_prefix_reverse_24: "{{ ipv4_reverse.split('.')[:] | join ('.') }}.in-addr.arpa." - zone_prefix_reverse_16: "{{ ipv4_reverse.split('.')[1:] | join ('.') }}.in-addr.arpa." - zone_prefix_reverse_8: "{{ ipv4_reverse.split('.')[2:] | join ('.') }}.in-addr.arpa." + zone_prefix_reverse_24: "{{ ipv4_reverse.split('.')[:] | join('.') }}.in-addr.arpa." + zone_prefix_reverse_16: "{{ ipv4_reverse.split('.')[1:] | join('.') }}.in-addr.arpa." + zone_prefix_reverse_8: "{{ ipv4_reverse.split('.')[2:] | join('.') }}.in-addr.arpa." diff --git a/tests/env_freeipa_facts.yml b/tests/env_freeipa_facts.yml index e407c0de5f..d6f65f3b0d 100644 --- a/tests/env_freeipa_facts.yml +++ b/tests/env_freeipa_facts.yml @@ -34,7 +34,7 @@ block: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: "'fqdn' in ansible_facts" - name: Set Domain to 'ipa.test' if FQDN could not be retrieved. diff --git a/tests/external-signed-ca-with-automatic-copy/install-server-with-external-ca-with-automatic-copy.yml b/tests/external-signed-ca-with-automatic-copy/install-server-with-external-ca-with-automatic-copy.yml index 0e668a8a82..08427b2499 100644 --- a/tests/external-signed-ca-with-automatic-copy/install-server-with-external-ca-with-automatic-copy.yml +++ b/tests/external-signed-ca-with-automatic-copy/install-server-with-external-ca-with-automatic-copy.yml @@ -19,7 +19,7 @@ /bin/bash external-ca.sh "{{ groups.ipaserver[0] }}" - "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join ('.')) }}" + "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join('.')) }}" args: chdir: "{{ playbook_dir }}" diff --git a/tests/external-signed-ca-with-manual-copy/install-server-with-external-ca-with-manual-copy.yml b/tests/external-signed-ca-with-manual-copy/install-server-with-external-ca-with-manual-copy.yml index 564ea16735..39b9ac74ec 100644 --- a/tests/external-signed-ca-with-manual-copy/install-server-with-external-ca-with-manual-copy.yml +++ b/tests/external-signed-ca-with-manual-copy/install-server-with-external-ca-with-manual-copy.yml @@ -25,7 +25,7 @@ /bin/bash external-ca.sh "{{ groups.ipaserver[0] }}" - "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join ('.')) }}" + "{{ ipaserver_domain | default(groups.ipaserver[0].split('.')[1:] | join('.')) }}" args: chdir: "{{ playbook_dir }}" diff --git a/tests/hbacrule/test_hbacrule.yml b/tests/hbacrule/test_hbacrule.yml index 7699360e9c..ac12b8cf99 100644 --- a/tests/hbacrule/test_hbacrule.yml +++ b/tests/hbacrule/test_hbacrule.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined # CLEANUP TEST ITEMS diff --git a/tests/hbacrule/test_hbacrule_member_empty.yml b/tests/hbacrule/test_hbacrule_member_empty.yml index 2f0c64ef40..ce02e61d8c 100644 --- a/tests/hbacrule/test_hbacrule_member_empty.yml +++ b/tests/hbacrule/test_hbacrule_member_empty.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Test hbacrule member empty diff --git a/tests/host/certificate/test_host_certificate.yml b/tests/host/certificate/test_host_certificate.yml index 62c047e84a..33b14291c3 100644 --- a/tests/host/certificate/test_host_certificate.yml +++ b/tests/host/certificate/test_host_certificate.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Generate self-signed certificates. diff --git a/tests/host/certificate/test_hosts_certificate.yml b/tests/host/certificate/test_hosts_certificate.yml index 3e8779b1d5..dbc0263223 100644 --- a/tests/host/certificate/test_hosts_certificate.yml +++ b/tests/host/certificate/test_hosts_certificate.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Host test absent diff --git a/tests/host/test_host.yml b/tests/host/test_host.yml index ac62b71e24..f41560df8b 100644 --- a/tests/host/test_host.yml +++ b/tests/host/test_host.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host6_fqdn diff --git a/tests/host/test_host_allow_create_keytab.yml b/tests/host/test_host_allow_create_keytab.yml index ee2da2f6fb..53ceb8b030 100644 --- a/tests/host/test_host_allow_create_keytab.yml +++ b/tests/host/test_host_allow_create_keytab.yml @@ -6,12 +6,12 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get Realm from server name ansible.builtin.set_fact: - ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') | upper }}" + ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') | upper }}" when: ipaserver_realm is not defined - name: Set host1_fqdn .. host3_fqdn diff --git a/tests/host/test_host_allow_retrieve_keytab.yml b/tests/host/test_host_allow_retrieve_keytab.yml index 13af3d0165..f287d5da22 100644 --- a/tests/host/test_host_allow_retrieve_keytab.yml +++ b/tests/host/test_host_allow_retrieve_keytab.yml @@ -6,12 +6,12 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get Realm from server name ansible.builtin.set_fact: - ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') | upper }}" + ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') | upper }}" when: ipaserver_realm is not defined - name: Set host1_fqdn .. host3_fqdn diff --git a/tests/host/test_host_bool_params.yml b/tests/host/test_host_bool_params.yml index e5d4dfd03f..1c8af031a2 100644 --- a/tests/host/test_host_bool_params.yml +++ b/tests/host/test_host_bool_params.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host6_fqdn diff --git a/tests/host/test_host_empty_string_params.yml b/tests/host/test_host_empty_string_params.yml index 1103b0f82a..1e30f5e6ef 100644 --- a/tests/host/test_host_empty_string_params.yml +++ b/tests/host/test_host_empty_string_params.yml @@ -7,7 +7,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host6_fqdn diff --git a/tests/host/test_host_ipaddresses.yml b/tests/host/test_host_ipaddresses.yml index e85916178e..01d321f776 100644 --- a/tests/host/test_host_ipaddresses.yml +++ b/tests/host/test_host_ipaddresses.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host6_fqdn diff --git a/tests/host/test_host_managedby_host.yml b/tests/host/test_host_managedby_host.yml index 36551d02c4..60f97990b9 100644 --- a/tests/host/test_host_managedby_host.yml +++ b/tests/host/test_host_managedby_host.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host2_fqdn diff --git a/tests/host/test_host_principal.yml b/tests/host/test_host_principal.yml index 1f6dbb1515..d8ef243dcc 100644 --- a/tests/host/test_host_principal.yml +++ b/tests/host/test_host_principal.yml @@ -6,12 +6,12 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get Realm from server name ansible.builtin.set_fact: - ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') | upper }}" + ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') | upper }}" when: ipaserver_realm is not defined - name: Set host1_fqdn diff --git a/tests/host/test_host_random.yml b/tests/host/test_host_random.yml index 1f49b43e0c..17692167fd 100644 --- a/tests/host/test_host_random.yml +++ b/tests/host/test_host_random.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn and host2_fqdn diff --git a/tests/host/test_host_reverse.yml b/tests/host/test_host_reverse.yml index 27c6432872..1b05d071ca 100644 --- a/tests/host/test_host_reverse.yml +++ b/tests/host/test_host_reverse.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn @@ -31,9 +31,9 @@ zone_ipv6_reverse: "ip6.arpa." zone_ipv6_reverse_workaround: "d.f.ip6.arpa." zone_prefix_reverse: "in-addr.arpa" - zone_prefix_reverse_8: "{{ ipv4_prefix.split('.')[2::-1] | join ('.') }}.in-addr.arpa" - zone_prefix_reverse_16: "{{ ipv4_prefix.split('.')[1::-1] | join ('.') }}.in-addr.arpa" - zone_prefix_reverse_24: "{{ ipv4_prefix.split('.')[::-1] | join ('.') }}.in-addr.arpa" + zone_prefix_reverse_8: "{{ ipv4_prefix.split('.')[2::-1] | join('.') }}.in-addr.arpa" + zone_prefix_reverse_16: "{{ ipv4_prefix.split('.')[1::-1] | join('.') }}.in-addr.arpa" + zone_prefix_reverse_24: "{{ ipv4_prefix.split('.')[::-1] | join('.') }}.in-addr.arpa" - name: Set zone for reverse address. ipadnszone: diff --git a/tests/host/test_host_sshpubkey.yml b/tests/host/test_host_sshpubkey.yml index 7bf0da164f..388a22a81c 100644 --- a/tests/host/test_host_sshpubkey.yml +++ b/tests/host/test_host_sshpubkey.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn diff --git a/tests/host/test_hosts.yml b/tests/host/test_hosts.yml index d462bd47e8..80a94824e2 100644 --- a/tests/host/test_hosts.yml +++ b/tests/host/test_hosts.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host6_fqdn diff --git a/tests/host/test_hosts_managedby_host.yml b/tests/host/test_hosts_managedby_host.yml index ec0208a528..3ce62731a8 100644 --- a/tests/host/test_hosts_managedby_host.yml +++ b/tests/host/test_hosts_managedby_host.yml @@ -6,7 +6,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host5_fqdn diff --git a/tests/host/test_hosts_principal.yml b/tests/host/test_hosts_principal.yml index 77fee9e3a5..3df584f60c 100644 --- a/tests/host/test_hosts_principal.yml +++ b/tests/host/test_hosts_principal.yml @@ -6,12 +6,12 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get Realm from server name ansible.builtin.set_fact: - ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') | upper }}" + ipaserver_realm: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') | upper }}" when: ipaserver_realm is not defined - name: Set host1_fqdn .. host2_fqdn diff --git a/tests/hostgroup/test_hostgroup.yml b/tests/hostgroup/test_hostgroup.yml index b667d56ad6..c71a96d57d 100644 --- a/tests/hostgroup/test_hostgroup.yml +++ b/tests/hostgroup/test_hostgroup.yml @@ -7,7 +7,7 @@ tasks: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Ensure host-group databases, mysql-server and oracle-server are absent diff --git a/tests/netgroup/test_netgroup.yml b/tests/netgroup/test_netgroup.yml index 4802bd482b..daf2b660aa 100644 --- a/tests/netgroup/test_netgroup.yml +++ b/tests/netgroup/test_netgroup.yml @@ -29,7 +29,7 @@ # CREATE TEST ITEMS - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Ensure netgroup my_netgroup2 is present diff --git a/tests/netgroup/test_netgroup_member.yml b/tests/netgroup/test_netgroup_member.yml index 20cde4721a..453564bbda 100644 --- a/tests/netgroup/test_netgroup_member.yml +++ b/tests/netgroup/test_netgroup_member.yml @@ -9,7 +9,7 @@ block: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host2_fqdn diff --git a/tests/netgroup/test_netgroup_member_absent.yml b/tests/netgroup/test_netgroup_member_absent.yml index 9ee1d13d79..45aa71ed02 100644 --- a/tests/netgroup/test_netgroup_member_absent.yml +++ b/tests/netgroup/test_netgroup_member_absent.yml @@ -9,7 +9,7 @@ block: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Set host1_fqdn .. host2_fqdn diff --git a/tests/netgroup/test_netgroup_member_case_insensitive.yml b/tests/netgroup/test_netgroup_member_case_insensitive.yml index 4a1aa91061..e98100fef5 100644 --- a/tests/netgroup/test_netgroup_member_case_insensitive.yml +++ b/tests/netgroup/test_netgroup_member_case_insensitive.yml @@ -18,7 +18,7 @@ # SETUP - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Ensure test groups exist. diff --git a/tests/role/env_facts.yml b/tests/role/env_facts.yml index ee48608f6e..87c2774366 100644 --- a/tests/role/env_facts.yml +++ b/tests/role/env_facts.yml @@ -3,7 +3,7 @@ block: - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: "'fqdn' in ansible_facts" - name: Set Domain to 'ipa.test' if FQDN could not be retrieved. ansible.builtin.set_fact: diff --git a/tests/service/certificate/test_service_certificate.yml b/tests/service/certificate/test_service_certificate.yml index 2eb207db1d..d5ab12faba 100644 --- a/tests/service/certificate/test_service_certificate.yml +++ b/tests/service/certificate/test_service_certificate.yml @@ -17,7 +17,7 @@ - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get IPv4 address prefix from server node diff --git a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml index a999ba9ff9..8df4274a63 100644 --- a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml +++ b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml @@ -16,7 +16,7 @@ - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get REALM from server name diff --git a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml index 7fa033955d..111608d823 100644 --- a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml +++ b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml @@ -16,7 +16,7 @@ - name: Get Domain from server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Get REALM from server name diff --git a/tests/sudorule/test_sudorule_categories.yml b/tests/sudorule/test_sudorule_categories.yml index 5fdf24d9ef..95b94f1282 100644 --- a/tests/sudorule/test_sudorule_categories.yml +++ b/tests/sudorule/test_sudorule_categories.yml @@ -7,7 +7,7 @@ tasks: - name: Get Domain from the server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" - name: Ensure sudorules are absent ipasudorule: diff --git a/tests/sudorule/test_sudorule_single_hostnames.yml b/tests/sudorule/test_sudorule_single_hostnames.yml index 0fad2b1ecf..cc6a781928 100644 --- a/tests/sudorule/test_sudorule_single_hostnames.yml +++ b/tests/sudorule/test_sudorule_single_hostnames.yml @@ -10,7 +10,7 @@ # setup test environment - name: Get Domain from the server name ansible.builtin.set_fact: - ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" + ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" when: ipaserver_domain is not defined - name: Ensure test sudo rule is absent From d2f9fe6325f7a85c760bb5cf7d15f1e6a81cc176 Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 17 Jan 2023 12:34:49 +0100 Subject: [PATCH 4/5] Fix jinja2 white spaces issues reported by ansible-lint This replaces double spaces by single spaces, fixes spaces in slices, adds spaces before brackets and fixes bracket placing in when clauses. --- tests/group/test_group_idoverrideuser.yml | 2 +- .../test_hbacrule_member_case_insensitive.yml | 2 +- .../test_netgroup_member_case_insensitive.yml | 60 +++++++++---------- tests/permission/test_permission.yml | 8 +-- tests/pwpolicy/test_pwpolicy.yml | 10 ++-- tests/sudocmdgroup/test_sudocmdgroup.yml | 2 +- .../test_sudorule_member_case_insensitive.yml | 48 +++++++-------- tests/user/test_users_absent.yml | 2 +- tests/user/test_users_present_slice.yml | 4 +- tests/vault/test_vault_symmetric.yml | 4 +- 10 files changed, 70 insertions(+), 72 deletions(-) diff --git a/tests/group/test_group_idoverrideuser.yml b/tests/group/test_group_idoverrideuser.yml index e468b88b44..71d640a688 100644 --- a/tests/group/test_group_idoverrideuser.yml +++ b/tests/group/test_group_idoverrideuser.yml @@ -103,4 +103,4 @@ kdestroy -A -q -c idoverride_cache when: - when: ipa_version is version("4.8.7", ">=") and trust_test_is_supported | default(false) + when: ipa_version is version("4.8.7", ">=") and trust_test_is_supported | default(false) diff --git a/tests/hbacrule/test_hbacrule_member_case_insensitive.yml b/tests/hbacrule/test_hbacrule_member_case_insensitive.yml index 160f871315..e37163de78 100644 --- a/tests/hbacrule/test_hbacrule_member_case_insensitive.yml +++ b/tests/hbacrule/test_hbacrule_member_case_insensitive.yml @@ -193,7 +193,7 @@ - "{{ hbacsvc_list[0] | upper }}" - "{{ hbacsvc_list[1] | upper }}" hbacsvcgroup: - - "{{ hbacsvcgroup_list[0] | upper }}" + - "{{ hbacsvcgroup_list[0] | upper }}" register: result failed_when: result.changed or result.failed diff --git a/tests/netgroup/test_netgroup_member_case_insensitive.yml b/tests/netgroup/test_netgroup_member_case_insensitive.yml index e98100fef5..7a0968c07c 100644 --- a/tests/netgroup/test_netgroup_member_case_insensitive.yml +++ b/tests/netgroup/test_netgroup_member_case_insensitive.yml @@ -92,11 +92,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | lower }}" - host: "{{ item | lower }}.{{ ipaserver_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" - netgroup: "netgroup{{ item | lower }}" + hostgroup: "hostgroup{{ item | lower }}" + host: "{{ item | lower }}.{{ ipaserver_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" + netgroup: "netgroup{{ item | lower }}" action: member loop: "{{ groups_present }}" register: result @@ -106,11 +106,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | upper }}" - host: "{{ item | upper }}.{{ ipaserver_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" - netgroup: "netgroup{{ item | upper }}" + hostgroup: "hostgroup{{ item | upper }}" + host: "{{ item | upper }}.{{ ipaserver_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" + netgroup: "netgroup{{ item | upper }}" action: member loop: "{{ groups_present }}" register: result @@ -135,11 +135,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | lower }}" - host: "{{ item | lower }}.{{ ipaserver_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" - netgroup: "netgroup{{ item | lower }}" + hostgroup: "hostgroup{{ item | lower }}" + host: "{{ item | lower }}.{{ ipaserver_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" + netgroup: "netgroup{{ item | lower }}" action: member state: absent loop: "{{ groups_present }}" @@ -150,11 +150,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | upper }}" - host: "{{ item | upper }}.{{ ipaserver_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" - netgroup: "netgroup{{ item | upper }}" + hostgroup: "hostgroup{{ item | upper }}" + host: "{{ item | upper }}.{{ ipaserver_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" + netgroup: "netgroup{{ item | upper }}" action: member state: absent loop: "{{ groups_present }}" @@ -165,11 +165,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | upper }}" - host: "{{ item | upper }}.{{ ipaserver_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" - netgroup: "netgroup{{ item | upper }}" + hostgroup: "hostgroup{{ item | upper }}" + host: "{{ item | upper }}.{{ ipaserver_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" + netgroup: "netgroup{{ item | upper }}" action: member loop: "{{ groups_present }}" register: result @@ -179,11 +179,11 @@ ipanetgroup: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "hostgroup{{ item | lower }}" - host: "{{ item | lower }}.{{ ipaserver_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" - netgroup: "netgroup{{ item | lower }}" + hostgroup: "hostgroup{{ item | lower }}" + host: "{{ item | lower }}.{{ ipaserver_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" + netgroup: "netgroup{{ item | lower }}" action: member loop: "{{ groups_present }}" register: result diff --git a/tests/permission/test_permission.yml b/tests/permission/test_permission.yml index 99054644ab..5b27a769fe 100644 --- a/tests/permission/test_permission.yml +++ b/tests/permission/test_permission.yml @@ -247,7 +247,7 @@ register: result failed_when: result.changed or result.failed - - name: Ensure attributes carlicense and displayname are present in permission "System{{':'}} Update DNS Entries" + - name: Ensure attributes carlicense and displayname are present in permission "System{{ ':' }} Update DNS Entries" ipapermission: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -259,7 +259,7 @@ register: result failed_when: not result.changed or result.failed - - name: Ensure attributes carlicense and displayname are present in permission "System{{':'}} Update DNS Entries" again + - name: Ensure attributes carlicense and displayname are present in permission "System{{ ':' }} Update DNS Entries" again ipapermission: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -271,7 +271,7 @@ register: result failed_when: result.changed or result.failed - - name: Ensure attributes carlicense and displayname are present in permission "System{{':'}} Update DNS Entries" + - name: Ensure attributes carlicense and displayname are present in permission "System{{ ':' }} Update DNS Entries" ipapermission: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -284,7 +284,7 @@ register: result failed_when: not result.changed or result.failed - - name: Ensure attributes carlicense and displayname are present in permission "System{{':'}} Update DNS Entries" again + - name: Ensure attributes carlicense and displayname are present in permission "System{{ ':' }} Update DNS Entries" again ipapermission: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" diff --git a/tests/pwpolicy/test_pwpolicy.yml b/tests/pwpolicy/test_pwpolicy.yml index 9d60a92c17..871406fbeb 100644 --- a/tests/pwpolicy/test_pwpolicy.yml +++ b/tests/pwpolicy/test_pwpolicy.yml @@ -176,12 +176,10 @@ minlength: "" register: result failed_when: - result.changed or ( - result.failed and not ( - "an internal error has occurred" in result.msg - or "int() argument must be" in result.msg - ) - ) + result.changed or + (result.failed and not + ("an internal error has occurred" in result.msg or + "int() argument must be" in result.msg)) when: ipa_version is version("4.9", ">=") - name: Ensure minlength is not cleared due to FreeIPA issue diff --git a/tests/sudocmdgroup/test_sudocmdgroup.yml b/tests/sudocmdgroup/test_sudocmdgroup.yml index 39f222f888..ae0441b7a7 100644 --- a/tests/sudocmdgroup/test_sudocmdgroup.yml +++ b/tests/sudocmdgroup/test_sudocmdgroup.yml @@ -88,7 +88,7 @@ KRB5CCNAME="verify_sudocmdgroup" ipa sudocmdgroup-show network --all kdestroy -A -q -c verify_sudocmdgroup register: result - failed_when: result.failed or not("/usr/sbin/ifconfig" in result.stdout and "/usr/sbin/iwlist" in result.stdout) + failed_when: result.failed or not ("/usr/sbin/ifconfig" in result.stdout and "/usr/sbin/iwlist" in result.stdout) - name: Ensure sudocmdgroup, with sudocmds, is absent ipasudocmdgroup: diff --git a/tests/sudorule/test_sudorule_member_case_insensitive.yml b/tests/sudorule/test_sudorule_member_case_insensitive.yml index 582e8204eb..cc212406a4 100644 --- a/tests/sudorule/test_sudorule_member_case_insensitive.yml +++ b/tests/sudorule/test_sudorule_member_case_insensitive.yml @@ -147,10 +147,10 @@ ipaadmin_password: SomeADMINpassword name: "{{ item }}" cmdcategory: all - hostgroup: "{{ item | lower }}" - host: "{{ item | lower }}.{{ ipa_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" + hostgroup: "{{ item | lower }}" + host: "{{ item | lower }}.{{ ipa_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" loop: "{{ groups_present }}" register: result failed_when: result.failed or result.changed @@ -160,10 +160,10 @@ ipaadmin_password: SomeADMINpassword name: "{{ item }}" cmdcategory: all - hostgroup: "{{ item | upper }}" - host: "{{ item | upper }}.{{ ipa_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" + hostgroup: "{{ item | upper }}" + host: "{{ item | upper }}.{{ ipa_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" loop: "{{ groups_present }}" register: result failed_when: result.failed or result.changed @@ -186,10 +186,10 @@ ipasudorule: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "{{ item | lower }}" - host: "{{ item | lower }}.{{ ipa_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" + hostgroup: "{{ item | lower }}" + host: "{{ item | lower }}.{{ ipa_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" action: member state: absent loop: "{{ groups_present }}" @@ -200,10 +200,10 @@ ipasudorule: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "{{ item | upper }}" - host: "{{ item | upper }}.{{ ipa_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" + hostgroup: "{{ item | upper }}" + host: "{{ item | upper }}.{{ ipa_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" action: member state: absent loop: "{{ groups_present }}" @@ -214,10 +214,10 @@ ipasudorule: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "{{ item | upper }}" - host: "{{ item | upper }}.{{ ipa_domain }}" - group: "{{ item | upper }}" - user: "user{{ item | upper }}" + hostgroup: "{{ item | upper }}" + host: "{{ item | upper }}.{{ ipa_domain }}" + group: "{{ item | upper }}" + user: "user{{ item | upper }}" action: member loop: "{{ groups_present }}" register: result @@ -227,10 +227,10 @@ ipasudorule: ipaadmin_password: SomeADMINpassword name: "{{ item }}" - hostgroup: "{{ item | lower }}" - host: "{{ item | lower }}.{{ ipa_domain }}" - group: "{{ item | lower }}" - user: "user{{ item | lower }}" + hostgroup: "{{ item | lower }}" + host: "{{ item | lower }}.{{ ipa_domain }}" + group: "{{ item | lower }}" + user: "user{{ item | lower }}" action: member loop: "{{ groups_present }}" register: result diff --git a/tests/user/test_users_absent.yml b/tests/user/test_users_absent.yml index 23670510ed..59a15feaa2 100644 --- a/tests/user/test_users_absent.yml +++ b/tests/user/test_users_absent.yml @@ -14,7 +14,7 @@ - name: Create dict with user names ansible.builtin.set_fact: - user_names: "{{ user_names | default([]) + [{ 'name': item.name }] }}" + user_names: "{{ user_names | default([]) + [{'name': item.name}] }}" loop: "{{ users }}" - name: Users absent len:{{ users | length }} diff --git a/tests/user/test_users_present_slice.yml b/tests/user/test_users_present_slice.yml index 904be415ae..c3274974d5 100644 --- a/tests/user/test_users_present_slice.yml +++ b/tests/user/test_users_present_slice.yml @@ -19,5 +19,5 @@ - name: Users present ipauser: ipaadmin_password: SomeADMINpassword - users: "{{ users[item:item+slice_size] }}" - loop: "{{ range(0,users | length, slice_size) | list }}" + users: "{{ users[item : item + slice_size] }}" + loop: "{{ range(0, users | length, slice_size) | list }}" diff --git a/tests/vault/test_vault_symmetric.yml b/tests/vault/test_vault_symmetric.yml index 89ee142482..344ea69157 100644 --- a/tests/vault/test_vault_symmetric.yml +++ b/tests/vault/test_vault_symmetric.yml @@ -267,7 +267,7 @@ salt: MTIzNDU2Nzg5MDEyMzQ1Ngo= new_password: SomeVAULTpassword register: result - failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg + failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg - name: Try to change symmetric vault salt, without providing `new_password` ipavault: @@ -276,7 +276,7 @@ salt: MTIzNDU2Nzg5MDEyMzQ1Ngo= password: SomeVAULTpassword register: result - failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg + failed_when: not result.failed and "Vault `salt` can only change when changing the password." not in result.msg - name: Try to change symmetric vault salt, using wrong password. ipavault: From 414dc06c860850fc66dcd20f63c74febbc52121d Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Tue, 17 Jan 2023 12:53:02 +0100 Subject: [PATCH 5/5] ansible-lint: All names should start with an uppercase letter --- .../config/set-ca-renewal-master-server.yml | 2 +- playbooks/dnszone/dnszone-all-params.yml | 2 +- playbooks/dnszone/dnszone-present.yml | 2 +- playbooks/trust/add-trust.yml | 2 +- playbooks/trust/del-trust.yml | 2 +- tests/automount/test_automountkey.yml | 32 +++--- tests/automount/test_automountlocation.yml | 22 ++-- tests/automount/test_automountmap.yml | 36 +++--- tests/backup_role/test_backup.yml | 8 +- tests/config/test_config.yml | 104 +++++++++--------- tests/dnsforwardzone/test_dnsforwardzone.yml | 58 +++++----- tests/group/test_group_external_members.yml | 2 +- tests/trust/test_trust.yml | 2 +- 13 files changed, 137 insertions(+), 137 deletions(-) diff --git a/playbooks/config/set-ca-renewal-master-server.yml b/playbooks/config/set-ca-renewal-master-server.yml index 5e0a1e6a10..f8187a4642 100644 --- a/playbooks/config/set-ca-renewal-master-server.yml +++ b/playbooks/config/set-ca-renewal-master-server.yml @@ -5,7 +5,7 @@ gather_facts: no tasks: - - name: set ca_renewal_master_server + - name: Set ca_renewal_master_server ipaconfig: ipaadmin_password: SomeADMINpassword ca_renewal_master_server: carenewal.example.com diff --git a/playbooks/dnszone/dnszone-all-params.yml b/playbooks/dnszone/dnszone-all-params.yml index 79747d2a97..5cba47f8b6 100644 --- a/playbooks/dnszone/dnszone-all-params.yml +++ b/playbooks/dnszone/dnszone-all-params.yml @@ -1,5 +1,5 @@ --- -- name: dnszone present +- name: All dnszone parameters hosts: ipaserver become: true diff --git a/playbooks/dnszone/dnszone-present.yml b/playbooks/dnszone/dnszone-present.yml index 04d07ba01f..9cbeff8ef8 100644 --- a/playbooks/dnszone/dnszone-present.yml +++ b/playbooks/dnszone/dnszone-present.yml @@ -1,5 +1,5 @@ --- -- name: dnszone present +- name: Dnszone present hosts: ipaserver become: true diff --git a/playbooks/trust/add-trust.yml b/playbooks/trust/add-trust.yml index 9842939a5d..83b09fe6f7 100644 --- a/playbooks/trust/add-trust.yml +++ b/playbooks/trust/add-trust.yml @@ -4,7 +4,7 @@ become: true tasks: - - name: ensure the trust is present + - name: Ensure the trust is present ipatrust: ipaadmin_password: SomeADMINpassword realm: windows.local diff --git a/playbooks/trust/del-trust.yml b/playbooks/trust/del-trust.yml index 0d0f95f143..2a27d972a7 100644 --- a/playbooks/trust/del-trust.yml +++ b/playbooks/trust/del-trust.yml @@ -4,7 +4,7 @@ become: true tasks: - - name: ensure the trust is absent + - name: Ensure the trust is absent ipatrust: ipaadmin_password: SomeADMINpassword realm: windows.local diff --git a/tests/automount/test_automountkey.yml b/tests/automount/test_automountkey.yml index 27ebf30e57..a36ef32254 100644 --- a/tests/automount/test_automountkey.yml +++ b/tests/automount/test_automountkey.yml @@ -5,18 +5,18 @@ gather_facts: no tasks: - - name: ensure test location TestLocation is present + - name: Ensure test location TestLocation is present ipaautomountlocation: ipaadmin_password: SomeADMINpassword name: TestLocation - - name: ensure test map TestMap is present + - name: Ensure test map TestMap is present ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap location: TestLocation - - name: ensure key NewKeyName is absent + - name: Ensure key NewKeyName is absent ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -24,7 +24,7 @@ key: NewKeyName state: absent - - name: ensure key TestKey is absent + - name: Ensure key TestKey is absent ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -35,7 +35,7 @@ - name: Execute Automount Key tests block: ### test the key creation, and modification - - name: ensure key TestKey is present + - name: Ensure key TestKey is present ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -46,7 +46,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure key TestKey is present again + - name: Ensure key TestKey is present again ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -58,7 +58,7 @@ failed_when: result.failed or result.changed ## modify the key - - name: ensure key TestKey information has been updated + - name: Ensure key TestKey information has been updated ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -69,7 +69,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure key TestKey information has been updated again + - name: Ensure key TestKey information has been updated again ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -81,7 +81,7 @@ failed_when: result.failed or result.changed ## modify the name - - name: ensure key TestKey has been renamed to NewKeyName + - name: Ensure key TestKey has been renamed to NewKeyName ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -92,7 +92,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure key TestKey is absent + - name: Ensure key TestKey is absent ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -102,7 +102,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure key NewKeyName is present + - name: Ensure key NewKeyName is present ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -113,7 +113,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure failure when state is renamed and newname is not set + - name: Ensure failure when state is renamed and newname is not set ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -125,7 +125,7 @@ ### cleanup after the tests always: - - name: ensure key NewKeyName is absent + - name: Ensure key NewKeyName is absent ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -133,7 +133,7 @@ key: NewKeyName state: absent - - name: ensure key TestKey is absent + - name: Ensure key TestKey is absent ipaautomountkey: ipaadmin_password: SomeADMINpassword location: TestLocation @@ -141,14 +141,14 @@ key: NewKeyName state: absent - - name: ensure map TestMap is absent + - name: Ensure map TestMap is absent ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap location: TestLocation state: absent - - name: ensure location TestLocation is absent + - name: Ensure location TestLocation is absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword name: TestLocation diff --git a/tests/automount/test_automountlocation.yml b/tests/automount/test_automountlocation.yml index 7e6c3abb97..8e652447c7 100644 --- a/tests/automount/test_automountlocation.yml +++ b/tests/automount/test_automountlocation.yml @@ -5,7 +5,7 @@ gather_facts: false tasks: - - name: ensure automountlocation TestLocations are absent before testing + - name: Ensure automountlocation TestLocations are absent before testing ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -14,7 +14,7 @@ - TestLocation_02 state: absent - - name: ensure empty automountlocation does nothing + - name: Ensure empty automountlocation does nothing ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -23,7 +23,7 @@ register: result failed_when: not result.failed or "At least one location must be provided" not in result.msg - - name: ensure empty automountlocation does nothing on absent + - name: Ensure empty automountlocation does nothing on absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -32,7 +32,7 @@ register: result failed_when: not result.failed or "At least one location must be provided" not in result.msg - - name: ensure automountlocation TestLocation is present + - name: Ensure automountlocation TestLocation is present ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -41,7 +41,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure automountlocation TestLocation is present again + - name: Ensure automountlocation TestLocation is present again ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -50,7 +50,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure automountlocation TestLocation is absent + - name: Ensure automountlocation TestLocation is absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -59,7 +59,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure automountlocation TestLocation is absent again + - name: Ensure automountlocation TestLocation is absent again ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -68,7 +68,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure a list of automountlocations are present + - name: Ensure a list of automountlocations are present ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -79,7 +79,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure a list of automountlocations exist + - name: Ensure a list of automountlocations exist ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -90,7 +90,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure a list of automountlocations are absent + - name: Ensure a list of automountlocations are absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -101,7 +101,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure multiple automountlocations are absent + - name: Ensure multiple automountlocations are absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" diff --git a/tests/automount/test_automountmap.yml b/tests/automount/test_automountmap.yml index 417c9fd4bf..1fc72acc49 100644 --- a/tests/automount/test_automountmap.yml +++ b/tests/automount/test_automountmap.yml @@ -6,7 +6,7 @@ tasks: # setup environment - - name: ensure test maps are absent + - name: Ensure test maps are absent ipaautomountmap: ipaadmin_password: SomeADMINpassword name: @@ -15,20 +15,20 @@ location: TestLocation state: absent - - name: ensure location TestLocation is absent + - name: Ensure location TestLocation is absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword name: TestLocation state: absent - - name: ensure map TestMap is absent + - name: Ensure map TestMap is absent ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap location: TestLocation state: absent - - name: ensure location TestLocation is present + - name: Ensure location TestLocation is present ipaautomountlocation: ipaadmin_password: SomeADMINpassword name: TestLocation @@ -37,7 +37,7 @@ # TESTS - name: Execute Automount Map tests block: - - name: ensure map TestMap is present + - name: Ensure map TestMap is present ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -46,7 +46,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure map TestMap is present again + - name: Ensure map TestMap is present again ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -54,7 +54,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure map TestMap has a different description + - name: Ensure map TestMap has a different description ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -63,7 +63,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure map TestMap has a different description, again + - name: Ensure map TestMap has a different description, again ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -72,7 +72,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure map TestMap has an empty description + - name: Ensure map TestMap has an empty description ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -81,7 +81,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure map TestMap has an empty description, again + - name: Ensure map TestMap has an empty description, again ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -90,7 +90,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure map TestMap is removed + - name: Ensure map TestMap is removed ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -99,7 +99,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure map TestMap has been removed + - name: Ensure map TestMap has been removed ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap @@ -108,7 +108,7 @@ register: result failed_when: result.failed or result.changed - - name: ensure map TestMap01 is present + - name: Ensure map TestMap01 is present ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap01 @@ -117,7 +117,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure map TestMap02 is present + - name: Ensure map TestMap02 is present ipaautomountmap: ipaadmin_password: SomeADMINpassword name: TestMap02 @@ -126,7 +126,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure TestMap01 and TestMap02 are both absent + - name: Ensure TestMap01 and TestMap02 are both absent ipaautomountmap: ipaadmin_password: SomeADMINpassword name: @@ -137,7 +137,7 @@ register: result failed_when: result.failed or not result.changed - - name: ensure TestMap01 and TestMap02 are both absent again + - name: Ensure TestMap01 and TestMap02 are both absent again ipaautomountmap: ipaadmin_password: SomeADMINpassword name: @@ -150,7 +150,7 @@ # CLEAN UP always: - - name: ensure test maps are absent + - name: Ensure test maps are absent ipaautomountmap: ipaadmin_password: SomeADMINpassword name: @@ -159,7 +159,7 @@ location: TestLocation state: absent - - name: ensure location TestLocation is absent + - name: Ensure location TestLocation is absent ipaautomountlocation: ipaadmin_password: SomeADMINpassword name: TestLocation diff --git a/tests/backup_role/test_backup.yml b/tests/backup_role/test_backup.yml index 9f68656f09..9bcefa1bb0 100644 --- a/tests/backup_role/test_backup.yml +++ b/tests/backup_role/test_backup.yml @@ -174,7 +174,7 @@ become: no # Copy all backups from server - - name: list all existing backups on server + - name: List all existing backups on server ansible.builtin.find: path: /var/lib/ipa/backup recurse: no @@ -305,7 +305,7 @@ become: no # Remove all backups from server - - name: list all existing backups on server + - name: List all existing backups on server ansible.builtin.find: path: /var/lib/ipa/backup recurse: no @@ -320,7 +320,7 @@ state: absent ipabackup_name: all - - name: list all existing backups on server + - name: List all existing backups on server ansible.builtin.find: path: /var/lib/ipa/backup recurse: no @@ -342,7 +342,7 @@ state: absent ipabackup_name: all - - name: list all existing backups on server + - name: List all existing backups on server ansible.builtin.find: path: /var/lib/ipa/backup recurse: no diff --git a/tests/config/test_config.yml b/tests/config/test_config.yml index 8cadafba45..ced34211ca 100644 --- a/tests/config/test_config.yml +++ b/tests/config/test_config.yml @@ -11,7 +11,7 @@ - name: Execute config tests block: # Retrieve current configuration. - - name: return current values of the global configuration options + - name: Return current values of the global configuration options ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -22,7 +22,7 @@ var: previousconfig # setup environment. - - name: create test group + - name: Create test group ipagroup: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -34,25 +34,25 @@ ipaapi_context: "{{ ipa_context | default(omit) }}" emaildomain: ipa.test - - name: set default shell to '/bin/sh' + - name: Set default shell to '/bin/sh' ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" defaultshell: /bin/sh - - name: set default group + - name: Set default group ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" defaultgroup: ipausers - - name: set default home directory + - name: Set default home directory ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" homedirectory: /home - - name: clear pac-type + - name: Clear pac-type ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -60,68 +60,68 @@ - name: Execute tests if ipa_version >= 4.8.0 block: - - name: set maxhostname to 255 + - name: Set maxhostname to 255 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" maxhostname: 255 when: ipa_version is version('4.8.0', '>=') - - name: set maxusername to 45 + - name: Set maxusername to 45 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" maxusername: 45 - - name: set pwdexpnotify to 0 + - name: Set pwdexpnotify to 0 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" pwdexpnotify: 0 - - name: set searchrecordslimit to 10 + - name: Set searchrecordslimit to 10 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" searchrecordslimit: 10 - - name: set searchtimelimit to 1 + - name: Set searchtimelimit to 1 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" searchtimelimit: 1 - - name: clear configstring + - name: Clear configstring ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" configstring: "" - - name: set configstring to AllowNThash + - name: Set configstring to AllowNThash ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" configstring: 'KDC:Disable Lockout' - - name: set selinuxusermapdefault + - name: Set selinuxusermapdefault ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" selinuxusermapdefault: "staff_u:s0-s0:c0.c1023" - - name: set selinuxusermaporder + - name: Set selinuxusermaporder ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" selinuxusermaporder: 'user_u:s0$staff_u:s0-s0:c0.c1023' - - name: set usersearch to `uid` + - name: Set usersearch to `uid` ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" usersearch: uid - - name: set groupsearch to `cn` + - name: Set groupsearch to `cn` ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -144,7 +144,7 @@ register: result failed_when: result.changed or result.failed - - name: set default shell to '/bin/someshell' + - name: Set default shell to '/bin/someshell' ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -152,7 +152,7 @@ register: result failed_when: not result.changed or result.failed - - name: set default shell to '/bin/someshell', again. + - name: Set default shell to '/bin/someshell', again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -160,7 +160,7 @@ register: result failed_when: result.changed or result.failed - - name: set default group + - name: Set default group ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -168,7 +168,7 @@ register: result failed_when: not result.changed or result.failed - - name: set default group, again + - name: Set default group, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -176,7 +176,7 @@ register: result failed_when: result.changed or result.failed - - name: set default home directory + - name: Set default home directory ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -184,7 +184,7 @@ register: result failed_when: not result.changed or result.failed - - name: set default home directory, again + - name: Set default home directory, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -192,7 +192,7 @@ register: result failed_when: result.changed or result.failed - - name: set pac-type + - name: Set pac-type ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -200,7 +200,7 @@ register: result failed_when: not result.changed or result.failed - - name: set pac-type, again. + - name: Set pac-type, again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -208,7 +208,7 @@ register: result failed_when: result.changed or result.failed - - name: set maxusername to 33 + - name: Set maxusername to 33 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -216,7 +216,7 @@ register: result failed_when: not result.changed or result.failed - - name: set maxusername to 33, again. + - name: Set maxusername to 33, again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -226,7 +226,7 @@ - name: Execute tests if ipa_version >= 4.8.0 block: - - name: set maxhostname to 77 + - name: Set maxhostname to 77 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -234,7 +234,7 @@ register: result failed_when: not result.changed or result.failed - - name: set maxhostname to 77, again + - name: Set maxhostname to 77, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -243,7 +243,7 @@ failed_when: result.changed or result.failed when: ipa_version is version('4.8.0', '>=') - - name: set pwdexpnotify to 17 + - name: Set pwdexpnotify to 17 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -251,7 +251,7 @@ register: result failed_when: not result.changed or result.failed - - name: set pwdexpnotify to 17, again + - name: Set pwdexpnotify to 17, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -259,7 +259,7 @@ register: result failed_when: result.changed or result.failed - - name: set searchrecordslimit to -1 + - name: Set searchrecordslimit to -1 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -267,7 +267,7 @@ register: result failed_when: not result.changed or result.failed - - name: set searchrecordslimit to -1, again. + - name: Set searchrecordslimit to -1, again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -275,7 +275,7 @@ register: result failed_when: result.changed or result.failed - - name: set searchtimelimit to 12345 + - name: Set searchtimelimit to 12345 ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -283,7 +283,7 @@ register: result failed_when: not result.changed or result.failed - - name: set searchtimelimit to 12345, again. + - name: Set searchtimelimit to 12345, again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -291,7 +291,7 @@ register: result failed_when: result.changed or result.failed - - name: change enable_migration + - name: Change enable_migration ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -299,7 +299,7 @@ register: result failed_when: not result.changed or result.failed - - name: change enable_migration, again + - name: Change enable_migration, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -307,7 +307,7 @@ register: result failed_when: result.changed or result.failed - - name: set configstring to AllowNThash + - name: Set configstring to AllowNThash ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -315,7 +315,7 @@ register: result failed_when: not result.changed or result.failed - - name: set configstring to AllowNThash, again. + - name: Set configstring to AllowNThash, again. ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -323,7 +323,7 @@ register: result failed_when: result.changed or result.failed - - name: set selinuxusermaporder + - name: Set selinuxusermaporder ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -331,7 +331,7 @@ register: result failed_when: not result.changed or result.failed - - name: set selinuxusermaporder, again + - name: Set selinuxusermaporder, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -339,7 +339,7 @@ register: result failed_when: result.changed or result.failed - - name: set selinuxusermapdefault + - name: Set selinuxusermapdefault ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -347,7 +347,7 @@ register: result failed_when: not result.changed or result.failed - - name: set selinuxusermapdefault, again + - name: Set selinuxusermapdefault, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -355,7 +355,7 @@ register: result failed_when: result.changed or result.failed - - name: set groupsearch to `description` + - name: Set groupsearch to `description` ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -363,7 +363,7 @@ register: result failed_when: not result.changed or result.failed - - name: set groupsearch to `gidNumber`, again + - name: Set groupsearch to `gidNumber`, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -371,7 +371,7 @@ register: result failed_when: result.changed or result.failed - - name: set usersearch to `uidNumber` + - name: Set usersearch to `uidNumber` ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -379,7 +379,7 @@ register: result failed_when: not result.changed or result.failed - - name: set usersearch to `uidNumber`, again + - name: Set usersearch to `uidNumber`, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -387,7 +387,7 @@ register: result failed_when: result.changed or result.failed - - name: reset changed fields + - name: Reset changed fields ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -416,14 +416,14 @@ - name: Execute tests if ipa_version >= 4.8.0 block: - - name: reset maxhostname + - name: Reset maxhostname ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" maxhostname: '{{ previousconfig.config.maxhostname | default(omit) }}' when: ipa_version is version('4.8.0', '>=') - - name: reset changed fields, again + - name: Reset changed fields, again ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -452,7 +452,7 @@ - name: Execute tests if ipa_version >= 4.8.0 block: - - name: reset maxhostname + - name: Reset maxhostname ipaconfig: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -492,7 +492,7 @@ always: # cleanup - - name: cleanup test group + - name: Cleanup test group ipagroup: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" diff --git a/tests/dnsforwardzone/test_dnsforwardzone.yml b/tests/dnsforwardzone/test_dnsforwardzone.yml index 260829ff57..43c0f1417c 100644 --- a/tests/dnsforwardzone/test_dnsforwardzone.yml +++ b/tests/dnsforwardzone/test_dnsforwardzone.yml @@ -5,7 +5,7 @@ gather_facts: false tasks: - - name: ensure test forwardzones are absent + - name: Ensure test forwardzones are absent ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -14,7 +14,7 @@ - newfailzone.com state: absent - - name: ensure forwardzone example.com is created + - name: Ensure forwardzone example.com is created ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -27,7 +27,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure forwardzone example.com is present again + - name: Ensure forwardzone example.com is present again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -40,7 +40,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure forwardzone example.com has two forwarders + - name: Ensure forwardzone example.com has two forwarders ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -55,7 +55,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure forwardzone example.com has one forwarder again + - name: Ensure forwardzone example.com has one forwarder again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -68,7 +68,7 @@ register: result failed_when: result.changed or result.failed - - name: skip_overlap_check can only be set on creation so change nothing + - name: Skip_overlap_check can only be set on creation so change nothing ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -81,7 +81,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure forwardzone example.com is absent. + - name: Ensure forwardzone example.com is absent. ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -90,7 +90,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure forwardzone example.com is absent, again. + - name: Ensure forwardzone example.com is absent, again. ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -99,7 +99,7 @@ register: result failed_when: result.changed or result.failed - - name: change all the things at once + - name: Change all the things at once ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -115,7 +115,7 @@ register: result failed_when: not result.changed or result.failed - - name: change zone forward policy + - name: Change zone forward policy ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -124,7 +124,7 @@ register: result failed_when: not result.changed or result.failed - - name: change zone forward policy, again + - name: Change zone forward policy, again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -133,7 +133,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure forwardzone example.com is absent. + - name: Ensure forwardzone example.com is absent. ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -142,7 +142,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure forwardzone example.com is absent, again. + - name: Ensure forwardzone example.com is absent, again. ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -151,7 +151,7 @@ register: result failed_when: result.changed or result.failed - - name: ensure forwardzone example.com is created with minimal args + - name: Ensure forwardzone example.com is created with minimal args ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -163,7 +163,7 @@ register: result failed_when: not result.changed or result.failed - - name: ensure forwardzone example.com is created with minimal args, again + - name: Ensure forwardzone example.com is created with minimal args, again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -175,7 +175,7 @@ register: result failed_when: result.changed or result.failed - - name: add a forwarder to any existing ones + - name: Add a forwarder to any existing ones ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -188,7 +188,7 @@ register: result failed_when: not result.changed or result.failed - - name: add a forwarder to any existing ones, again + - name: Add a forwarder to any existing ones, again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -201,7 +201,7 @@ register: result failed_when: result.changed or result.failed - - name: check the list of forwarders is what we expect + - name: Check the list of forwarders is what we expect ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -215,7 +215,7 @@ register: result failed_when: result.changed or result.failed - - name: remove a single forwarder + - name: Remove a single forwarder ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -227,7 +227,7 @@ register: result failed_when: not result.changed or result.failed - - name: remove a single forwarder, again + - name: Remove a single forwarder, again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -239,7 +239,7 @@ register: result failed_when: result.changed or result.failed - - name: check the list of forwarders is what we expect now + - name: Check the list of forwarders is what we expect now ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -292,7 +292,7 @@ register: result failed_when: result.changed or result.failed - - name: disable the forwarder + - name: Disable the forwarder ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -301,7 +301,7 @@ register: result failed_when: not result.changed or result.failed - - name: disable the forwarder again + - name: Disable the forwarder again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -310,7 +310,7 @@ register: result failed_when: result.changed or result.failed - - name: enable the forwarder + - name: Enable the forwarder ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -319,7 +319,7 @@ register: result failed_when: not result.changed or result.failed - - name: enable the forwarder, again + - name: Enable the forwarder, again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -328,14 +328,14 @@ register: result failed_when: result.changed or result.failed - - name: ensure forwardzone example.com is absent again + - name: Ensure forwardzone example.com is absent again ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" name: example.com state: absent - - name: try to create a new forwarder with action=member + - name: Try to create a new forwarder with action=member ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -349,7 +349,7 @@ register: result failed_when: not result.failed or "not found" not in result.msg - - name: try to create a new forwarder with disabled state + - name: Try to create a new forwarder with disabled state ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" @@ -366,7 +366,7 @@ register: result failed_when: not result.failed or "No forwarders specified" not in result.msg - - name: ensure forwardzone example.com is absent - tidy up + - name: Ensure forwardzone example.com is absent - tidy up ipadnsforwardzone: ipaadmin_password: SomeADMINpassword ipaapi_context: "{{ ipa_context | default(omit) }}" diff --git a/tests/group/test_group_external_members.yml b/tests/group/test_group_external_members.yml index 559408a83f..db926cf44e 100644 --- a/tests/group/test_group_external_members.yml +++ b/tests/group/test_group_external_members.yml @@ -1,5 +1,5 @@ --- -- name: find trust +- name: Find trust hosts: ipaserver become: true gather_facts: false diff --git a/tests/trust/test_trust.yml b/tests/trust/test_trust.yml index 2bf236f1c7..e0e6338606 100644 --- a/tests/trust/test_trust.yml +++ b/tests/trust/test_trust.yml @@ -48,7 +48,7 @@ register: result failed_when: result.failed or not result.changed - - name: check if 'ipa-ad-trust' trust exists + - name: Check if 'ipa-ad-trust' trust exists ansible.builtin.shell: | echo 'SomeADMINpassword' | kinit admin ipa trust-find