Issue re-using variables in vars_prompt

11 views
Skip to first unread message

Matt SF

unread,
May 15, 2019, 4:30:43 AM5/15/19
to Ansible Project
Hello,

The following playbook extract used to work with Ansible 2.4 :

---
- hosts: localhost
  gather_facts
: no
  vars_prompt
:
   
- name: "user_password"
      prompt
: "Shadow password"
     
private: no
   
- name: "user_password_prod"
      prompt
: "Shadow password for prod (Enter to keep the same)"
     
private: no
     
default: "{{ user_password }}"

Now using Ansible 2.7.8 I get an error :
ERROR! 'user_password' is undefined

The playbook does not even prompt me at all.

Is there a workaround for this ? How else can I re-use a previous variable as a default in a prompt ?
Thank you for your help.
Mathieu.
Reply all
Reply to author
Forward
0 new messages