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:
Andrea Dell'Amico 2016-09-08 12:06:23 +02:00
parent e7ed62bed2
commit ac7d99d78c
2 changed files with 4 additions and 2 deletions

View File

@ -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 }

View File

@ -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