qiyutech.proxmox.hl_qemu_snapshot module – QEMU 虚拟机 快照 创建/删除 接口

备注

This module is part of the qiyutech.proxmox collection (version 1.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install qiyutech.proxmox.

To use it in a playbook, specify: qiyutech.proxmox.hl_qemu_snapshot.

1.0.0 新版功能: of qiyutech.proxmox

Synopsis

  • 创建、获取 QEMU 虚拟机 快照

备注

This module has a corresponding action plugin.

Parameters

Parameter

Comments

description

string

快照描述

host

string / required

Proxmox API server

这个参数是必须的

参数获取顺序:

1 host 任务参数

2 proxmox_host 变量 (aka: task_vars 中的 proxmox_host 变量)

3 PROXMOX_HOST 任务环境变量

4 PROXMOX_HOST 全局环境变量

node

string / required

PVE集群节点名称

snapname

string / required

快照名称

state

string

快照状态

present 如果不存在则创建此快照

absent 如果存在则删除此快照

Choices:

  • present ← (default)

  • absent

token_id

string / required

Proxmox API Token ID

这个参数是必须的

参数获取顺序:

1 token_id 任务参数

2 proxmox_token_id 变量 (aka: task_vars 中的 proxmox_token_id 变量)

3 PROXMOX_TOKEN_ID 任务环境变量

4 PROXMOX_TOKEN_ID 全局环境变量

token_secret

string / required

Proxmox API Token Secret

这个参数是必须的

参数获取顺序:

1 token_secret 任务参数

2 proxmox_token_secret 变量 (aka: task_vars 中的 proxmox_token_secret 变量)

3 PROXMOX_TOKEN_SECRET 任务环境变量

4 PROXMOX_TOKEN_SECRET 全局环境变量

vmid

integer / required

虚拟机ID

vmstate

boolean

保存VM状态

Choices:

  • no

  • yes

Examples

- name: Create Snapshot
  qiyutech.proxmox.hl_qemu_snapshot:
    host: https://proxmox.ksle.2cc.net
    token_id: 'root@pam!demo'
    token_secret: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'

Authors

  • dev