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