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}}"
|
pool: "{{env_name}}"
|
||||||
clone: "{{stack.nodes[node_name].template}}"
|
clone: "{{stack.nodes[node_name].template}}"
|
||||||
full: no
|
full: no
|
||||||
# storage: "{{env.pve.storage}}"
|
timeout: 120
|
||||||
timeout: 90
|
state: present
|
||||||
# state: present
|
|
||||||
|
|
||||||
- name: "[{{vm_name}}] get VM state"
|
- name: "[{{vm_name}}] get VM state"
|
||||||
proxmox_kvm:
|
proxmox_kvm:
|
||||||
@ -26,7 +25,6 @@
|
|||||||
api_password: "{{env.pve.password}}"
|
api_password: "{{env.pve.password}}"
|
||||||
api_host: "{{env.pve.api_url}}"
|
api_host: "{{env.pve.api_url}}"
|
||||||
name: "{{vm_name}}"
|
name: "{{vm_name}}"
|
||||||
agent: yes
|
|
||||||
state: current
|
state: current
|
||||||
register: vm_status
|
register: vm_status
|
||||||
until: vm_status is succeeded
|
until: vm_status is succeeded
|
||||||
@ -34,6 +32,20 @@
|
|||||||
delay: 1
|
delay: 1
|
||||||
ignore_errors: yes
|
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"
|
- name: "[{{vm_name}}] get VM`s ip addresses"
|
||||||
proxmox_qemu_agent:
|
proxmox_qemu_agent:
|
||||||
api_user: "{{env.pve.username}}"
|
api_user: "{{env.pve.username}}"
|
||||||
@ -64,11 +76,8 @@
|
|||||||
kvm: yes
|
kvm: yes
|
||||||
cores: "{{stack.nodes[node_name].cores}}"
|
cores: "{{stack.nodes[node_name].cores}}"
|
||||||
memory: "{{stack.nodes[node_name].mem}}"
|
memory: "{{stack.nodes[node_name].mem}}"
|
||||||
# storage: "{{env.pve.storage}}"
|
|
||||||
net: "{{stack.nodes[node_name].net | to_proxmox_net(other_nics_to_vlan)}}"
|
net: "{{stack.nodes[node_name].net | to_proxmox_net(other_nics_to_vlan)}}"
|
||||||
update: yes
|
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}}"
|
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}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user