You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/lookup_file/tasks/main.yml

14 lines
286 B
YAML

- name: make a new file to read
copy: dest={{output_dir}}/foo.txt mode=0644 content="bar"
- name: load the file as a fact
set_fact:
foo: "{{ lookup('file', output_dir + '/foo.txt' ) }}"
- debug: var=foo
- name: verify file lookup
assert:
that:
- "foo == 'bar'"