initial commit
This commit is contained in:
27
roles/proxmox-lxc-provision/tasks/post-clone.yaml
Executable file
27
roles/proxmox-lxc-provision/tasks/post-clone.yaml
Executable file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Change root password
|
||||
ansible.builtin.user:
|
||||
name: root
|
||||
password: "{{ container_password | password_hash('sha512') }}"
|
||||
update_password: always
|
||||
when: container_password is defined
|
||||
|
||||
- name: Change admin password
|
||||
ansible.builtin.user:
|
||||
name: admin
|
||||
password: "{{ password | password_hash('sha512') }}"
|
||||
update_password: always
|
||||
when: password is defined
|
||||
|
||||
- name: Regenerate SSH host keys
|
||||
ansible.builtin.include_role:
|
||||
name: system-setup
|
||||
tasks_from: ssh
|
||||
vars:
|
||||
regenerate_ssh_keys: true
|
||||
|
||||
- name: Remove previous entry from known hosts
|
||||
ansible.builtin.known_hosts:
|
||||
name: "{{ hostvars[container_hostname]['ansible_host'] }}"
|
||||
state: absent
|
||||
delegate_to: localhost
|
||||
Reference in New Issue
Block a user