check if ipa service entry exists
This commit is contained in:
parent
648f128f80
commit
98475f6ae4
1 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,15 @@
|
|||
- config
|
||||
- krb5
|
||||
|
||||
- name: Check if service exists
|
||||
delegate_to: "{{ ipa_server }}"
|
||||
stat:
|
||||
path: "{{ service }}/{{ host }}"
|
||||
register: ipa_service_defined
|
||||
tags:
|
||||
- config
|
||||
- krb5
|
||||
|
||||
- name: Create service entry
|
||||
delegate_to: "{{ ipa_server }}"
|
||||
ipaservice:
|
||||
|
@ -16,6 +25,7 @@
|
|||
name: "{{ service }}/{{ host }}"
|
||||
principal: "{{ principal_alias | default(omit) }}"
|
||||
force: yes
|
||||
when: not ipa_service_defined.stat.exists
|
||||
tags:
|
||||
- config
|
||||
- krb5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue