mirror of
https://github.com/Ownercz/ssme-thesis.git
synced 2024-11-25 19:15:13 +01:00
15 lines
800 B
YAML
15 lines
800 B
YAML
- name: Ansible created sudo accounts
|
|
user: name={{ item.username }} state=present groups="users,wheel" update_password="{{ item.updatepassword }}" password="{{ item.password | password_hash('sha512') }}" comment='Ansible created "{{ item.username }}" sudo account'
|
|
sudo: yes
|
|
when: item.issudo == True
|
|
with_items: '{{ users }}'
|
|
|
|
- name: Ansible created regular accounts
|
|
user: name={{ item.username }} state=present groups="users" update_password="{{ item.updatepassword }}" password="{{ item.password | password_hash('sha512') }}" comment='Ansible created "{{ item.username }}" regular account'
|
|
sudo: yes
|
|
when: item.issudo == False
|
|
with_items: '{{ users }}'
|
|
|
|
# - debug:
|
|
# msg:"{{ item.password | password_hash('sha512') }}"
|
|
# with_items: '{{ users }}' |