FEATURE: resizes rootfs if a host is LXC and its rootfs is almost full
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Get container info by name
|
||||
delegate_to: localhost
|
||||
become: false
|
||||
community.general.proxmox_vm_info:
|
||||
validate_certs: false
|
||||
node: proxmox-server
|
||||
api_user: root@pam
|
||||
api_host: 192.168.0.2
|
||||
api_token_id: ansible
|
||||
api_token_secret: "{{ proxmox_token_secret }}"
|
||||
|
||||
name: "{{ inventory_hostname }}"
|
||||
type: lxc
|
||||
register: common_healthcheck_vmid
|
||||
|
||||
- name: Resize LXC's rootfs
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
cmd: pct resize {{ common_healthcheck_vmid.proxmox_vms[0].vmid }} rootfs +5G
|
||||
delegate_to: 192.168.0.2
|
||||
changed_when: true
|
||||
Reference in New Issue
Block a user