--- - name: print device list in template become: true hosts: localhost tasks: - name: call template template: src: devices.j2 dest: /tmp/device-list