diff --git a/roles/ipabackup/tasks/backup.yml b/roles/ipabackup/tasks/backup.yml index 2b426d08667944c78ecfa51b8669a85b63349355..b2f778171f2e08405e1c3ba0e53695dcb7fb7ccf 100644 --- a/roles/ipabackup/tasks/backup.yml +++ b/roles/ipabackup/tasks/backup.yml @@ -13,7 +13,8 @@ {{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }} register: result_ipabackup -- block: +- name: Handle backup + block: - name: Get ipabackup_item from stderr or stdout output ansible.builtin.set_fact: ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}" diff --git a/roles/ipabackup/tasks/main.yml b/roles/ipabackup/tasks/main.yml index 524cd594971ca404d4c1b80f78e9cba148f6b4dd..25d8c25c225f2aab99b9ccb713760a465883298f 100644 --- a/roles/ipabackup/tasks/main.yml +++ b/roles/ipabackup/tasks/main.yml @@ -45,7 +45,8 @@ state is defined and (state == "copied" or state == "restored" or state == "absent") -- block: +- name: Get all backup names for copy to controller + block: - name: Get list of all backups on IPA server ansible.builtin.shell: find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2 @@ -62,7 +63,8 @@ state == "absent") and ipabackup_name is defined and ipabackup_name == "all" -- block: +- name: Set ipabackup_names from ipabackup_name + block: - name: Fail on ipabackup_name all ansible.builtin.fail: msg="ipabackup_name can not be all in this case" when: ipabackup_name is defined and ipabackup_name == "all" @@ -83,7 +85,8 @@ ipabackup_names: [] when: ipabackup_names is not defined and ipabackup_name is not defined -- block: +- name: Process "{{ ipabackup_names }}" + block: - name: Copy backup from IPA server ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml" vars: @@ -117,7 +120,8 @@ # Use only first item in ipabackup_names for copy to server and for restore. -- block: +- name: Process "{{ ipabackup_names[0] }}" + block: - name: Copy backup to server ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml" diff --git a/roles/ipabackup/tasks/restore.yml b/roles/ipabackup/tasks/restore.yml index 09c8a827a2d456fcd71e78c05c80fe5aa2fc1254..1a0794da556de59a507a1c9b6eec0caf9ff9d92e 100644 --- a/roles/ipabackup/tasks/restore.yml +++ b/roles/ipabackup/tasks/restore.yml @@ -52,7 +52,8 @@ ### INSTALL PACKAGES -- block: +- name: Package installation + block: - name: Ensure that IPA server packages are installed ansible.builtin.package: name: "{{ ipaserver_packages }}" @@ -80,7 +81,8 @@ ### START FIREWALLD -- block: +- name: Firewall configuration + block: - name: Ensure that firewalld is running ansible.builtin.systemd: name: firewalld diff --git a/roles/ipaclient/tasks/install.yml b/roles/ipaclient/tasks/install.yml index fa64afb6d98dcd79434c9b8d0049e000bfb71702..28998c5641dfc3b743bbba71f2835ddba927c03f 100644 --- a/roles/ipaclient/tasks/install.yml +++ b/roles/ipaclient/tasks/install.yml @@ -27,7 +27,7 @@ ipaadmin_principal: admin when: ipaadmin_principal is undefined and ipaclient_keytab is undefined -- name: Install - Configure DNS resolver Block +- name: Install - DNS resolver configuration block: - name: Install - Fail on missing ipaclient_domain and ipaserver_domain @@ -72,7 +72,8 @@ | default(ipasssd_enable_dns_updates) }}" register: result_ipaclient_test -- block: +- name: Install - Client deployment + block: - name: Install - Cleanup leftover ccache ansible.builtin.file: path: "/etc/ipa/.dns_ccache" @@ -125,7 +126,8 @@ # to create a OneTime Password # If a keytab is specified in the hostent, then the hostent will be disabled # if ipaclient_use_otp is set. - - block: + - name: Install - Obtain OTP + block: - name: Install - Keytab or password is required for getting otp ansible.builtin.fail: msg: Keytab or password is required for getting otp @@ -188,14 +190,8 @@ ipaadmin_password: "{{ ipaclient_otp }}" when: ipaclient_otp is defined - - block: - # This block is executed only when - # not (not ipaclient_on_master | bool and - # not result_ipaclient_join.changed and - # not ipaclient_allow_repair | bool and - # (result_ipaclient_test_keytab.krb5_keytab_ok or - # (result_ipaclient_join.already_joined is defined and - # result_ipaclient_join.already_joined))) + - name: Install - Check keytab, principal and keytab + block: - name: Install - Check if principal and keytab are set ansible.builtin.fail: msg="Admin principal and client keytab cannot be used together" @@ -252,7 +248,16 @@ (not result_ipaclient_test_keytab.krb5_keytab_ok or ipaclient_force_join) - - block: + - name: Install - Allow repair checks + block: + # This block is executed only when + # not (not ipaclient_on_master | bool and + # not result_ipaclient_join.changed and + # not ipaclient_allow_repair | bool and + # (result_ipaclient_test_keytab.krb5_keytab_ok or + # (result_ipaclient_join.already_joined is defined and + # result_ipaclient_join.already_joined))) + - name: krb5 configuration not correct ansible.builtin.fail: msg: > @@ -275,7 +280,8 @@ (result_ipaclient_join.already_joined is defined and result_ipaclient_join.already_joined)) - - block: + - name: Install - Configuration + block: - name: Install - Configure IPA default.conf ipaclient_ipa_conf: servers: "{{ result_ipaclient_test.servers }}" diff --git a/roles/ipareplica/tasks/install.yml b/roles/ipareplica/tasks/install.yml index 1731a0f8982dcc4494014a085acf2bb054848990..798484186da0d462c98ada10a923a680bc8e5510 100644 --- a/roles/ipareplica/tasks/install.yml +++ b/roles/ipareplica/tasks/install.yml @@ -1,7 +1,8 @@ --- # tasks file for ipareplica -- block: +- name: Package installation + block: - name: Install - Ensure IPA replica packages are installed ansible.builtin.package: @@ -28,7 +29,8 @@ when: ipareplica_install_packages | bool -- block: +- name: Firewall configuration + block: - name: Firewalld service - Ensure that firewalld is running ansible.builtin.systemd: name: firewalld @@ -101,7 +103,8 @@ no_dnssec_validation: "{{ ipareplica_no_dnssec_validation }}" register: result_ipareplica_test -- block: +- name: Install - Deploy replica + block: # This block is executed only when # not ansible_check_mode and # not (result_ipareplica_test.client_already_configured is defined or diff --git a/roles/ipaserver/tasks/install.yml b/roles/ipaserver/tasks/install.yml index 70238d9ccf7bb86077b23e28d70e2d49523c5aa2..bfb5b7403d83f7ab6b9069b88a6d337e0ef53ff4 100644 --- a/roles/ipaserver/tasks/install.yml +++ b/roles/ipaserver/tasks/install.yml @@ -1,7 +1,8 @@ --- # tasks file for ipaserver -- block: +- name: Install - Package installation + block: - name: Install - Ensure that IPA server packages are installed ansible.builtin.package: name: "{{ ipaserver_packages }}" @@ -27,7 +28,8 @@ when: ipaserver_install_packages | bool -- block: +- name: Install - Firewall configuration + block: - name: Firewalld service - Ensure that firewalld is running ansible.builtin.systemd: name: firewalld @@ -51,7 +53,8 @@ when: ipaserver_setup_firewalld | bool -- ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_external_cert.yml" +- name: Include tasks "{{ role_path }}/tasks/copy_external_cert.yml" + ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_external_cert.yml" with_items: "{{ ipaserver_external_cert_files_from_controller }}" when: ipaserver_external_cert_files_from_controller is defined and ipaserver_external_cert_files_from_controller|length > 0 and @@ -127,14 +130,16 @@ ### additional ### register: result_ipaserver_test -- block: +- name: Install - Deploy server + block: # This block is executed only when # not ansible_check_mode and # not (not result_ipaserver_test.changed and # (result_ipaserver_test.client_already_configured is defined or # result_ipaserver_test.server_already_configured is defined) - - block: + - name: Install - Obtain master password + block: - name: Install - Master password creation no_log: yes ipaserver_master_password: @@ -315,7 +320,8 @@ when: result_ipaserver_setup_ca.csr_generated | bool and ipaserver_copy_csr_to_controller | bool - - block: + - name: Install - Configure services + block: - name: Install - Setup otpd ipaserver_setup_otpd: realm: "{{ result_ipaserver_test.realm }}" diff --git a/roles/ipasmartcard_client/tasks/main.yml b/roles/ipasmartcard_client/tasks/main.yml index e4a560bcb3d6dbdb57c7768bdbbf8643e2cb02ab..54ced7773c578fe5e3a5b942780820c6558b23b3 100644 --- a/roles/ipasmartcard_client/tasks/main.yml +++ b/roles/ipasmartcard_client/tasks/main.yml @@ -20,7 +20,8 @@ # If neither distro nor family is supported, try a default configuration. - "vars/default.yml" -- block: +- name: Client configuration + block: # CA CERTS @@ -99,7 +100,8 @@ # Ensure /etc/sssd/pki exists - - block: + - name: Prepare for authselect + block: - name: Ensure /etc/sssd/pki exists ansible.builtin.file: path: /etc/sssd/pki diff --git a/roles/ipasmartcard_server/tasks/main.yml b/roles/ipasmartcard_server/tasks/main.yml index c3a89a4e3ba266330328835993dd565e62748edb..6f0fa28e4b1b16f4bb25c586634c26126b18431a 100644 --- a/roles/ipasmartcard_server/tasks/main.yml +++ b/roles/ipasmartcard_server/tasks/main.yml @@ -20,7 +20,8 @@ # If neither distro nor family is supported, try a default configuration. - "vars/default.yml" -- block: +- name: Server configuration + block: # CA CERTS @@ -162,7 +163,8 @@ # HTTPD IFP - - block: + - name: Allow HTTPD ifp + block: # Allow Apache to access SSSD IFP @@ -190,7 +192,8 @@ # Ensure /etc/sssd/pki exists - - block: + - name: Prepare for authselect + block: - name: Ensure /etc/sssd/pki exists ansible.builtin.file: path: /etc/sssd/pki diff --git a/tests/automount/test_automountkey.yml b/tests/automount/test_automountkey.yml index 6ab6bebab83b0002eaa8a2f74ace4efecb3bc7a3..27ebf30e57fc48403c4ab1b4e3d7564fcf2a0878 100644 --- a/tests/automount/test_automountkey.yml +++ b/tests/automount/test_automountkey.yml @@ -32,7 +32,8 @@ key: NewKeyName state: absent - - block: + - name: Execute Automount Key tests + block: ### test the key creation, and modification - name: ensure key TestKey is present ipaautomountkey: diff --git a/tests/automount/test_automountmap.yml b/tests/automount/test_automountmap.yml index 377b3a8270405d231345fdd451626f768bfc3338..417c9fd4bf2c03fbf813d6d578e13b3ecba0667f 100644 --- a/tests/automount/test_automountmap.yml +++ b/tests/automount/test_automountmap.yml @@ -35,7 +35,8 @@ state: present # TESTS - - block: + - name: Execute Automount Map tests + block: - name: ensure map TestMap is present ipaautomountmap: ipaadmin_password: SomeADMINpassword diff --git a/tests/config/test_config.yml b/tests/config/test_config.yml index a4a841030c5258ce55fab09d0650f1ecfea1a9f4..8cadafba4579b3f9fd88dbd2caf3c3f0b0706c84 100644 --- a/tests/config/test_config.yml +++ b/tests/config/test_config.yml @@ -5,9 +5,11 @@ gather_facts: false tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - block: + - name: Execute config tests + block: # Retrieve current configuration. - name: return current values of the global configuration options ipaconfig: @@ -56,7 +58,8 @@ ipaapi_context: "{{ ipa_context | default(omit) }}" pac_type: "" - - block: + - name: Execute tests if ipa_version >= 4.8.0 + block: - name: set maxhostname to 255 ipaconfig: ipaadmin_password: SomeADMINpassword @@ -221,7 +224,8 @@ register: result failed_when: result.changed or result.failed - - block: + - name: Execute tests if ipa_version >= 4.8.0 + block: - name: set maxhostname to 77 ipaconfig: ipaadmin_password: SomeADMINpassword @@ -410,7 +414,8 @@ register: result failed_when: not result.changed or result.failed - - block: + - name: Execute tests if ipa_version >= 4.8.0 + block: - name: reset maxhostname ipaconfig: ipaadmin_password: SomeADMINpassword @@ -445,7 +450,8 @@ register: result failed_when: result.changed or result.failed - - block: + - name: Execute tests if ipa_version >= 4.8.0 + block: - name: reset maxhostname ipaconfig: ipaadmin_password: SomeADMINpassword diff --git a/tests/config/test_config_sid.yml b/tests/config/test_config_sid.yml index 5f8a1ef05c36a7fd82e4e3282e69c212f8df3500..e288f01428483e3550d2ce0055c4def7f7b743a3 100644 --- a/tests/config/test_config_sid.yml +++ b/tests/config/test_config_sid.yml @@ -18,7 +18,8 @@ register: previous # TESTS - - block: + - name: Test config sid + block: - name: Check if SID is enabled. ipaconfig: ipaadmin_password: SomeADMINpassword diff --git a/tests/dnsconfig/test_dnsconfig_forwarders_ports.yml b/tests/dnsconfig/test_dnsconfig_forwarders_ports.yml index 11c3e3962e8d0a98d0e25e6f06a0e221d0fe4d7a..162011207429bd4455ffb5f96e93c59d6978e547 100644 --- a/tests/dnsconfig/test_dnsconfig_forwarders_ports.yml +++ b/tests/dnsconfig/test_dnsconfig_forwarders_ports.yml @@ -5,7 +5,8 @@ gather_facts: no tasks: - - block: + - name: Test dnsconfig forwarders ports + block: # Setup. - name: Ensure forwarder with custom port is absent. ipadnsconfig: diff --git a/tests/env_freeipa_facts.yml b/tests/env_freeipa_facts.yml index 938efdbb0aa66ae638bfa7ad07b000720142f856..e407c0de5f7fbd84438cf407cfd9c2ed9303d51f 100644 --- a/tests/env_freeipa_facts.yml +++ b/tests/env_freeipa_facts.yml @@ -30,7 +30,8 @@ ipa_host_is_client: "{{ (output.stdout_lines[-1] == 'CLIENT') | bool }}" trust_test_is_supported: no -- block: +- name: Ensure ipaserver_domain is set + block: - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" diff --git a/tests/group/test_group.yml b/tests/group/test_group.yml index d728e45f61e82f6e88eb457cc2c4eb1bdb3a34ec..f3f1c521221c926574c74c7370267ae2193bf28e 100644 --- a/tests/group/test_group.yml +++ b/tests/group/test_group.yml @@ -6,7 +6,8 @@ tasks: # setup - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml # GET FQDN_AT_DOMAIN @@ -136,7 +137,8 @@ # service - - block: + - name: Execute tests if ipa_verison >= 4.7.0 + block: - name: Ensure service "{{ 'HTTP/' + fqdn_at_domain }}" is present in group group1 ipagroup: diff --git a/tests/group/test_group_external_members.yml b/tests/group/test_group_external_members.yml index a24958d5ddb3677b2fde7e18f5834bb05dc01a9c..559408a83fadcf1ee3e6ea0c8b63c381aad91d6f 100644 --- a/tests/group/test_group_external_members.yml +++ b/tests/group/test_group_external_members.yml @@ -6,9 +6,11 @@ tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - block: + - name: Execute group tests if trust test environment is supported + block: - name: Add nonposix group. ipagroup: diff --git a/tests/group/test_group_external_nonposix.yml b/tests/group/test_group_external_nonposix.yml index f647f7d3343d9c8beb1cfb4f62c7e9833f4ed638..83e009cfa5eef7eeff1ed5079a3e9626264e2641 100644 --- a/tests/group/test_group_external_nonposix.yml +++ b/tests/group/test_group_external_nonposix.yml @@ -204,7 +204,8 @@ # EXTERNAL MEMBER TEST (REQUIRES AD) - - block: + - name: Execute group tests if trust test environment is supported + block: - name: Ensure users testuser1, testuser2 and testuser3 are present in group externalgroup ipagroup: diff --git a/tests/group/test_group_idoverrideuser.yml b/tests/group/test_group_idoverrideuser.yml index 2dc788451e7fce21c8eb5fcf562549b9d89451b6..e468b88b446404f0c77fedfe501621239270c79c 100644 --- a/tests/group/test_group_idoverrideuser.yml +++ b/tests/group/test_group_idoverrideuser.yml @@ -9,9 +9,11 @@ ad_domain: "{{ test_ad_domain | default('ad.ipa.test') }}" tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - block: + - name: Execute tests if ipa_verison >= 4.8.7 and trust test environment is supported + block: - name: Create idoverrideuser. ansible.builtin.shell: | kinit -c idoverride_cache admin <<< SomeADMINpassword diff --git a/tests/group/test_group_membermanager.yml b/tests/group/test_group_membermanager.yml index 209301b8c601a4055361e684f11a8b119244a4f6..ecb3fe096e94d72a1fb5611efe9a64df4a443103 100644 --- a/tests/group/test_group_membermanager.yml +++ b/tests/group/test_group_membermanager.yml @@ -5,9 +5,10 @@ gather_facts: false tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - name: Tests requiring IPA version 4.8.4+ + - name: Execute tests if ipa_verison >= 4.8.4 block: - name: Ensure user manangeruser1 and manageruser2 is absent ipauser: diff --git a/tests/hbacrule/test_hbacrule_member_case_insensitive.yml b/tests/hbacrule/test_hbacrule_member_case_insensitive.yml index da47f3937a6bacc026ae00c7c091722ca4b6c81a..160f871315c7ab3d4f159e0fe3d7dddef2fbfc1a 100644 --- a/tests/hbacrule/test_hbacrule_member_case_insensitive.yml +++ b/tests/hbacrule/test_hbacrule_member_case_insensitive.yml @@ -25,9 +25,11 @@ - sVCgrOUp1 tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - block: + - name: Test hbacrule member case insensitive + block: # setup - name: Ensure test hbacrule is absent diff --git a/tests/hbacrule/test_hbacrule_member_empty.yml b/tests/hbacrule/test_hbacrule_member_empty.yml index 0238dc474bfe228981d3b4a0415ccbfe0e3d35eb..2f0c64ef40dd3cd60c7a890f398c8f740320a270 100644 --- a/tests/hbacrule/test_hbacrule_member_empty.yml +++ b/tests/hbacrule/test_hbacrule_member_empty.yml @@ -9,7 +9,8 @@ ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" when: ipaserver_domain is not defined - - block: + - name: Test hbacrule member empty + block: # SETUP: - name: Ensure test HBAC rule is absent ipahbacrule: diff --git a/tests/hbacsvcgroup/test_hbacsvcgroup_member_case_insensitive.yml b/tests/hbacsvcgroup/test_hbacsvcgroup_member_case_insensitive.yml index ca16b4bcabf10b17a71dcb4c423e3c792c6d8924..6a62c8307beabef29777a739807b5e736cfc4c4b 100644 --- a/tests/hbacsvcgroup/test_hbacsvcgroup_member_case_insensitive.yml +++ b/tests/hbacsvcgroup/test_hbacsvcgroup_member_case_insensitive.yml @@ -10,7 +10,8 @@ - SvC2 tasks: - - block: + - name: Test hbacsvcgroup member case insnsitive + block: - name: Ensure test hbacsvcgroup is absent ipahbacsvcgroup: ipaadmin_password: SomeADMINpassword diff --git a/tests/hostgroup/test_hostgroup_membermanager.yml b/tests/hostgroup/test_hostgroup_membermanager.yml index 9005cd5142af3bd9b520e1b23bf52733ba22406e..eb82b5665e587d3ac7ac6edb97df5dc41f5d2720 100644 --- a/tests/hostgroup/test_hostgroup_membermanager.yml +++ b/tests/hostgroup/test_hostgroup_membermanager.yml @@ -5,7 +5,8 @@ gather_facts: false tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - name: Tests requiring IPA version 4.8.4+ block: diff --git a/tests/hostgroup/test_hostgroup_rename.yml b/tests/hostgroup/test_hostgroup_rename.yml index d0321796b3fa262f4646431c5a6a5636c4ee37c2..5cde2705fb8c5bcf4e972d7422cc7c002b7cd917 100644 --- a/tests/hostgroup/test_hostgroup_rename.yml +++ b/tests/hostgroup/test_hostgroup_rename.yml @@ -5,7 +5,8 @@ gather_facts: false tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - name: Tests requiring IPA version 4.8.7+ block: diff --git a/tests/idrange/test_idrange.yml b/tests/idrange/test_idrange.yml index 32a3231ff85b53c1dd3b4e598831c2d07e664d0d..92ea3aff8a92f45dda197e2ff38f809c75f326bf 100644 --- a/tests/idrange/test_idrange.yml +++ b/tests/idrange/test_idrange.yml @@ -34,7 +34,8 @@ # TESTS # Test local idrange, only if ipa-adtrust-install was not executed. - - block: + - name: Test local idrange + block: - name: Ensure idrange with minimal attributes is present ipaidrange: ipaadmin_password: SomeADMINpassword @@ -118,7 +119,8 @@ ipaapi_context: "{{ ipa_context | default(omit) }}" name: local_id_range - - block: + - name: Execute idrange tests if trust test environment is supported + block: # Create trust with range_type: ipa-ad-trust - name: Create trust with range_type 'ipa-ad-trust' ansible.builtin.include_tasks: tasks_set_trust.yml diff --git a/tests/netgroup/test_netgroup.yml b/tests/netgroup/test_netgroup.yml index 0cc1efe1ec569eecf0ec68bac3515be817b60b0e..4802bd482b54fb088a38ea1aba90929f462fb4e7 100644 --- a/tests/netgroup/test_netgroup.yml +++ b/tests/netgroup/test_netgroup.yml @@ -5,7 +5,8 @@ gather_facts: no tasks: - - block: + - name: Test netgroup + block: # CLEANUP TEST ITEMS - name: Ensure netgroups are absent ipanetgroup: diff --git a/tests/netgroup/test_netgroup_member.yml b/tests/netgroup/test_netgroup_member.yml index ac67fbe844f8e38589aa10add8c6668c6f48c0f6..20cde4721ac2579a8178ab89818efea5a271255f 100644 --- a/tests/netgroup/test_netgroup_member.yml +++ b/tests/netgroup/test_netgroup_member.yml @@ -5,7 +5,8 @@ gather_facts: no tasks: - - block: + - name: Test netgroup member + block: - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" diff --git a/tests/netgroup/test_netgroup_member_absent.yml b/tests/netgroup/test_netgroup_member_absent.yml index 2da3125be03c62149f303309e22828e331a285af..9ee1d13d79feded2524a33307e62222546007750 100644 --- a/tests/netgroup/test_netgroup_member_absent.yml +++ b/tests/netgroup/test_netgroup_member_absent.yml @@ -5,7 +5,8 @@ gather_facts: no tasks: - - block: + - name: Test netgroup member absent + block: - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" diff --git a/tests/netgroup/test_netgroup_member_case_insensitive.yml b/tests/netgroup/test_netgroup_member_case_insensitive.yml index 62aadc52f0ee725de25b94a5846b76f9858552d7..4a1aa9106110410b43b17ebc6a96493e5d42856e 100644 --- a/tests/netgroup/test_netgroup_member_case_insensitive.yml +++ b/tests/netgroup/test_netgroup_member_case_insensitive.yml @@ -13,7 +13,8 @@ tasks: - - block: + - name: Test netgroup member case insensitive + block: # SETUP - name: Get Domain from server name ansible.builtin.set_fact: diff --git a/tests/permission/test_permission.yml b/tests/permission/test_permission.yml index 6a987295005b6e73446291691d762bd5ceb98882..99054644abb58c5fb9c827cbcccee89ec99dc5ca 100644 --- a/tests/permission/test_permission.yml +++ b/tests/permission/test_permission.yml @@ -4,7 +4,8 @@ become: true tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include task ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - name: Ensure testing groups are present. ipagroup: diff --git a/tests/pwpolicy/test_pwpolicy.yml b/tests/pwpolicy/test_pwpolicy.yml index db064d57b6a7f421806b9ca6979b19d3337f27ab..c4a480cdf10ecf77be90152960f0340b1181ddfa 100644 --- a/tests/pwpolicy/test_pwpolicy.yml +++ b/tests/pwpolicy/test_pwpolicy.yml @@ -121,7 +121,8 @@ register: result failed_when: result.changed or result.failed - - block: + - name: Execute tests if ipa_version >= 4.9.0 + block: - name: Ensure maxrepeat of 2 for global_policy ipapwpolicy: ipaadmin_password: SomeADMINpassword @@ -220,7 +221,8 @@ when: ipa_version is version("4.9", ">=") - - block: + - name: Execute tests if ipa_version >= 4.9.10 + block: - name: Ensure grace limit is set to 10 for global_policy ipapwpolicy: ipaadmin_password: SomeADMINpassword diff --git a/tests/role/env_facts.yml b/tests/role/env_facts.yml index 30341839bffa2ceba1bd7ab5642b9c265412273d..ee48608f6e2626b46e22f1b0bd93a2da2d795a58 100644 --- a/tests/role/env_facts.yml +++ b/tests/role/env_facts.yml @@ -1,5 +1,6 @@ --- -- block: +- name: Ensure ipaserver_domain is set + block: - name: Get Domain from server name ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}" diff --git a/tests/role/test_role_member_case_insensitive.yml b/tests/role/test_role_member_case_insensitive.yml index d5d5a6c6e078500616baa173dc88a839e0d07d0f..aa1ad983084a747b45364e43f4e383d0a8ef6848 100644 --- a/tests/role/test_role_member_case_insensitive.yml +++ b/tests/role/test_role_member_case_insensitive.yml @@ -22,9 +22,11 @@ - MySVC/host01 tasks: - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - - block: + - name: Test role member case insensitive + block: # setup - name: Ensure test role is absent diff --git a/tests/server/test_server.yml b/tests/server/test_server.yml index c27da846cd9d6cced8cb989314cff45470f00a36..755601940966c924fb6ef143c5c830d03b3c56f3 100644 --- a/tests/server/test_server.yml +++ b/tests/server/test_server.yml @@ -7,7 +7,8 @@ tasks: # CLEANUP TEST ITEMS - - block: + - name: Ensure ipa_server_name is set + block: - name: Get server name from hostname ansible.builtin.set_fact: ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}" @@ -17,7 +18,8 @@ ipa_server_name: ipaserver when: ipa_server_name is not defined - - block: + - name: Ensure ipaserver_domain is set + block: - name: Get domain name from hostname. ansible.builtin.set_fact: ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}" diff --git a/tests/service/test_service.yml b/tests/service/test_service.yml index b206d84ef831b29f85519f51e38cb54383a584fb..8c6c4d8b84c101adea8c02bafde279c6980f67c3 100644 --- a/tests/service/test_service.yml +++ b/tests/service/test_service.yml @@ -17,7 +17,8 @@ tasks: # setup - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml # tests - name: Tests with skip_host_check, require IPA version 4.8.0+. diff --git a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml index 4d0bd7641454f2efe33b2fde154677b398e90e03..a999ba9ff90f98871ff5e13cf4eb3683cf5e0175 100644 --- a/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml +++ b/tests/servicedelegationrule/test_servicedelegationrule_hostprincipal.yml @@ -6,10 +6,11 @@ tasks: # setup - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - # host principals are only possible with IPA 4.9.0+ - - block: + - name: Host principals are only possible with IPA 4.9.0+ + block: # SET FACTS diff --git a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml index aedfc69728ecc48dd4e680d3028b9bc4b3f10ab9..7fa033955d822208a3a06492925ba943274861ef 100644 --- a/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml +++ b/tests/servicedelegationtarget/test_servicedelegationtarget_hostprincipal.yml @@ -6,10 +6,11 @@ tasks: # setup - - ansible.builtin.include_tasks: ../env_freeipa_facts.yml + - name: Include tasks ../env_freeipa_facts.yml + ansible.builtin.include_tasks: ../env_freeipa_facts.yml - # host principals are only possible with IPA 4.9.0+ - - block: + - name: Host principals are only possible with IPA 4.9.0+ + block: # SET FACTS diff --git a/tests/sudorule/test_sudorule_member_case_insensitive.yml b/tests/sudorule/test_sudorule_member_case_insensitive.yml index 724dabda6f44302247ced940f8cfa2f9907c1423..582e8204eb5248feb77f94a7ccf1e9a8e1a81b55 100644 --- a/tests/sudorule/test_sudorule_member_case_insensitive.yml +++ b/tests/sudorule/test_sudorule_member_case_insensitive.yml @@ -13,7 +13,8 @@ tasks: - - block: + - name: Test sudorule member case insensitive + block: # SETUP - name: Ensure domain name ansible.builtin.set_fact: diff --git a/tests/sudorule/test_sudorule_single_hostnames.yml b/tests/sudorule/test_sudorule_single_hostnames.yml index 24acd8b64bdb41c64b1cca9fee0e3f88f25de2ab..0fad2b1ecf0d4d40082293db52667e6c1eb8f555 100644 --- a/tests/sudorule/test_sudorule_single_hostnames.yml +++ b/tests/sudorule/test_sudorule_single_hostnames.yml @@ -5,7 +5,8 @@ gather_facts: no tasks: - - block: + - name: Test sudorule single hostnames + block: # setup test environment - name: Get Domain from the server name ansible.builtin.set_fact: diff --git a/tests/trust/test_trust.yml b/tests/trust/test_trust.yml index f998c6fc791252d5fabe05e053c2a554e9a78acc..2bf236f1c702d242539bef3af1d0d4744f21a0d3 100644 --- a/tests/trust/test_trust.yml +++ b/tests/trust/test_trust.yml @@ -18,7 +18,8 @@ tasks: - - block: + - name: Run tust tests, if supported by environment + block: - name: Delete test trust ipatrust: diff --git a/tests/vault/test_vault_change_type.yml b/tests/vault/test_vault_change_type.yml index a5fb0c8bd0138133beb92ac39bbd40473d06554b..7e4ca44fb0de5edf41f2bdeb9d683f8ca0ce4ca6 100644 --- a/tests/vault/test_vault_change_type.yml +++ b/tests/vault/test_vault_change_type.yml @@ -30,7 +30,8 @@ register: result failed_when: result.failed or not result.changed - - block: + - name: Change vault type from asymmetric to symmetric + block: - name: Change from asymmetric to symmetric ipavault: ipaadmin_password: SomeADMINpassword @@ -52,7 +53,8 @@ vars: krb5ccname: verify_change_from_asymmetric - - block: + - name: Change vault type from symmetric to standard + block: - name: Change from symmetric to standard ipavault: ipaadmin_password: SomeADMINpassword @@ -82,7 +84,8 @@ register: result failed_when: result.failed or not result.changed - - block: + - name: Change vault type from symmetric to asymmetric + block: - name: Change from symmetric to asymmetric ipavault: ipaadmin_password: SomeADMINpassword @@ -104,7 +107,8 @@ vars: krb5ccname: verify_change_from_symmetric - - block: + - name: Change vault type from asymmetric to standard + block: - name: Change from asymmetric to standard ipavault: ipaadmin_password: SomeADMINpassword @@ -156,7 +160,8 @@ register: result failed_when: result.failed or result.changed or result.vault.data != 'hello' - - block: + - name: Change vault type from asymmetric to symmetric, with data + block: - name: Change from asymmetric to symmetric, with data ipavault: ipaadmin_password: SomeADMINpassword @@ -187,7 +192,8 @@ register: result failed_when: result.failed or result.changed or result.vault.data != 'hello' - - block: + - name: Change vault type from symmetric to standard, with data + block: - name: Change from symmetric to standard, with data ipavault: ipaadmin_password: SomeADMINpassword @@ -234,7 +240,8 @@ register: result failed_when: result.failed or result.changed or result.vault.data != 'hello' - - block: + - name: Change vault type from symmetric to asymmetric, with data + block: - name: Change from symmetric to asymmetric, with data ipavault: ipaadmin_password: SomeADMINpassword @@ -265,7 +272,8 @@ register: result failed_when: result.failed or result.changed or result.vault.data != 'hello' - - block: + - name: Change vault type from asymmetric to standard, with data + block: - name: Change from asymmetric to standard, with data ipavault: ipaadmin_password: SomeADMINpassword