--- - hosts: lx-builder-host remote_user: root vars_files: [ vars.yml ] tasks: - debug: msg: "scp -r trv@lx-builder:/tmp/debian-lx-brand-image-builder /tmp/" - shell: "./create-lx-image -t /tmp/debian-lx-brand-image-builder/{{ image_name_short|quote }}-{{ ansible_date_time.year }}{{ ansible_date_time.month }}{{ ansible_date_time.day }}.tar.gz -k {{ lx_kernel_version }} -m {{ lx_min_platform }} -i {{ image_name_short|quote }} -d {{ image_description|quote }}" args: chdir: /tmp/debian-lx-brand-image-builder/ removes: /tmp/debian-lx-brand-image-builder/create-lx-image register: lx - debug: var=lx - debug: msg: "import image with: imgadm install -m XXX.json -f XXX.zfs.gz"