mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-30 19:34:45 +00:00
Allow multiple services creation
Adding an option to create multiple services in one go. Adding tests (present/absent/without_skip_host_check) Copied from PR #1054 Signed-off-by: Denis Karpelevich <dkarpele@redhat.com>
This commit is contained in:
committed by
Thomas Woerner
parent
180afd7586
commit
0d9873b81c
39
tests/service/test_services_present.yml
Normal file
39
tests/service/test_services_present.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
- name: Include create_services_json.yml
|
||||
ansible.builtin.import_playbook: create_services_json.yml
|
||||
|
||||
- name: Test services present
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Include services.json
|
||||
ansible.builtin.include_vars:
|
||||
file: services.json # noqa 505
|
||||
|
||||
- name: Include hosts.json
|
||||
ansible.builtin.include_vars:
|
||||
file: hosts.json # noqa 505
|
||||
|
||||
- name: Hosts present len:{{ host_list | length }}
|
||||
ipahost:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
hosts: "{{ host_list }}"
|
||||
|
||||
- name: Services present len:{{ service_list | length }}
|
||||
ipaservice:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
services: "{{ service_list }}"
|
||||
|
||||
- name: Remove services.json
|
||||
hosts: localhost
|
||||
tasks:
|
||||
- name: Remove services.json
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: services.json
|
||||
- name: Remove hosts.json
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: hosts.json
|
||||
Reference in New Issue
Block a user