Reputation: 23
I'm new to an Ansible
simply i say, I wanna make a confirmation alert after tasks is started.
due to I have to use setup facts which is hosts addresses in my alert.
my process is below
is there any way to resolve it?
thank you.
Upvotes: 0
Views: 439
Reputation: 1716
I think Start and Step will do what you want assuming you don't have a lot of tasks in your playbook.
Run your playbook like:
ansible-playbook playbook.yml --step
From the docs:
This will cause ansible to stop on each task, and ask if it should execute that task.
The tradeoff is that you're going to get prompted for every task, so this is really only suitable if the number of tasks is small. Also, do you really want to run your playbook interactively?
Upvotes: 1
Reputation: 68269
You may want to try pause module.
- pause: prompt="Make sure that {{my_custom_fact_ip_address}} is correct..."
Upvotes: 0