Remove debugging;Housekeeping;Rename dict

This commit is contained in:
2022-06-27 10:55:17 +02:00
parent 1cdbcaccaf
commit 8f432d3353
6 changed files with 10 additions and 14 deletions

View File

@ -1,14 +1,14 @@
- name: Set root password
ansible.builtin.user:
name: root
password: "{{ ovfproperties['guestinfo.rootpw'] | password_hash('sha512', 65534 | random(seed=ovfproperties['guestinfo.hostname']) | string) }}"
password: "{{ vapp['guestinfo.rootpw'] | password_hash('sha512', 65534 | random(seed=vapp['guestinfo.hostname']) | string) }}"
generate_ssh_key: yes
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
- name: Save root SSH publickey
ansible.builtin.lineinfile:
path: /root/.ssh/authorized_keys
line: "{{ ovfproperties['guestinfo.rootsshkey'] }}"
line: "{{ vapp['guestinfo.rootsshkey'] }}"
- name: Disable SSH password authentication
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config