initial commit
This commit is contained in:
18
roles/proxmox-lxc-provision/tasks/delete.yaml
Executable file
18
roles/proxmox-lxc-provision/tasks/delete.yaml
Executable file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- ansible.builtin.include_tasks: stop.yaml
|
||||
- name: Delete a container
|
||||
community.general.proxmox:
|
||||
api_host: "{{ proxmox_api_host }}"
|
||||
api_port: "{{ proxmox_api_port }}"
|
||||
api_user: "{{ proxmox_api_user }}"
|
||||
api_token_id: "{{ proxmox_api_token_id }}"
|
||||
api_token_secret: "{{ proxmox_api_token_secret }}"
|
||||
validate_certs: "{{ proxmox_api_validate_certs }}"
|
||||
|
||||
vmid: "{{ container_vmid | default(omit) }}"
|
||||
hostname: "{{ container_hostname | default(omit) }}"
|
||||
state: absent
|
||||
register: delete_result
|
||||
failed_when: |
|
||||
delete_result.failed and
|
||||
('does not exist' not in delete_result.msg)
|
||||
Reference in New Issue
Block a user