summaryrefslogtreecommitdiff
path: root/test/integration/targets/get_url
diff options
context:
space:
mode:
authorPierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr>2018-01-05 11:10:44 +0100
committerMatt Clay <matt@mystile.com>2018-01-11 10:40:59 -0800
commitcbb238522b4507674a4c5c55d0ea3fbf4069e5fa (patch)
treeb868b01ecea5c5f514659fac1a84db6d1b564283 /test/integration/targets/get_url
parentbe06799b20fe7db0972d22c87fc863917ccc4c90 (diff)
downloadansible-cbb238522b4507674a4c5c55d0ea3fbf4069e5fa.tar.gz
get_url tests: controller & managed node can be distinct
Templating happens on the Ansible controller, not on the task’s target host.
Diffstat (limited to 'test/integration/targets/get_url')
-rw-r--r--test/integration/targets/get_url/tasks/main.yml11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/integration/targets/get_url/tasks/main.yml b/test/integration/targets/get_url/tasks/main.yml
index c4e483a8ee..995cd5790b 100644
--- a/test/integration/targets/get_url/tasks/main.yml
+++ b/test/integration/targets/get_url/tasks/main.yml
@@ -33,17 +33,18 @@
- name: Define test files for file schema
set_fact:
- geturl_srcfile: "{{ output_dir | expanduser }}/aurlfile.txt"
- geturl_dstfile: "{{ output_dir | expanduser }}/aurlfile_copy.txt"
+ geturl_srcfile: "{{ output_dir }}/aurlfile.txt"
+ geturl_dstfile: "{{ output_dir }}/aurlfile_copy.txt"
- name: Create source file
copy:
dest: "{{ geturl_srcfile }}"
content: "foobar"
+ register: source_file_copied
- name: test file fetch
get_url:
- url: "{{ 'file://' + geturl_srcfile }}"
+ url: "file://{{ source_file_copied.dest }}"
dest: "{{ geturl_dstfile }}"
register: result
@@ -55,8 +56,8 @@
- name: test nonexisting file fetch
get_url:
- url: "{{ 'file://' + geturl_srcfile + 'NOFILE' }}"
- dest: "{{ geturl_dstfile + 'NOFILE' }}"
+ url: "file://{{ source_file_copied.dest }}NOFILE"
+ dest: "{{ geturl_dstfile }}NOFILE"
register: result
ignore_errors: True