Don't set password for root. Just lock account.
This commit is contained in:
parent
54b5a74f54
commit
d54fe7975c
1 changed files with 1 additions and 7 deletions
|
@ -40,16 +40,10 @@
|
|||
delegate_to: localhost
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: generate root password
|
||||
command: "/srv/ansible/scripts/genpasswd {{ inventory_hostname }}"
|
||||
register: root_password
|
||||
delegate_to: localhost
|
||||
when: inventory_hostname not in result.list_vms
|
||||
|
||||
- name: create inject file
|
||||
copy:
|
||||
content: |
|
||||
rootpw --iscrypted {{ root_password.stdout }}
|
||||
rootpw --lock
|
||||
%post
|
||||
umask 077
|
||||
mkdir -p /root/.ssh
|
||||
|
|
Loading…
Add table
Reference in a new issue