1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Updating tests for new module feature for remote_src in unarchive

Fixes #10218
This commit is contained in:
James Cammarata 2016-07-14 11:23:21 -05:00
parent 02dfed92a4
commit 153133132d
2 changed files with 18 additions and 18 deletions

@ -1 +1 @@
Subproject commit 8e241a87cc69e938188c5c1a8e024ac05c66b712
Subproject commit 124052961325c7164d55c312fa02eb0aebddfcef

View file

@ -54,7 +54,7 @@
file: path={{output_dir}}/test-unarchive-tar state=directory
- name: unarchive a tar file
unarchive: src={{output_dir}}/test-unarchive.tar dest="{{output_dir | expanduser}}/test-unarchive-tar" copy=no
unarchive: src={{output_dir}}/test-unarchive.tar dest="{{output_dir | expanduser}}/test-unarchive-tar" remote_src=yes
register: unarchive01
- name: verify that the file was marked as changed
@ -72,7 +72,7 @@
file: path={{output_dir}}/test-unarchive-tar-gz state=directory
- name: unarchive a tar.gz file
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz copy=no
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz remote_src=yes
register: unarchive02
- name: verify that the file was marked as changed
@ -92,7 +92,7 @@
file: path={{output_dir}}/test-unarchive-tar-gz state=directory
- name: unarchive a tar.gz file with creates set
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz copy=no creates={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz remote_src=yes creates={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt
register: unarchive02b
- name: verify that the file was marked as changed
@ -104,7 +104,7 @@
file: path={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt state=file
- name: unarchive a tar.gz file with creates over an existing file
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz copy=no creates={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest={{output_dir | expanduser}}/test-unarchive-tar-gz remote_src=yes creates={{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt
register: unarchive02c
- name: verify that the file was not marked as changed
@ -116,7 +116,7 @@
unarchive:
src: "{{output_dir}}/test-unarchive.tar.gz"
dest: "{{output_dir | expanduser}}/test-unarchive-tar-gz"
copy: no
remote_src: yes
creates: "{{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt"
register: unarchive02d
@ -132,7 +132,7 @@
file: path={{output_dir}}/test-unarchive-zip state=directory
- name: unarchive a zip file
unarchive: src={{output_dir}}/test-unarchive.zip dest={{output_dir | expanduser}}/test-unarchive-zip copy=no list_files=True
unarchive: src={{output_dir}}/test-unarchive.zip dest={{output_dir | expanduser}}/test-unarchive-zip remote_src=yes list_files=True
register: unarchive03
- name: verify that the file was marked as changed
@ -163,7 +163,7 @@
when: unarchive04.stat.exists
- name: try unarchiving to /tmp
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest=/tmp copy=no
unarchive: src={{output_dir}}/test-unarchive.tar.gz dest=/tmp remote_src=yes
register: unarchive05
- name: verify that the file was marked as changed
@ -184,7 +184,7 @@
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-unarchive-tar-gz"
copy: no
remote_src: yes
mode: "u+rwX,g-rwx,o-rwx"
list_files: True
register: unarchive06
@ -215,7 +215,7 @@
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-unarchive-tar-gz"
copy: no
remote_src: yes
mode: "u+rwX,g-wx,o-wx,g+r,o+r"
register: unarchive06_2
@ -235,7 +235,7 @@
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-unarchive-tar-gz"
copy: no
remote_src: yes
mode: "u+rwX,g-wx,o-wx,g+r,o+r"
list_files: True
register: unarchive07
@ -264,7 +264,7 @@
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-quotes~root"
copy: no
remote_src: yes
register: unarchive08
- name: Test that unarchive succeeded
@ -276,7 +276,7 @@
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-quotes~root"
copy: no
remote_src: yes
register: unarchive09
- name: Test that unarchive did nothing
@ -299,7 +299,7 @@
src: "test-unarchive-nonascii-くらとみ.tar.gz"
dest: "{{ output_dir }}/test-unarchive-nonascii-くらとみ-tar-gz"
mode: "u+rwX,go+rX"
copy: yes
remote_src: yes
register: nonascii_result0
- name: Check that file is really there
@ -326,7 +326,7 @@
src: "{{ output_dir }}/test-unarchive-dir.tar.gz"
dest: "{{ output_dir }}/test-unarchive-tar-gz"
mode: "0700"
copy: no
remote_src: yes
register: unarchive10
- name: Test that unarchive succeeded
@ -349,7 +349,7 @@
src: "{{ output_dir }}/test-unarchive-dir.tar.gz"
dest: "{{ output_dir }}/test-unarchive-tar-gz"
mode: "0700"
copy: no
remote_src: yes
register: unarchive10_1
- name: Test that unarchive succeeded
@ -380,7 +380,7 @@
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/link-to-unarchive-dir"
mode: "u+rwX,go+rX"
copy: no
remote_src: yes
register: unarchive_11
- name: Check that file is really there
@ -414,7 +414,7 @@
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/link-to-unarchive-file"
mode: "u+rwX,go+rX"
copy: no
remote_src: yes
ignore_errors: True
register: unarchive_12