Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Inventory:
- [users]
- user1id user_port=8001 username="user1"
- user2id user_port=8002 username="user2"
- Template file:
- {% for host in groups['users'] %}
- grab the "username" only: {{ hostvars[host].username }}
- {% endfor %}
Add Comment
Please, Sign In to add comment