chore: rename .yaml extensions to .yml for consistency
This commit is contained in:
20
roles/proxmox-lxc-provision/tasks/wait.yml
Executable file
20
roles/proxmox-lxc-provision/tasks/wait.yml
Executable file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- ansible.builtin.meta: refresh_inventory
|
||||
|
||||
- name: Wait a moment for container to be available in inventory
|
||||
ansible.builtin.pause:
|
||||
seconds: 2
|
||||
|
||||
- name: Debug - Check if container is in inventory
|
||||
ansible.builtin.debug:
|
||||
msg: "Container {{ lxc_hostname }} found with IP: {{ hostvars[lxc_hostname]['ansible_host'] | default('NOT FOUND') }}"
|
||||
|
||||
|
||||
- name: Wait for SSH to become available
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ hostvars[lxc_hostname]['ansible_host'] }}"
|
||||
port: 22
|
||||
delay: 3
|
||||
state: started
|
||||
register: ssh_wait_result
|
||||
until: ssh_wait_result is not failed
|
||||
Reference in New Issue
Block a user