I have playbook

- hosts: "{{ host }}"
  connection: paramiko
  gather_facts: no
  serial: 1
  user: administrator
  vars_prompt:
    - name: host
      prompt: "select the router to 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 I need inventory:

[Test01]
192.168.10.100

[Test02]
192.168.10.102

If you enter eg 1, the host variable contains 1, and I need to get Test01

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/11007252-d2c2-4b2b-a527-2298df9faa6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to