|
|
---
|
|
|
# tasks file for openresty
|
|
|
|
|
|
# make sure path exist
|
|
|
- stat:
|
|
|
path: "{{ path }}"
|
|
|
register: stat_result
|
...
|
...
|
@@ -9,9 +10,19 @@ |
|
|
when: stat_result.stat.exists == False
|
|
|
|
|
|
|
|
|
# make sure vaviable exist
|
|
|
- name: make sure varivable exists
|
|
|
fail:
|
|
|
msg: "{{ item }} not exits!"
|
|
|
when: {{item}} == ''
|
|
|
with_items:
|
|
|
- nameservers
|
|
|
|
|
|
|
|
|
# make sure group exists
|
|
|
- name: make sure groups exist in inventory file
|
|
|
fail:
|
|
|
msg: "group {{ g }} not exist!"
|
|
|
msg: "group {{ item }} not exist!"
|
|
|
when: item not in groups
|
|
|
with_items:
|
|
|
- java-nginx
|
...
|
...
|
|