mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 19:04:42 +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
22
tests/service/create_services_json.yml
Normal file
22
tests/service/create_services_json.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Create services.json
|
||||
hosts: localhost
|
||||
|
||||
tasks:
|
||||
- name: Check if services.json exists
|
||||
ansible.builtin.stat:
|
||||
path: services.json
|
||||
register: register_stat_services
|
||||
|
||||
- name: Create services.json
|
||||
ansible.builtin.command: /bin/bash services.sh 500
|
||||
when: not register_stat_services.stat.exists
|
||||
|
||||
- name: Check if hosts.json exists
|
||||
ansible.builtin.stat:
|
||||
path: hosts.json
|
||||
register: register_stat_hosts
|
||||
|
||||
- name: Create hosts.json
|
||||
ansible.builtin.command: /bin/bash hosts.sh 500
|
||||
when: not register_stat_hosts.stat.exists
|
||||
Reference in New Issue
Block a user