Skip to content

Instantly share code, notes, and snippets.

@zwned
Created January 14, 2014 20:55
Show Gist options
  • Save zwned/8425506 to your computer and use it in GitHub Desktop.
Save zwned/8425506 to your computer and use it in GitHub Desktop.
Ansible question
hosts:
[local]
localhost
ext_vars.yml:
users:
user1:
password: password01
comment: user1 comment
user2:
password: password02
comment: user2 comment
user3:
password: password03
comment: user3 comment
users.yml
---
- hosts: all
vars_files:
- ext_vars.yml
tasks:
- user: name:{{item}} password: {{item.password}} comment: {{item.comment}}
with_items: $users
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment