forked from ISTI-ansible-roles/ansible-roles
library/roles/users: Set the new users password as '*' by default. Otherwise they cannot login with their ssh keys when the ssh server does not use PAM for authentication
This commit is contained in:
parent
e7ed62bed2
commit
ac7d99d78c
|
@ -9,6 +9,8 @@ users_sudoers_group: sudo
|
||||||
users_sudoers_create_group: False
|
users_sudoers_create_group: False
|
||||||
users_sudoers_create_sudo_conf: False
|
users_sudoers_create_sudo_conf: False
|
||||||
users_home_dir: /home
|
users_home_dir: /home
|
||||||
|
users_default_password: '*'
|
||||||
|
users_update_password: 'on_create'
|
||||||
#users_system_users:
|
#users_system_users:
|
||||||
# - { login: 'adellam', name: "Andrea Dell'Amico", home: '{{ users_home_dir }}', createhome: 'yes', ssh_key: '{{ adellam_ssh_key }}', shell: '/bin/bash', admin: False, log_as_root: False }
|
# - { login: 'foo', name: "Foo Bar", home: '{{ users_home_dir }}', createhome: 'yes', ssh_key: '{{ foo_ssh_key }}', shell: '/bin/bash', admin: False, log_as_root: False }
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
tags: users
|
tags: users
|
||||||
|
|
||||||
- name: Create users
|
- name: Create users
|
||||||
user: name={{ item.login }} comment="{{ item.name }}" home={{ item.home }}/{{ item.login }} createhome={{ item.createhome }} shell={{ item.shell }}
|
user: name={{ item.login }} comment="{{ item.name }}" home={{ item.home }}/{{ item.login }} createhome={{ item.createhome }} shell={{ item.shell }} password={{ item.password | default('*') }} update_password={{ item.update_password | default('on_create') }}
|
||||||
with_items: '{{ users_system_users }}'
|
with_items: '{{ users_system_users }}'
|
||||||
when: users_system_users is defined
|
when: users_system_users is defined
|
||||||
tags: users
|
tags: users
|
||||||
|
|
Loading…
Reference in New Issue