30 lines
748 B
YAML
30 lines
748 B
YAML
---
|
|
- name: [users] Ensure wheel group exists
|
|
group:
|
|
name: wheel
|
|
state: present
|
|
|
|
- name: [users] Add deploy users
|
|
user:
|
|
name: "{{ item.username }}"
|
|
password: "{{ item.password | password_hash('sha512')}}"
|
|
group: "{{ item.group }}"
|
|
groups: "{{ item.groups }}"
|
|
uid: "{{ item.uid }}"
|
|
shell: "{{ prompt_place['stdout'] }}"
|
|
state: present
|
|
with_items: "{{ deploy_users }}"
|
|
when: create_user
|
|
|
|
- name: [users] Add me
|
|
user:
|
|
name: "{{ item.username }}"
|
|
password: "{{ item.password | password_hash('sha512')}}"
|
|
group: "{{ item.group }}"
|
|
groups: "{{ item.groups }}"
|
|
uid: "{{ item.uid }}"
|
|
shell: "{{ prompt_place['stdout'] }}"
|
|
state: present
|
|
with_items: "{{ me }}"
|
|
when: create_user
|