Article 53WTP Ansible dictionaries and var_prompt

Ansible dictionaries and var_prompt

by
prayag_pjs
from LinuxQuestions.org on (#53WTP)
I have a dictionary of users in ansible :

Code:---
- hosts: localhost
become: yes
vars:
users:
alice:
name: Alice Appleworth
telephone: 123-456-7890
bob:
name: Bob Bananarama
telephone: 987-654-3210I want to prompt user to enter either alice or bob, something like below :

Code:- hosts: localhost
become: yes
vars_prompt:
- name: users
prompt: enter user
private: no # But here what is the equivalent of below dictionary in vars_prompt -
Code: users:
alice:
name: Alice Appleworth
telephone: 123-456-7890
bob:
name: Bob Bananarama
telephone: 987-654-3210[/CODE]

I want to achieve below with vars_prompt and with_dict
Below is just an example :
When user bob is selected create user on server1 and when alice is selected create user on server2latest?d=yIl2AUoC8zA latest?i=x46GrQq9bLU:0N3GzlUiRik:F7zBnMy latest?i=x46GrQq9bLU:0N3GzlUiRik:V_sGLiP latest?d=qj6IDK7rITs latest?i=x46GrQq9bLU:0N3GzlUiRik:gIN9vFwx46GrQq9bLU
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments