- hosts: all tasks: - copy: content: 'an_example_password' dest: "{{zuul.executor.work_root}}/test.password" - hosts: all vars: value: "{{ lookup('password', '{{zuul.executor.work_root}}/test.password') }}" tasks: - debug: msg="value is {{ value }}"