diff --git a/tasks/create_proxmox_debian_template.yml b/tasks/create_proxmox_debian_template.yml index 1b05d20..3483bb1 100644 --- a/tasks/create_proxmox_debian_template.yml +++ b/tasks/create_proxmox_debian_template.yml @@ -250,11 +250,14 @@ tasks: - block: - - name: Copy file from LXC container to host using pct exec - command: pct exec "{{ lxc_id }}" -- cp {{ workdir }}/{{ template_name }}.qcow2 /var/lib/vz/template/qemu/{{ template_name }}.qcow2 + - name: Pull file from container to host using pct pull + command: pct pull "{{ lxc_id }}" {{ workdir }}/{{ template_name }}.qcow2 /var/lib/vz/template/qemu/{{ template_name }}.qcow2 + + # - name: Copy file from LXC container to host using pct exec + # command: pct exec "{{ lxc_id }}" -- cp {{ workdir }}/{{ template_name }}.qcow2 /var/lib/vz/template/qemu/{{ template_name }}.qcow2 - - name: Copy file from LXC container to host using rsync - command: pct exec "{{ lxc_id }}" -- rsync -av {{ workdir }}/{{ template_name }}.qcow2 /var/lib/vz/template/qemu/{{ template_name }}.qcow2 + # - name: Copy file from LXC container to host using rsync + # command: pct exec "{{ lxc_id }}" -- rsync -av {{ workdir }}/{{ template_name }}.qcow2 /var/lib/vz/template/qemu/{{ template_name }}.qcow2 # - name: Mount the LXC container filesystem # command: "pct mount {{ lxc_id }}"