Skip to content

Instantly share code, notes, and snippets.

@SergK
Created September 19, 2016 13:04
Show Gist options
  • Save SergK/2f48d169260d0af1486e8824d67d11a1 to your computer and use it in GitHub Desktop.
Save SergK/2f48d169260d0af1486e8824d67d11a1 to your computer and use it in GitHub Desktop.
working with spaces
users:
Alice:
groups:
- Admin
- Group with Spaces
full_name: Alice Doe
email: adoe@example.com
Bob:
groups:
- Publisher
- Group with Spaces
full_name: Bob No
email: bno@example.com
Example to use command:
$ manage \
--user username \
--full-name fuel_user_name \
--group group1 \
--group group2 \
--group group3
Ansible task:
- name: Create Users
command: >
manage
--user \"{{ item.key }}\"
--full-name \"{{ item.value.full_name }}\"
--group {{ item.value.groups | join(' --group ') }}
with_dict: "{{ users }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment