Authored by chunhua.zhang

confirm

- hosts: java-nginx
vars_prompt:
- name: "confirmation"
prompt: "please confirm to sync and refresh java-nginx configuration. Type [YES] to continue"
remote_user: root
roles:
- openresty
... ...
... ... @@ -7,3 +7,5 @@ path: "/Data/local/openresty-1.9.15.1"
# nameserver config for nginx
nameservers: ''
confirmation: ''
... ...
---
# tasks file for openresty
# make sure user type YES
- name: "make sure user type YES to confirm"
fail:
msg: "user do not type YES"
when: confirmation != 'YES'
# make sure path exist
- stat:
path: "{{ path }}"
... ...