fix(environment): move SSH switchover into _configure_network.yml before prepare_installer
This commit is contained in:
22
main.yml
22
main.yml
@@ -129,28 +129,6 @@
|
|||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: environment
|
name: environment
|
||||||
|
|
||||||
- name: Switch to SSH connection for VMware
|
|
||||||
when:
|
|
||||||
- hypervisor_type == "vmware"
|
|
||||||
- hypervisor_cfg.ssh | default(false) | bool
|
|
||||||
- system_cfg.network.ip | default('') | string | length > 0
|
|
||||||
block:
|
|
||||||
- name: Set SSH connection variables
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
ansible_connection: ssh
|
|
||||||
ansible_user: root
|
|
||||||
ansible_password: ""
|
|
||||||
ansible_host: "{{ system_cfg.network.ip }}"
|
|
||||||
ansible_ssh_extra_args: "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
|
||||||
|
|
||||||
- name: Reset VMware Tools connection
|
|
||||||
ansible.builtin.meta: reset_connection
|
|
||||||
|
|
||||||
- name: Verify SSH connectivity
|
|
||||||
ansible.builtin.wait_for_connection:
|
|
||||||
timeout: 30
|
|
||||||
delay: 2
|
|
||||||
|
|
||||||
- name: Partition disks
|
- name: Partition disks
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: partitioning
|
name: partitioning
|
||||||
|
|||||||
@@ -83,3 +83,19 @@
|
|||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: sshd
|
name: sshd
|
||||||
state: reloaded
|
state: reloaded
|
||||||
|
|
||||||
|
- name: Switch to SSH connection
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ansible_connection: ssh
|
||||||
|
ansible_user: root
|
||||||
|
ansible_password: ""
|
||||||
|
ansible_host: "{{ system_cfg.network.ip }}"
|
||||||
|
ansible_ssh_extra_args: "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||||
|
|
||||||
|
- name: Reset connection for SSH switchover
|
||||||
|
ansible.builtin.meta: reset_connection
|
||||||
|
|
||||||
|
- name: Verify SSH connectivity
|
||||||
|
ansible.builtin.wait_for_connection:
|
||||||
|
timeout: 30
|
||||||
|
delay: 2
|
||||||
|
|||||||
Reference in New Issue
Block a user