Hi Kai
Thanks for that - it worked like a charm on the CLI!
- pre_tasks:
- pause:
prompt: "You are running against production. What is the
magic word?"
register: result
when: env == 'prod'
- fail:
msg: "Aborting, wrong magic."
when: result.user_input | default('') != 'answerable' and env
== 'prod'
I've integrated the playbook with Jenkins - so it doesn't work on there. I
get the following error: [WARNING]: Not waiting from prompt as stdin is
not interactive
But I suppose that's not a problem as we can run DEV/UAT via Jenkins (GUI)
and the PROD environment via CLI.
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/8bfcbdfc-a669-4f62-af4a-2b57fa05b30c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.