Created
September 19, 2016 13:04
-
-
Save SergK/2f48d169260d0af1486e8824d67d11a1 to your computer and use it in GitHub Desktop.
working with spaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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