prompt_vars again / multiple times

Is there a possibility to prompt a variable again? Currently if you prompt a variable in the first play, you can’t prompt for the same variable in the second play. Here is my (example) playbook:

`

  • name: setup ansible-ci agents
    hosts: jenkins-agents
    vars_prompt:
  • name: ansible_become_pass
    prompt: “SUDO password for agents machine”
    private: yes

roles:

  • agent

  • name: install ansible-ci server
    hosts: jenkins-server
    vars_prompt:

  • name: ansible_become_pass
    prompt: “SUDO password for server”
    private: yes

roles:

  • ansible-ci

`

I don’t know why, but I am just getting ask for the var of the first play and not a second time.

confirmed, works if the var name are different, but is skipped if they
are the same, probably the culprit is the list of 'already prompted
for' being cached across plays.

Thank you for quick reply and investigation. Have you created a bug ticket I can subscribe to?

no, feel free to do so, i have a 'fix' but I'm not sure what it
breaks, so checking with other devs.

ok. here is the related ticket - https://github.com/ansible/ansible/issues/13363