diff options
author | Pierre-Louis Bonicoli <pierre-louis.bonicoli@libregerbil.fr> | 2018-01-05 11:10:44 +0100 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2018-01-11 10:40:59 -0800 |
commit | cbb238522b4507674a4c5c55d0ea3fbf4069e5fa (patch) | |
tree | b868b01ecea5c5f514659fac1a84db6d1b564283 /test/integration/targets/get_url | |
parent | be06799b20fe7db0972d22c87fc863917ccc4c90 (diff) | |
download | ansible-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.yml | 11 |
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 |