mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-13 21:12:02 +00:00
yamllint: All tasks need to be named
yamllint is failing for unnamed tasks. All block and include_tasks tasks are now named.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
state: present
|
||||
|
||||
# TESTS
|
||||
- block:
|
||||
- name: Execute Automount Map tests
|
||||
block:
|
||||
- name: ensure map TestMap is present
|
||||
ipaautomountmap:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
register: previous
|
||||
|
||||
# TESTS
|
||||
- block:
|
||||
- name: Test config sid
|
||||
block:
|
||||
- name: Check if SID is enabled.
|
||||
ipaconfig:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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 ('.') }}"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
- SvC2
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test hbacsvcgroup member case insnsitive
|
||||
block:
|
||||
- name: Ensure test hbacsvcgroup is absent
|
||||
ipahbacsvcgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test netgroup
|
||||
block:
|
||||
# CLEANUP TEST ITEMS
|
||||
- name: Ensure netgroups are absent
|
||||
ipanetgroup:
|
||||
|
||||
@@ -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 ('.') }}"
|
||||
|
||||
@@ -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 ('.') }}"
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test netgroup member case insensitive
|
||||
block:
|
||||
# SETUP
|
||||
- name: Get Domain from server name
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ('.') }}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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('.') }}"
|
||||
|
||||
@@ -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+.
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
|
||||
|
||||
tasks:
|
||||
- block:
|
||||
- name: Test sudorule member case insensitive
|
||||
block:
|
||||
# SETUP
|
||||
- name: Ensure domain name
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
|
||||
tasks:
|
||||
|
||||
- block:
|
||||
- name: Run tust tests, if supported by environment
|
||||
block:
|
||||
|
||||
- name: Delete test trust
|
||||
ipatrust:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user