Skip to content

Instantly share code, notes, and snippets.

Created March 25, 2015 13:23
Show Gist options
  • Save anonymous/b6589d6fd619ded90bf0 to your computer and use it in GitHub Desktop.
Save anonymous/b6589d6fd619ded90bf0 to your computer and use it in GitHub Desktop.
- name: Add all group1 users
user: name={{ item.key }} group=group1 comment="{{ item.value.name }}" password="<REMOVED>" update_password=on_create shell=/bin/bash
with_dict: group1
register: group1_users
- name: Add all group2 users
user: name={{ item.key }} group=group1 comment="{{ item.value.name }}" password="<REMOVED>" update_password=on_create shell=/bin/bash
with_dict: group2
register: group2_users
users:
group1:
user1:
name: Full Name
user2:
name: Full Name
group2:
user3:
name: Full Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment