mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +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:
@@ -13,7 +13,8 @@
|
|||||||
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||||
register: result_ipabackup
|
register: result_ipabackup
|
||||||
|
|
||||||
- block:
|
- name: Handle backup
|
||||||
|
block:
|
||||||
- name: Get ipabackup_item from stderr or stdout output
|
- name: Get ipabackup_item from stderr or stdout output
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}"
|
ipabackup_item: "{{ item | regex_search('\n.*/([^\n]+)','\\1') | first }}"
|
||||||
|
|||||||
@@ -45,7 +45,8 @@
|
|||||||
state is defined and
|
state is defined and
|
||||||
(state == "copied" or state == "restored" or state == "absent")
|
(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
|
- name: Get list of all backups on IPA server
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2
|
find . -name "ipa-full-*" -o -name "ipa-data-*" | cut -d"/" -f 2
|
||||||
@@ -62,7 +63,8 @@
|
|||||||
state == "absent") and
|
state == "absent") and
|
||||||
ipabackup_name is defined and ipabackup_name == "all"
|
ipabackup_name is defined and ipabackup_name == "all"
|
||||||
|
|
||||||
- block:
|
- name: Set ipabackup_names from ipabackup_name
|
||||||
|
block:
|
||||||
- name: Fail on ipabackup_name all
|
- name: Fail on ipabackup_name all
|
||||||
ansible.builtin.fail: msg="ipabackup_name can not be all in this case"
|
ansible.builtin.fail: msg="ipabackup_name can not be all in this case"
|
||||||
when: ipabackup_name is defined and ipabackup_name == "all"
|
when: ipabackup_name is defined and ipabackup_name == "all"
|
||||||
@@ -83,7 +85,8 @@
|
|||||||
ipabackup_names: []
|
ipabackup_names: []
|
||||||
when: ipabackup_names is not defined and ipabackup_name is not defined
|
when: ipabackup_names is not defined and ipabackup_name is not defined
|
||||||
|
|
||||||
- block:
|
- name: Process "{{ ipabackup_names }}"
|
||||||
|
block:
|
||||||
- name: Copy backup from IPA server
|
- name: Copy backup from IPA server
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_from_server.yml"
|
||||||
vars:
|
vars:
|
||||||
@@ -117,7 +120,8 @@
|
|||||||
|
|
||||||
# Use only first item in ipabackup_names for copy to server and for restore.
|
# 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
|
- name: Copy backup to server
|
||||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml"
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/copy_backup_to_server.yml"
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
|
|
||||||
### INSTALL PACKAGES
|
### INSTALL PACKAGES
|
||||||
|
|
||||||
- block:
|
- name: Package installation
|
||||||
|
block:
|
||||||
- name: Ensure that IPA server packages are installed
|
- name: Ensure that IPA server packages are installed
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ ipaserver_packages }}"
|
name: "{{ ipaserver_packages }}"
|
||||||
@@ -80,7 +81,8 @@
|
|||||||
|
|
||||||
### START FIREWALLD
|
### START FIREWALLD
|
||||||
|
|
||||||
- block:
|
- name: Firewall configuration
|
||||||
|
block:
|
||||||
- name: Ensure that firewalld is running
|
- name: Ensure that firewalld is running
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: firewalld
|
name: firewalld
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
ipaadmin_principal: admin
|
ipaadmin_principal: admin
|
||||||
when: ipaadmin_principal is undefined and ipaclient_keytab is undefined
|
when: ipaadmin_principal is undefined and ipaclient_keytab is undefined
|
||||||
|
|
||||||
- name: Install - Configure DNS resolver Block
|
- name: Install - DNS resolver configuration
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Install - Fail on missing ipaclient_domain and ipaserver_domain
|
- name: Install - Fail on missing ipaclient_domain and ipaserver_domain
|
||||||
@@ -72,7 +72,8 @@
|
|||||||
| default(ipasssd_enable_dns_updates) }}"
|
| default(ipasssd_enable_dns_updates) }}"
|
||||||
register: result_ipaclient_test
|
register: result_ipaclient_test
|
||||||
|
|
||||||
- block:
|
- name: Install - Client deployment
|
||||||
|
block:
|
||||||
- name: Install - Cleanup leftover ccache
|
- name: Install - Cleanup leftover ccache
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "/etc/ipa/.dns_ccache"
|
path: "/etc/ipa/.dns_ccache"
|
||||||
@@ -125,7 +126,8 @@
|
|||||||
# to create a OneTime Password
|
# to create a OneTime Password
|
||||||
# If a keytab is specified in the hostent, then the hostent will be disabled
|
# If a keytab is specified in the hostent, then the hostent will be disabled
|
||||||
# if ipaclient_use_otp is set.
|
# if ipaclient_use_otp is set.
|
||||||
- block:
|
- name: Install - Obtain OTP
|
||||||
|
block:
|
||||||
- name: Install - Keytab or password is required for getting otp
|
- name: Install - Keytab or password is required for getting otp
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: Keytab or password is required for getting otp
|
msg: Keytab or password is required for getting otp
|
||||||
@@ -188,14 +190,8 @@
|
|||||||
ipaadmin_password: "{{ ipaclient_otp }}"
|
ipaadmin_password: "{{ ipaclient_otp }}"
|
||||||
when: ipaclient_otp is defined
|
when: ipaclient_otp is defined
|
||||||
|
|
||||||
- block:
|
- name: Install - Check keytab, principal and keytab
|
||||||
# This block is executed only when
|
block:
|
||||||
# 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 if principal and keytab are set
|
- name: Install - Check if principal and keytab are set
|
||||||
ansible.builtin.fail: msg="Admin principal and client keytab cannot be used together"
|
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
|
(not result_ipaclient_test_keytab.krb5_keytab_ok or
|
||||||
ipaclient_force_join)
|
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
|
- name: krb5 configuration not correct
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >
|
msg: >
|
||||||
@@ -275,7 +280,8 @@
|
|||||||
(result_ipaclient_join.already_joined is defined and
|
(result_ipaclient_join.already_joined is defined and
|
||||||
result_ipaclient_join.already_joined))
|
result_ipaclient_join.already_joined))
|
||||||
|
|
||||||
- block:
|
- name: Install - Configuration
|
||||||
|
block:
|
||||||
- name: Install - Configure IPA default.conf
|
- name: Install - Configure IPA default.conf
|
||||||
ipaclient_ipa_conf:
|
ipaclient_ipa_conf:
|
||||||
servers: "{{ result_ipaclient_test.servers }}"
|
servers: "{{ result_ipaclient_test.servers }}"
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
# tasks file for ipareplica
|
# tasks file for ipareplica
|
||||||
|
|
||||||
- block:
|
- name: Package installation
|
||||||
|
block:
|
||||||
|
|
||||||
- name: Install - Ensure IPA replica packages are installed
|
- name: Install - Ensure IPA replica packages are installed
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
@@ -28,7 +29,8 @@
|
|||||||
|
|
||||||
when: ipareplica_install_packages | bool
|
when: ipareplica_install_packages | bool
|
||||||
|
|
||||||
- block:
|
- name: Firewall configuration
|
||||||
|
block:
|
||||||
- name: Firewalld service - Ensure that firewalld is running
|
- name: Firewalld service - Ensure that firewalld is running
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: firewalld
|
name: firewalld
|
||||||
@@ -101,7 +103,8 @@
|
|||||||
no_dnssec_validation: "{{ ipareplica_no_dnssec_validation }}"
|
no_dnssec_validation: "{{ ipareplica_no_dnssec_validation }}"
|
||||||
register: result_ipareplica_test
|
register: result_ipareplica_test
|
||||||
|
|
||||||
- block:
|
- name: Install - Deploy replica
|
||||||
|
block:
|
||||||
# This block is executed only when
|
# This block is executed only when
|
||||||
# not ansible_check_mode and
|
# not ansible_check_mode and
|
||||||
# not (result_ipareplica_test.client_already_configured is defined or
|
# not (result_ipareplica_test.client_already_configured is defined or
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
---
|
---
|
||||||
# tasks file for ipaserver
|
# tasks file for ipaserver
|
||||||
|
|
||||||
- block:
|
- name: Install - Package installation
|
||||||
|
block:
|
||||||
- name: Install - Ensure that IPA server packages are installed
|
- name: Install - Ensure that IPA server packages are installed
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ ipaserver_packages }}"
|
name: "{{ ipaserver_packages }}"
|
||||||
@@ -27,7 +28,8 @@
|
|||||||
|
|
||||||
when: ipaserver_install_packages | bool
|
when: ipaserver_install_packages | bool
|
||||||
|
|
||||||
- block:
|
- name: Install - Firewall configuration
|
||||||
|
block:
|
||||||
- name: Firewalld service - Ensure that firewalld is running
|
- name: Firewalld service - Ensure that firewalld is running
|
||||||
ansible.builtin.systemd:
|
ansible.builtin.systemd:
|
||||||
name: firewalld
|
name: firewalld
|
||||||
@@ -51,7 +53,8 @@
|
|||||||
|
|
||||||
when: ipaserver_setup_firewalld | bool
|
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 }}"
|
with_items: "{{ ipaserver_external_cert_files_from_controller }}"
|
||||||
when: ipaserver_external_cert_files_from_controller is defined and
|
when: ipaserver_external_cert_files_from_controller is defined and
|
||||||
ipaserver_external_cert_files_from_controller|length > 0 and
|
ipaserver_external_cert_files_from_controller|length > 0 and
|
||||||
@@ -127,14 +130,16 @@
|
|||||||
### additional ###
|
### additional ###
|
||||||
register: result_ipaserver_test
|
register: result_ipaserver_test
|
||||||
|
|
||||||
- block:
|
- name: Install - Deploy server
|
||||||
|
block:
|
||||||
# This block is executed only when
|
# This block is executed only when
|
||||||
# not ansible_check_mode and
|
# not ansible_check_mode and
|
||||||
# not (not result_ipaserver_test.changed and
|
# not (not result_ipaserver_test.changed and
|
||||||
# (result_ipaserver_test.client_already_configured is defined or
|
# (result_ipaserver_test.client_already_configured is defined or
|
||||||
# result_ipaserver_test.server_already_configured is defined)
|
# result_ipaserver_test.server_already_configured is defined)
|
||||||
|
|
||||||
- block:
|
- name: Install - Obtain master password
|
||||||
|
block:
|
||||||
- name: Install - Master password creation
|
- name: Install - Master password creation
|
||||||
no_log: yes
|
no_log: yes
|
||||||
ipaserver_master_password:
|
ipaserver_master_password:
|
||||||
@@ -315,7 +320,8 @@
|
|||||||
when: result_ipaserver_setup_ca.csr_generated | bool and
|
when: result_ipaserver_setup_ca.csr_generated | bool and
|
||||||
ipaserver_copy_csr_to_controller | bool
|
ipaserver_copy_csr_to_controller | bool
|
||||||
|
|
||||||
- block:
|
- name: Install - Configure services
|
||||||
|
block:
|
||||||
- name: Install - Setup otpd
|
- name: Install - Setup otpd
|
||||||
ipaserver_setup_otpd:
|
ipaserver_setup_otpd:
|
||||||
realm: "{{ result_ipaserver_test.realm }}"
|
realm: "{{ result_ipaserver_test.realm }}"
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
# If neither distro nor family is supported, try a default configuration.
|
# If neither distro nor family is supported, try a default configuration.
|
||||||
- "vars/default.yml"
|
- "vars/default.yml"
|
||||||
|
|
||||||
- block:
|
- name: Client configuration
|
||||||
|
block:
|
||||||
|
|
||||||
# CA CERTS
|
# CA CERTS
|
||||||
|
|
||||||
@@ -99,7 +100,8 @@
|
|||||||
|
|
||||||
# Ensure /etc/sssd/pki exists
|
# Ensure /etc/sssd/pki exists
|
||||||
|
|
||||||
- block:
|
- name: Prepare for authselect
|
||||||
|
block:
|
||||||
- name: Ensure /etc/sssd/pki exists
|
- name: Ensure /etc/sssd/pki exists
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/sssd/pki
|
path: /etc/sssd/pki
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
# If neither distro nor family is supported, try a default configuration.
|
# If neither distro nor family is supported, try a default configuration.
|
||||||
- "vars/default.yml"
|
- "vars/default.yml"
|
||||||
|
|
||||||
- block:
|
- name: Server configuration
|
||||||
|
block:
|
||||||
|
|
||||||
# CA CERTS
|
# CA CERTS
|
||||||
|
|
||||||
@@ -162,7 +163,8 @@
|
|||||||
|
|
||||||
# HTTPD IFP
|
# HTTPD IFP
|
||||||
|
|
||||||
- block:
|
- name: Allow HTTPD ifp
|
||||||
|
block:
|
||||||
|
|
||||||
# Allow Apache to access SSSD IFP
|
# Allow Apache to access SSSD IFP
|
||||||
|
|
||||||
@@ -190,7 +192,8 @@
|
|||||||
|
|
||||||
# Ensure /etc/sssd/pki exists
|
# Ensure /etc/sssd/pki exists
|
||||||
|
|
||||||
- block:
|
- name: Prepare for authselect
|
||||||
|
block:
|
||||||
- name: Ensure /etc/sssd/pki exists
|
- name: Ensure /etc/sssd/pki exists
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: /etc/sssd/pki
|
path: /etc/sssd/pki
|
||||||
|
|||||||
@@ -32,7 +32,8 @@
|
|||||||
key: NewKeyName
|
key: NewKeyName
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
- block:
|
- name: Execute Automount Key tests
|
||||||
|
block:
|
||||||
### test the key creation, and modification
|
### test the key creation, and modification
|
||||||
- name: ensure key TestKey is present
|
- name: ensure key TestKey is present
|
||||||
ipaautomountkey:
|
ipaautomountkey:
|
||||||
|
|||||||
@@ -35,7 +35,8 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
# TESTS
|
# TESTS
|
||||||
- block:
|
- name: Execute Automount Map tests
|
||||||
|
block:
|
||||||
- name: ensure map TestMap is present
|
- name: ensure map TestMap is present
|
||||||
ipaautomountmap:
|
ipaautomountmap:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
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.
|
# Retrieve current configuration.
|
||||||
- name: return current values of the global configuration options
|
- name: return current values of the global configuration options
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
@@ -56,7 +58,8 @@
|
|||||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||||
pac_type: ""
|
pac_type: ""
|
||||||
|
|
||||||
- block:
|
- name: Execute tests if ipa_version >= 4.8.0
|
||||||
|
block:
|
||||||
- name: set maxhostname to 255
|
- name: set maxhostname to 255
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -221,7 +224,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.changed or result.failed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- block:
|
- name: Execute tests if ipa_version >= 4.8.0
|
||||||
|
block:
|
||||||
- name: set maxhostname to 77
|
- name: set maxhostname to 77
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -410,7 +414,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: not result.changed or result.failed
|
failed_when: not result.changed or result.failed
|
||||||
|
|
||||||
- block:
|
- name: Execute tests if ipa_version >= 4.8.0
|
||||||
|
block:
|
||||||
- name: reset maxhostname
|
- name: reset maxhostname
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -445,7 +450,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.changed or result.failed
|
failed_when: result.changed or result.failed
|
||||||
|
|
||||||
- block:
|
- name: Execute tests if ipa_version >= 4.8.0
|
||||||
|
block:
|
||||||
- name: reset maxhostname
|
- name: reset maxhostname
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
register: previous
|
register: previous
|
||||||
|
|
||||||
# TESTS
|
# TESTS
|
||||||
- block:
|
- name: Test config sid
|
||||||
|
block:
|
||||||
- name: Check if SID is enabled.
|
- name: Check if SID is enabled.
|
||||||
ipaconfig:
|
ipaconfig:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test dnsconfig forwarders ports
|
||||||
|
block:
|
||||||
# Setup.
|
# Setup.
|
||||||
- name: Ensure forwarder with custom port is absent.
|
- name: Ensure forwarder with custom port is absent.
|
||||||
ipadnsconfig:
|
ipadnsconfig:
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
ipa_host_is_client: "{{ (output.stdout_lines[-1] == 'CLIENT') | bool }}"
|
ipa_host_is_client: "{{ (output.stdout_lines[-1] == 'CLIENT') | bool }}"
|
||||||
trust_test_is_supported: no
|
trust_test_is_supported: no
|
||||||
|
|
||||||
- block:
|
- name: Ensure ipaserver_domain is set
|
||||||
|
block:
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# 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
|
# GET FQDN_AT_DOMAIN
|
||||||
|
|
||||||
@@ -136,7 +137,8 @@
|
|||||||
|
|
||||||
# service
|
# service
|
||||||
|
|
||||||
- block:
|
- name: Execute tests if ipa_verison >= 4.7.0
|
||||||
|
block:
|
||||||
|
|
||||||
- name: Ensure service "{{ 'HTTP/' + fqdn_at_domain }}" is present in group group1
|
- name: Ensure service "{{ 'HTTP/' + fqdn_at_domain }}" is present in group group1
|
||||||
ipagroup:
|
ipagroup:
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
|
|
||||||
tasks:
|
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.
|
- name: Add nonposix group.
|
||||||
ipagroup:
|
ipagroup:
|
||||||
|
|||||||
@@ -204,7 +204,8 @@
|
|||||||
|
|
||||||
# EXTERNAL MEMBER TEST (REQUIRES AD)
|
# 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
|
- name: Ensure users testuser1, testuser2 and testuser3 are present in group externalgroup
|
||||||
ipagroup:
|
ipagroup:
|
||||||
|
|||||||
@@ -9,9 +9,11 @@
|
|||||||
ad_domain: "{{ test_ad_domain | default('ad.ipa.test') }}"
|
ad_domain: "{{ test_ad_domain | default('ad.ipa.test') }}"
|
||||||
|
|
||||||
tasks:
|
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.
|
- name: Create idoverrideuser.
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
kinit -c idoverride_cache admin <<< SomeADMINpassword
|
kinit -c idoverride_cache admin <<< SomeADMINpassword
|
||||||
|
|||||||
@@ -5,9 +5,10 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
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:
|
block:
|
||||||
- name: Ensure user manangeruser1 and manageruser2 is absent
|
- name: Ensure user manangeruser1 and manageruser2 is absent
|
||||||
ipauser:
|
ipauser:
|
||||||
|
|||||||
@@ -25,9 +25,11 @@
|
|||||||
- sVCgrOUp1
|
- sVCgrOUp1
|
||||||
|
|
||||||
tasks:
|
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
|
# setup
|
||||||
|
|
||||||
- name: Ensure test hbacrule is absent
|
- name: Ensure test hbacrule is absent
|
||||||
|
|||||||
@@ -9,7 +9,8 @@
|
|||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
when: ipaserver_domain is not defined
|
when: ipaserver_domain is not defined
|
||||||
|
|
||||||
- block:
|
- name: Test hbacrule member empty
|
||||||
|
block:
|
||||||
# SETUP:
|
# SETUP:
|
||||||
- name: Ensure test HBAC rule is absent
|
- name: Ensure test HBAC rule is absent
|
||||||
ipahbacrule:
|
ipahbacrule:
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
- SvC2
|
- SvC2
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test hbacsvcgroup member case insnsitive
|
||||||
|
block:
|
||||||
- name: Ensure test hbacsvcgroup is absent
|
- name: Ensure test hbacsvcgroup is absent
|
||||||
ipahbacsvcgroup:
|
ipahbacsvcgroup:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
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: Tests requiring IPA version 4.8.4+
|
||||||
block:
|
block:
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
tasks:
|
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+
|
- name: Tests requiring IPA version 4.8.7+
|
||||||
block:
|
block:
|
||||||
|
|||||||
@@ -34,7 +34,8 @@
|
|||||||
# TESTS
|
# TESTS
|
||||||
|
|
||||||
# Test local idrange, only if ipa-adtrust-install was not executed.
|
# 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
|
- name: Ensure idrange with minimal attributes is present
|
||||||
ipaidrange:
|
ipaidrange:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -118,7 +119,8 @@
|
|||||||
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
ipaapi_context: "{{ ipa_context | default(omit) }}"
|
||||||
name: local_id_range
|
name: local_id_range
|
||||||
|
|
||||||
- block:
|
- name: Execute idrange tests if trust test environment is supported
|
||||||
|
block:
|
||||||
# Create trust with range_type: ipa-ad-trust
|
# Create trust with range_type: ipa-ad-trust
|
||||||
- name: 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
|
ansible.builtin.include_tasks: tasks_set_trust.yml
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test netgroup
|
||||||
|
block:
|
||||||
# CLEANUP TEST ITEMS
|
# CLEANUP TEST ITEMS
|
||||||
- name: Ensure netgroups are absent
|
- name: Ensure netgroups are absent
|
||||||
ipanetgroup:
|
ipanetgroup:
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test netgroup member
|
||||||
|
block:
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test netgroup member absent
|
||||||
|
block:
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test netgroup member case insensitive
|
||||||
|
block:
|
||||||
# SETUP
|
# SETUP
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
tasks:
|
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.
|
- name: Ensure testing groups are present.
|
||||||
ipagroup:
|
ipagroup:
|
||||||
|
|||||||
@@ -121,7 +121,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.changed or result.failed
|
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
|
- name: Ensure maxrepeat of 2 for global_policy
|
||||||
ipapwpolicy:
|
ipapwpolicy:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -220,7 +221,8 @@
|
|||||||
|
|
||||||
when: ipa_version is version("4.9", ">=")
|
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
|
- name: Ensure grace limit is set to 10 for global_policy
|
||||||
ipapwpolicy:
|
ipapwpolicy:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
- block:
|
- name: Ensure ipaserver_domain is set
|
||||||
|
block:
|
||||||
- name: Get Domain from server name
|
- name: Get Domain from server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join ('.') }}"
|
||||||
|
|||||||
@@ -22,9 +22,11 @@
|
|||||||
- MySVC/host01
|
- MySVC/host01
|
||||||
|
|
||||||
tasks:
|
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
|
# setup
|
||||||
|
|
||||||
- name: Ensure test role is absent
|
- name: Ensure test role is absent
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
# CLEANUP TEST ITEMS
|
# CLEANUP TEST ITEMS
|
||||||
- block:
|
- name: Ensure ipa_server_name is set
|
||||||
|
block:
|
||||||
- name: Get server name from hostname
|
- name: Get server name from hostname
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}"
|
ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}"
|
||||||
@@ -17,7 +18,8 @@
|
|||||||
ipa_server_name: ipaserver
|
ipa_server_name: ipaserver
|
||||||
when: ipa_server_name is not defined
|
when: ipa_server_name is not defined
|
||||||
|
|
||||||
- block:
|
- name: Ensure ipaserver_domain is set
|
||||||
|
block:
|
||||||
- name: Get domain name from hostname.
|
- name: Get domain name from hostname.
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
|
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# 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
|
# tests
|
||||||
- name: Tests with skip_host_check, require IPA version 4.8.0+.
|
- name: Tests with skip_host_check, require IPA version 4.8.0+.
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# 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+
|
- name: Host principals are only possible with IPA 4.9.0+
|
||||||
- block:
|
block:
|
||||||
|
|
||||||
# SET FACTS
|
# SET FACTS
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,11 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
# setup
|
# 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+
|
- name: Host principals are only possible with IPA 4.9.0+
|
||||||
- block:
|
block:
|
||||||
|
|
||||||
# SET FACTS
|
# SET FACTS
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test sudorule member case insensitive
|
||||||
|
block:
|
||||||
# SETUP
|
# SETUP
|
||||||
- name: Ensure domain name
|
- name: Ensure domain name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
|||||||
@@ -5,7 +5,8 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- block:
|
- name: Test sudorule single hostnames
|
||||||
|
block:
|
||||||
# setup test environment
|
# setup test environment
|
||||||
- name: Get Domain from the server name
|
- name: Get Domain from the server name
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
- block:
|
- name: Run tust tests, if supported by environment
|
||||||
|
block:
|
||||||
|
|
||||||
- name: Delete test trust
|
- name: Delete test trust
|
||||||
ipatrust:
|
ipatrust:
|
||||||
|
|||||||
@@ -30,7 +30,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or not result.changed
|
failed_when: result.failed or not result.changed
|
||||||
|
|
||||||
- block:
|
- name: Change vault type from asymmetric to symmetric
|
||||||
|
block:
|
||||||
- name: Change from asymmetric to symmetric
|
- name: Change from asymmetric to symmetric
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -52,7 +53,8 @@
|
|||||||
vars:
|
vars:
|
||||||
krb5ccname: verify_change_from_asymmetric
|
krb5ccname: verify_change_from_asymmetric
|
||||||
|
|
||||||
- block:
|
- name: Change vault type from symmetric to standard
|
||||||
|
block:
|
||||||
- name: Change from symmetric to standard
|
- name: Change from symmetric to standard
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -82,7 +84,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or not result.changed
|
failed_when: result.failed or not result.changed
|
||||||
|
|
||||||
- block:
|
- name: Change vault type from symmetric to asymmetric
|
||||||
|
block:
|
||||||
- name: Change from symmetric to asymmetric
|
- name: Change from symmetric to asymmetric
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -104,7 +107,8 @@
|
|||||||
vars:
|
vars:
|
||||||
krb5ccname: verify_change_from_symmetric
|
krb5ccname: verify_change_from_symmetric
|
||||||
|
|
||||||
- block:
|
- name: Change vault type from asymmetric to standard
|
||||||
|
block:
|
||||||
- name: Change from asymmetric to standard
|
- name: Change from asymmetric to standard
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -156,7 +160,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or result.changed or result.vault.data != 'hello'
|
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
|
- name: Change from asymmetric to symmetric, with data
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -187,7 +192,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or result.changed or result.vault.data != 'hello'
|
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
|
- name: Change from symmetric to standard, with data
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -234,7 +240,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or result.changed or result.vault.data != 'hello'
|
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
|
- name: Change from symmetric to asymmetric, with data
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
@@ -265,7 +272,8 @@
|
|||||||
register: result
|
register: result
|
||||||
failed_when: result.failed or result.changed or result.vault.data != 'hello'
|
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
|
- name: Change from asymmetric to standard, with data
|
||||||
ipavault:
|
ipavault:
|
||||||
ipaadmin_password: SomeADMINpassword
|
ipaadmin_password: SomeADMINpassword
|
||||||
|
|||||||
Reference in New Issue
Block a user