FEATURE: resizes rootfs if a host is LXC and its rootfs is almost full

This commit is contained in:
2026-08-23 17:02:01 +05:00
parent 54ec2bdbee
commit 5e253db9c7
2 changed files with 29 additions and 3 deletions
@@ -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