- name: Variable echo test hosts: ansiblelxc tasks: - name: Echoing! ansible.builtin.shell: cmd: "echo [{{ testvar }}] > /dev/pts/5" executable: /bin/bash