Forum Discussion

NetCohort's avatar
NetCohort
Icon for Altocumulus rankAltocumulus
May 21, 2019

Ansible and vars_prompt feature

Hi guys,

does anybody know how to inlcude the vars_prompt feature of ansible in a playbook if the vars_prompt file is written in a separate file?

At the moment I define the vars_promp in each playbook, but I want to reuse this defintion and separate the "vars_prompt" part to a file.

---


- name: An example
  hosts: bigips
  connection: local

  vars_prompt:
    - name: "username"
      prompt: "Eingabe BIG-IP username"
      private: no
    - name: "password"
      prompt: "Eingabe BIG-IP password"
      private: yes

If I try to move it to an separate file and want to include the file I got the message:

 [WARNING]: Found variable using reserved name: vars_prompt


 [WARNING]: Found variable using reserved name: name

Kind regards

No RepliesBe the first to reply