--- - hosts: local gather_facts: no vars_prompt: - name: dest_env prompt: "Enter the destination ENV to be installed (eg. dev, qa or default: prd)? " default: "" private: no when: dest_env is not defined - name: src_env prompt: "Enter the source ENV to use as the base for packages (eg. dev, qa or default: prd)? " default: "prd" private: no when: src_env is not defined - name: force prompt: "Would you like to force all packages to be re-deployed? " default: "no" private: no when: force is not defined - name: confirmation prompt: "Are you sure you want to run this playbook for PRODUCTION? Answer with 'YES'" default: "NO" private: no when: dest_env == "prd"
vars: ensure_packages: - app: "test" tasks: # - include_vars: ../../vault/{{ tower_user_name|default(lookup('env','USER')) }}.yml - name: Check confirmation fail: msg="Playbook run confirmation failed" when: confirmation != "YES" and dest_env == "prd" - name: deploy the specified applications and their associated dependencies # ignore_errors: yes pause: seconds: "5" with_items: ensure_packages -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ad71cc40-3982-48af-b51f-49855835d237%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.