diff options
Diffstat (limited to '')
3 files changed, 12 insertions, 0 deletions
diff --git a/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/in_role.txt b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/in_role.txt new file mode 100644 index 0000000..fdfc947 --- /dev/null +++ b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/in_role.txt @@ -0,0 +1 @@ +file in role diff --git a/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/otherpath/in_role_subdir.txt b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/otherpath/in_role_subdir.txt new file mode 100644 index 0000000..40e75a4 --- /dev/null +++ b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/files/otherpath/in_role_subdir.txt @@ -0,0 +1 @@ +file in role subdir diff --git a/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/tasks/main.yml b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/tasks/main.yml new file mode 100644 index 0000000..2fc21df --- /dev/null +++ b/test/integration/targets/lookup_fileglob/find_levels/roles/get_file/tasks/main.yml @@ -0,0 +1,10 @@ +- name: show file contents + debug: + msg: '{{ q("fileglob", seed + ".*") }}' + register: found + +- name: did we get right one? + assert: + that: + - found['msg'][0].endswith(seed + '.txt') + - q('file', found['msg'][0])[0] == expected[seed] |