forked from saratov/infra
Increase timeouts on Proxmox actions
This commit is contained in:
parent
c6a0b17627
commit
03362c0ecf
@ -2,6 +2,8 @@
|
|||||||
- set_fact: node_name="{{tmp_node}}"
|
- set_fact: node_name="{{tmp_node}}"
|
||||||
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
||||||
- set_fact: other_nics_to_vlan=false
|
- set_fact: other_nics_to_vlan=false
|
||||||
|
- set_fact:
|
||||||
|
kvm_timeout: 500
|
||||||
|
|
||||||
- name: "[{{vm_name}}] clone VM"
|
- name: "[{{vm_name}}] clone VM"
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
@ -84,6 +86,7 @@
|
|||||||
api_host: "{{env.pve.api_url}}"
|
api_host: "{{env.pve.api_url}}"
|
||||||
name: "{{vm_name}}"
|
name: "{{vm_name}}"
|
||||||
state: started
|
state: started
|
||||||
|
timeout: "{{ kvm_timeout }}"
|
||||||
|
|
||||||
- name: "[{{vm_name}}] wait for qemu-agent return addresses list"
|
- name: "[{{vm_name}}] wait for qemu-agent return addresses list"
|
||||||
proxmox_qemu_agent:
|
proxmox_qemu_agent:
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
- set_fact: node_name="{{tmp_node}}"
|
- set_fact: node_name="{{tmp_node}}"
|
||||||
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
||||||
|
- set_fact:
|
||||||
|
kvm_timeout: 500
|
||||||
|
|
||||||
- name: checking that vm exists
|
- name: checking that vm exists
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
@ -22,7 +24,8 @@
|
|||||||
name: "{{vm_name}}"
|
name: "{{vm_name}}"
|
||||||
state: stopped
|
state: stopped
|
||||||
force: yes
|
force: yes
|
||||||
timeout: 120
|
timeout: "{{ kvm_timeout }}"
|
||||||
|
ignore_errors: yes
|
||||||
- name: destroying vm
|
- name: destroying vm
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
node: srv
|
node: srv
|
||||||
@ -31,4 +34,5 @@
|
|||||||
api_host: "{{env.pve.api_url}}"
|
api_host: "{{env.pve.api_url}}"
|
||||||
name: "{{vm_name}}"
|
name: "{{vm_name}}"
|
||||||
state: absent
|
state: absent
|
||||||
|
timeout: "{{ kvm_timeout }}"
|
||||||
when: vm_exists is succeeded
|
when: vm_exists is succeeded
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
- set_fact: node_name="{{inventory_hostname_short}}"
|
- set_fact: node_name="{{inventory_hostname_short}}"
|
||||||
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
|
||||||
|
- set_fact:
|
||||||
|
kvm_timeout: 500
|
||||||
|
|
||||||
- name: "[{{vm_name}}] enable all VLANs"
|
- name: "[{{vm_name}}] enable all VLANs"
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
@ -20,6 +22,7 @@
|
|||||||
ipconfig0: "ip={{stack.nodes[node_name].net.eth0.ipv4[0]}},gw={{stack.nodes[node_name].net.eth0.default}}"
|
ipconfig0: "ip={{stack.nodes[node_name].net.eth0.ipv4[0]}},gw={{stack.nodes[node_name].net.eth0.default}}"
|
||||||
nameserver: "{{stack.nodes[node_name].net.eth0.nameservers | default(omit) | first}}"
|
nameserver: "{{stack.nodes[node_name].net.eth0.nameservers | default(omit) | first}}"
|
||||||
searchdomain: "{{stack.nodes[node_name].net.eth0.search | default(omit) | first}}"
|
searchdomain: "{{stack.nodes[node_name].net.eth0.search | default(omit) | first}}"
|
||||||
|
timeout: "{{ kvm_timeout }}"
|
||||||
register: vm_status
|
register: vm_status
|
||||||
until: vm_status is succeeded
|
until: vm_status is succeeded
|
||||||
retries: 30
|
retries: 30
|
||||||
|
Loading…
Reference in New Issue
Block a user