Ansible vars_prompt value in menu -


i have playbook

- hosts: "{{ host }}"   connection: paramiko   gather_facts: no   serial: 1   user: administrator   vars_prompt:     - name: host       prompt: "select router change default route?\n1- test01\n2- test02\n"       default: 1       private: no    tasks:     - debug: msg="{{ host }}" 

inventory:

[1] 192.168.10.100  [2] 192.168.10.102 

but need inventory:

[test01] 192.168.10.100  [test02] 192.168.10.102 

if enter eg 1, host variable contains 1, , need test01

looks requirement simple string concatenation:

- debug: msg="{{ 'test0' + host }}" 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -