Debian Codegraph @

test/integration/targets/lookup_file/tasks/main.yml

raw
1 - name: make a new file to read
2 copy: dest={{output_dir}}/foo.txt mode=0644 content="bar"
3
4 - name: load the file as a fact
5 set_fact:
6 foo: "{{ lookup('file', output_dir + '/foo.txt' ) }}"
7
8 - debug: var=foo
9
10 - name: verify file lookup
11 assert:
12 that:
13 - "foo == 'bar'"