--- - name: preparations and sanity checks hosts: "{{ install_hostname }}" connection: local gather_facts: no tasks: - name: check if there is only one output image fail: msg: "the output_images variable must only contain a single image" when: - (output_images | length) != 1 - name: deploy openwrt image hosts: "{{ install_hostname }}" gather_facts: no roles: - role: openwrt/deploy post_tasks: - name: remove host-keys from ssh known-hosts local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}"