My case is:
- I have a main.yml which includes A.yml and B.yml.
- A.yml and B.yml have different hosts.
- I have a password which is used in A.yml and B.yml.
I want to use vars_prompt to set password and my expectation is only to prompt once to input password. But I didn’t find out the solution.
If I set vars_prompt in mainl.yml, A.yml and B.yml cannot get the variable.
It seems that I must set vars_prompt in both A.yml and B.yml. It means I have to input the same password twice.
Anybody knows how to implement my case with prompt once? Thank you!