Remove debugging;Housekeeping;Rename dict
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user