Authored by chunhua.zhang

add check

@@ -2,6 +2,29 @@ @@ -2,6 +2,29 @@
2 # tasks file for openresty 2 # tasks file for openresty
3 # Configure resolv.conf 3 # Configure resolv.conf
4 4
  5 +
  6 +- name: make sure openresty foler exist
  7 + stat:
  8 + path: "{{ path }}"
  9 + register: stat_result
  10 + fail:
  11 + msg: " openresty {{ path }} not exist!"
  12 + when: stat_result.stat.exists == False
  13 +
  14 +
  15 +- name: make sure groups exist in inventory file
  16 + fail:
  17 + msg: "group {{ g }} not exist!"
  18 + when: item not in groups
  19 + with_items:
  20 + - java-nginx
  21 + - java-gateway
  22 + - java-brower
  23 + - java-wechat
  24 + - java-activity
  25 + - java-erpgateway
  26 + - java-union
  27 +
5 - name: copy lualib files to openresty 28 - name: copy lualib files to openresty
6 copy: 29 copy:
7 src: lualib/resty/ 30 src: lualib/resty/