Increase timeouts on Proxmox actions

This commit is contained in:
Игорь Чудов 2019-11-20 17:09:23 +04:00
parent c6a0b17627
commit 03362c0ecf
Signed by untrusted user: nir
GPG Key ID: 0F3883600CAE7AAC
3 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,8 @@
- set_fact: node_name="{{tmp_node}}"
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
- set_fact: other_nics_to_vlan=false
- set_fact:
kvm_timeout: 500
- name: "[{{vm_name}}] clone VM"
proxmox_kvm:
@ -84,6 +86,7 @@
api_host: "{{env.pve.api_url}}"
name: "{{vm_name}}"
state: started
timeout: "{{ kvm_timeout }}"
- name: "[{{vm_name}}] wait for qemu-agent return addresses list"
proxmox_qemu_agent:

View File

@ -1,5 +1,7 @@
- set_fact: node_name="{{tmp_node}}"
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
- set_fact:
kvm_timeout: 500
- name: checking that vm exists
proxmox_kvm:
@ -22,7 +24,8 @@
name: "{{vm_name}}"
state: stopped
force: yes
timeout: 120
timeout: "{{ kvm_timeout }}"
ignore_errors: yes
- name: destroying vm
proxmox_kvm:
node: srv
@ -31,4 +34,5 @@
api_host: "{{env.pve.api_url}}"
name: "{{vm_name}}"
state: absent
timeout: "{{ kvm_timeout }}"
when: vm_exists is succeeded

View File

@ -1,6 +1,8 @@
---
- set_fact: node_name="{{inventory_hostname_short}}"
- set_fact: vm_name="{{node_name}}.{{stack.name}}"
- set_fact:
kvm_timeout: 500
- name: "[{{vm_name}}] enable all VLANs"
proxmox_kvm:
@ -20,6 +22,7 @@
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}}"
searchdomain: "{{stack.nodes[node_name].net.eth0.search | default(omit) | first}}"
timeout: "{{ kvm_timeout }}"
register: vm_status
until: vm_status is succeeded
retries: 30