i.e. ansible-playbook -i hosts deploy.yml --extra-vars "env=uat"
Note: Ansible's user module can be used to push out new ssh authorized keys.
Apologies if this solution is off the mark but my background is in information security.
- pre_tasks:- pause:prompt: "You are running against production. What is the magic word?"register: resultwhen: env == 'prod'- fail:msg: "Aborting, wrong magic."when: result.user_input | default('') != 'answerable' and env == 'prod'
--
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+unsubscribe@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/8bfcbdfc-a669-4f62-af4a-2b57fa05b30c%40googlegroups.com.