Update file main.yml
This commit is contained in:
parent
aac697dddd
commit
e2ea1a2fcd
@ -2,7 +2,7 @@
|
||||
- name: Check if container already exists
|
||||
shell: pct list | grep 221 || true
|
||||
register: container_check
|
||||
delegate_to: "{{ groups['proxmox_servers'][0] }}"
|
||||
delegate_to: proxmox
|
||||
changed_when: false
|
||||
|
||||
- name: Create Gateway LXC container using pct command
|
||||
@ -21,12 +21,12 @@
|
||||
--start 1
|
||||
args:
|
||||
executable: /bin/bash
|
||||
delegate_to: "{{ groups['proxmox_servers'][0] }}"
|
||||
delegate_to: proxmox
|
||||
when: "'221' not in container_check.stdout"
|
||||
|
||||
- name: Wait for container to start
|
||||
wait_for_connection:
|
||||
host: 192.168.1.221
|
||||
port: 22
|
||||
timeout: 60
|
||||
delay: 5
|
||||
timeout: 120
|
||||
delay: 10
|
||||
Loading…
Reference in New Issue
Block a user