forked from saratov/infra
Force enabling QEMU guest agent
This commit is contained in:
parent
17ecb2d824
commit
d39a7788fa
@ -15,9 +15,8 @@
|
||||
pool: "{{env_name}}"
|
||||
clone: "{{stack.nodes[node_name].template}}"
|
||||
full: no
|
||||
# storage: "{{env.pve.storage}}"
|
||||
timeout: 90
|
||||
# state: present
|
||||
timeout: 120
|
||||
state: present
|
||||
|
||||
- name: "[{{vm_name}}] get VM state"
|
||||
proxmox_kvm:
|
||||
@ -26,7 +25,6 @@
|
||||
api_password: "{{env.pve.password}}"
|
||||
api_host: "{{env.pve.api_url}}"
|
||||
name: "{{vm_name}}"
|
||||
agent: yes
|
||||
state: current
|
||||
register: vm_status
|
||||
until: vm_status is succeeded
|
||||
@ -34,6 +32,20 @@
|
||||
delay: 1
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "[{{vm_name}}] enable QEMU guest agent"
|
||||
proxmox_kvm:
|
||||
node: pve
|
||||
api_user: "{{env.pve.username}}"
|
||||
api_password: "{{env.pve.password}}"
|
||||
api_host: "{{env.pve.api_url}}"
|
||||
name: "{{vm_name}}"
|
||||
agent: yes
|
||||
update: yes
|
||||
timeout: 120
|
||||
retries: 30
|
||||
delay: 1
|
||||
ignore_errors: yes
|
||||
|
||||
- name: "[{{vm_name}}] get VM`s ip addresses"
|
||||
proxmox_qemu_agent:
|
||||
api_user: "{{env.pve.username}}"
|
||||
@ -64,11 +76,8 @@
|
||||
kvm: yes
|
||||
cores: "{{stack.nodes[node_name].cores}}"
|
||||
memory: "{{stack.nodes[node_name].mem}}"
|
||||
# storage: "{{env.pve.storage}}"
|
||||
net: "{{stack.nodes[node_name].net | to_proxmox_net(other_nics_to_vlan)}}"
|
||||
update: yes
|
||||
state: present
|
||||
# ide: '{ide[2]: "local-lvm:cloudinit"}'
|
||||
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}}"
|
||||
|
Loading…
Reference in New Issue
Block a user