mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-09 18:25:53 +00:00
The tests test_services_absent.yml, test_services_present.yml and test_services_present_slice.yml have been updated to use in memory data for testing instead of loading json files. This made is simpler to use variables from the playbook for example for fqdn host names. New tests for certificates with and without trailing new lines have been added for single service and multiple service handling.
72 lines
2.1 KiB
YAML
72 lines
2.1 KiB
YAML
---
|
|
- name: Test services present
|
|
hosts: ipaserver
|
|
become: true
|
|
gather_facts: true
|
|
|
|
tasks:
|
|
- name: Include generate_test_data.yml
|
|
ansible.builtin.include_tasks: generate_test_data.yml
|
|
|
|
- name: Hosts present len:{{ host_list | length }}
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
hosts: "{{ host_list }}"
|
|
force: true
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Hosts present len:{{ host_list | length }}, again
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
hosts: "{{ host_list }}"
|
|
force: true
|
|
register: result
|
|
failed_when: result.changed or result.failed
|
|
|
|
- name: Services present len:{{ service_list | length }}
|
|
ipaservice:
|
|
ipaadmin_password: SomeADMINpassword
|
|
services: "{{ service_list }}"
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Services present len:{{ service_list | length }}, again
|
|
ipaservice:
|
|
ipaadmin_password: SomeADMINpassword
|
|
services: "{{ service_list }}"
|
|
register: result
|
|
failed_when: result.changed or result.failed
|
|
|
|
- name: Services absent len:{{ service_list | length }}
|
|
ipaservice:
|
|
ipaadmin_password: SomeADMINpassword
|
|
services: "{{ service_absent_list }}"
|
|
state: absent
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Services absent len:{{ service_list | length }}, again
|
|
ipaservice:
|
|
ipaadmin_password: SomeADMINpassword
|
|
services: "{{ service_absent_list }}"
|
|
state: absent
|
|
register: result
|
|
failed_when: result.changed or result.failed
|
|
|
|
- name: Hosts absent len:{{ host_list | length }}
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
hosts: "{{ host_absent_list }}"
|
|
state: absent
|
|
register: result
|
|
failed_when: not result.changed or result.failed
|
|
|
|
- name: Hosts absent len:{{ host_list | length }}, again
|
|
ipahost:
|
|
ipaadmin_password: SomeADMINpassword
|
|
hosts: "{{ host_absent_list }}"
|
|
state: absent
|
|
register: result
|
|
failed_when: result.changed or result.failed
|