--- - name: generate OpenWRT image hosts: "{{ install_hostname }}" connection: local gather_facts: no roles: - role: openwrt/image post_tasks: - name: print resulting files pause: seconds: 0 prompt: | You can find the newly generated files here: {% for image in openwrt_output_images %} {{ image | realpath }} {% endfor %} # - name: copy image to target # command: "scp '{{ openwrt_output_images[0] }}' '{{ inventory_hostname }}:/tmp/ansible-upgrade.img'" # - name: run sysupgrade # command: "ssh '{{ inventory_hostname }}' sysupgrade -n '/tmp/ansible-upgrade.img'" # ignore_errors: true # failed_when: false # register: sysupgrade_result # - debug: # var: sysupgrade_result.stdout