summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/lookup_file/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/lookup_file/tasks/main.yml')
-rw-r--r--test/integration/targets/lookup_file/tasks/main.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/integration/targets/lookup_file/tasks/main.yml b/test/integration/targets/lookup_file/tasks/main.yml
new file mode 100644
index 0000000..a6d636d
--- /dev/null
+++ b/test/integration/targets/lookup_file/tasks/main.yml
@@ -0,0 +1,13 @@
+- 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'"