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
|
delegate_to: localhost
|
||||||
when: inventory_hostname not in result.list_vms
|
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
|
- name: create inject file
|
||||||
copy:
|
copy:
|
||||||
content: |
|
content: |
|
||||||
rootpw --iscrypted {{ root_password.stdout }}
|
rootpw --lock
|
||||||
%post
|
%post
|
||||||
umask 077
|
umask 077
|
||||||
mkdir -p /root/.ssh
|
mkdir -p /root/.ssh
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue