Commit 6326daa3 by Toshio Kuratomi

Update modules for unarchive handling user,group,mode and add integration test for the same

parent ee469c2a
Subproject commit 8c8be0e48c70d2aa830bf5d55cab5d13018ca831 Subproject commit e3759bd0d396d63b869732a63ecae5ca7a2a9641
Subproject commit ffa8abf9793a92bff6708d1f9a2a45475177f834 Subproject commit 86f2124c0d62359a0672fa0a81f85c0850c05dd1
...@@ -95,13 +95,13 @@ ...@@ -95,13 +95,13 @@
dest: "{{output_dir | expanduser}}/test-unarchive-tar-gz" dest: "{{output_dir | expanduser}}/test-unarchive-tar-gz"
copy: no copy: no
creates: "{{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt" creates: "{{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt"
register: unarchive02c register: unarchive02d
- name: verify that the file was not marked as changed - name: verify that the file was not marked as changed
assert: assert:
that: that:
- "unarchive02c.changed == false" - "unarchive02d.changed == false"
- "unarchive02c.skipped == true" - "unarchive02d.skipped == true"
- name: remove our tar.gz unarchive destination - name: remove our tar.gz unarchive destination
file: path={{output_dir}}/test-unarchive-tar-gz state=absent file: path={{output_dir}}/test-unarchive-tar-gz state=absent
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
- name: verify that the file was unarchived - name: verify that the file was unarchived
file: path={{output_dir}}/test-unarchive-zip/foo-unarchive.txt state=file file: path={{output_dir}}/test-unarchive-zip/foo-unarchive.txt state=file
- name: remove our tar unarchive destination - name: remove our zip unarchive destination
file: path={{output_dir}}/test-unarchive-zip state=absent file: path={{output_dir}}/test-unarchive-zip state=absent
- name: remove our test file for the archive - name: remove our test file for the archive
...@@ -150,3 +150,42 @@ ...@@ -150,3 +150,42 @@
- name: remove our unarchive destination - name: remove our unarchive destination
file: path=/tmp/foo-unarchive.txt state=absent file: path=/tmp/foo-unarchive.txt state=absent
- name: create our unarchive destination
file: path={{output_dir}}/test-unarchive-tar-gz state=directory
- name: unarchive and set mode
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-unarchive-tar-gz"
copy: no
mode: "u+rwX,g-rwx,o-rwx"
register: unarchive06
- name: Test that the file modes were changed
stat:
path: "{{ output_dir | expanduser }}/test-unarchive-tar-gz/foo-unarchive.txt"
register: unarchive06_stat
- name: Test that the file modes were changed
assert:
that:
- "unarchive06.changed == true"
- "unarchive06_stat.stat.mode == '0600'"
- name: unarchive and set mode
unarchive:
src: "{{ output_dir }}/test-unarchive.tar.gz"
dest: "{{ output_dir | expanduser }}/test-unarchive-tar-gz"
copy: no
mode: "u+rwX,g-rwx,o-rwx"
register: unarchive07
- name: Test that the files were not changed
assert:
that:
- "unarchive07.changed == false"
- name: remove our tar.gz unarchive destination
file: path={{output_dir}}/test-unarchive-tar-gz state=absent
Subproject commit b34075ecb9a85f913b2a59edc0fac243570c5fe0 Subproject commit e3759bd0d396d63b869732a63ecae5ca7a2a9641
Subproject commit 8a4f07eecd2bb877f51b7b04b5352efa6076cce5 Subproject commit 86f2124c0d62359a0672fa0a81f85c0850c05dd1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment