add logic to find certificate
This commit is contained in:
parent
9236311180
commit
6a69e7f683
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,12 @@
|
||||||
register: certificate_folder
|
register: certificate_folder
|
||||||
loop: "{{ vhosts }}"
|
loop: "{{ vhosts }}"
|
||||||
|
|
||||||
|
- name: Evaluate if need certificate
|
||||||
|
set_fact:
|
||||||
|
need_certificate: true
|
||||||
|
when: not item.stat.exists
|
||||||
|
loop: "{{ certificate_folder }}"
|
||||||
|
|
||||||
- name: Ensure certificate is created
|
- name: Ensure certificate is created
|
||||||
include_tasks: configure_certificate.yml
|
include_tasks: configure_certificate.yml
|
||||||
when: not certificate_folder.stat.exists
|
when: need_certificate
|
||||||
|
|
Loading…
Reference in a new issue