Created
March 17, 2016 18:46
-
-
Save colbygk/1698edafc1f9fe7344bf to your computer and use it in GitHub Desktop.
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
- name: Setup Users | |
sudo: yes | |
user: | |
name: "{{ item }}" | |
comment: "{{ vault['linux'][item]['comment'] | default('No comment') }}" | |
createhome: "{{ vault['linux'][item]['createhome'] | default('yes') }}" | |
password: "{{ vault['linux'][item]['password'] | default('nopassword') }}" | |
state: "{{ vault['linux'][item]['state'] | default('present') }}" | |
shell: "{{ vault['linux'][item]['shell'] | default('/bin/bash') }}" | |
groups: "{{ vault['linux'][item]['groups'] | default(item) }}" | |
with_flattened: | |
"{{ auth_groups | default(['admin_users']) }}" | |
tags: | |
- users |
admin_users:
- user1
- user2
- user3
- user4
developers:
- user5
- user7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{admin_users}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. [DEPRECATION WARNING]: Using bare variables is deprecated. Update your playbooks so that the environment value uses the full variable syntax ('{{developers}}'). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.