Use ansible_domain everywhere and bail out if it is empty.
This commit is contained in:
parent
bbcf45bbeb
commit
ed8b7a7fa6
12 changed files with 32 additions and 25 deletions
|
@ -1,6 +1,8 @@
|
|||
## Install and configure slapd (if not done yet),
|
||||
## run most tasks only on slapd installation.
|
||||
---
|
||||
- fail: msg="The machine's domain must not be empty."
|
||||
when: ansible_domain | length == 0
|
||||
|
||||
- name: check if slapd is already there
|
||||
stat: path=/usr/sbin/slapd
|
||||
|
@ -10,7 +12,7 @@
|
|||
debconf:
|
||||
name: slapd
|
||||
question: slapd/domain
|
||||
value: "{{ ldap_domain }}"
|
||||
value: "{{ ansible_domain }}"
|
||||
vtype: string
|
||||
when: not slapd.stat.exists
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue