community / community.general / 6.6.8 / module / proxmox_template Management of OS templates in Proxmox VE cluster Authors: Sergei Antipov (@UnderGreen)community.general.proxmox_template (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
allows you to upload/delete templates in Proxmox VE cluster
- name: Upload new openvz template with minimal options community.general.proxmox_template: node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 src: ~/ubuntu-14.04-x86_64.tar.gz
- name: > Upload new openvz template with minimal options use environment PROXMOX_PASSWORD variable(you should export it before) community.general.proxmox_template: node: uk-mc02 api_user: root@pam api_host: node1 src: ~/ubuntu-14.04-x86_64.tar.gz
- name: Upload new openvz template with all options and force overwrite community.general.proxmox_template: node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 storage: local content_type: vztmpl src: ~/ubuntu-14.04-x86_64.tar.gz force: true
- name: Delete template with minimal options community.general.proxmox_template: node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 template: ubuntu-14.04-x86_64.tar.gz state: absent
- name: Download proxmox appliance container template community.general.proxmox_template: node: uk-mc02 api_user: root@pam api_password: 1q2w3e api_host: node1 storage: local content_type: vztmpl template: ubuntu-20.04-standard_20.04-1_amd64.tar.gz
src: description: - Path to uploaded file. - Required only for I(state=present). type: path node: description: - Proxmox VE node on which to operate. type: str force: default: false description: - It can only be used with I(state=present), existing template will be overwritten. type: bool state: choices: - present - absent default: present description: - Indicate desired state of the template. type: str storage: default: local description: - Target storage. type: str timeout: default: 30 description: - Timeout for operations. type: int api_host: description: - Specify the target host of the Proxmox VE cluster. required: true type: str api_user: description: - Specify the user to authenticate with. required: true type: str template: description: - The template name. - Required for I(state=absent) to delete a template. - Required for I(state=present) to download an appliance container template (pveam). type: str api_password: description: - Specify the password to authenticate with. - You can use C(PROXMOX_PASSWORD) environment variable. type: str api_token_id: description: - Specify the token ID. - Requires C(proxmoxer>=1.1.0) to work. type: str version_added: 1.3.0 version_added_collection: community.general content_type: choices: - vztmpl - iso default: vztmpl description: - Content type. - Required only for I(state=present). type: str validate_certs: default: false description: - If C(false), SSL certificates will not be validated. - This should only be used on personally controlled sites using self-signed certificates. type: bool api_token_secret: description: - Specify the token secret. - Requires C(proxmoxer>=1.1.0) to work. type: str version_added: 1.3.0 version_added_collection: community.general