refactor: add variable for delegating to proxmox host
This commit is contained in:
@@ -12,13 +12,13 @@
|
||||
become: yes
|
||||
ansible.builtin.shell: |
|
||||
pct set {{ clone_result.vmid | default(lxc_vmid) }} {% for key, value in lxc_mounts.items() %}-{{ key }} {{ value }} {% endfor %}
|
||||
delegate_to: "{{ proxmox_api_host }}"
|
||||
delegate_to: "{{ proxmox_delegate_host }}"
|
||||
when: lxc_mounts is defined
|
||||
|
||||
- name: Resize rootfs after clone
|
||||
ansible.builtin.command:
|
||||
cmd: "pct resize {{ clone_result.vmid }} rootfs {{ lxc_size }}G"
|
||||
delegate_to: "{{ proxmox_api_host }}"
|
||||
delegate_to: "{{ proxmox_delegate_host }}"
|
||||
become: yes
|
||||
register: resize_result
|
||||
changed_when: resize_result.rc == 0 and 'already at specified size' not in resize_result.stderr
|
||||
|
||||
Reference in New Issue
Block a user