mirror of https://github.com/ansible/ansible.git
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.
14 lines
286 B
YAML
14 lines
286 B
YAML
5 years ago
|
- 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'"
|