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

This commit is contained in:
Toshio Kuratomi 2015-01-14 19:23:12 -08:00
parent ee469c2ab1
commit 6326daa34e
5 changed files with 47 additions and 8 deletions

@ -1 +1 @@
Subproject commit 8c8be0e48c70d2aa830bf5d55cab5d13018ca831
Subproject commit e3759bd0d396d63b869732a63ecae5ca7a2a9641

@ -1 +1 @@
Subproject commit ffa8abf9793a92bff6708d1f9a2a45475177f834
Subproject commit 86f2124c0d62359a0672fa0a81f85c0850c05dd1

View file

@ -95,13 +95,13 @@
dest: "{{output_dir | expanduser}}/test-unarchive-tar-gz"
copy: no
creates: "{{output_dir}}/test-unarchive-tar-gz/foo-unarchive.txt"
register: unarchive02c
register: unarchive02d
- name: verify that the file was not marked as changed
assert:
that:
- "unarchive02c.changed == false"
- "unarchive02c.skipped == true"
- "unarchive02d.changed == false"
- "unarchive02d.skipped == true"
- name: remove our tar.gz unarchive destination
file: path={{output_dir}}/test-unarchive-tar-gz state=absent
@ -121,7 +121,7 @@
- name: verify that the file was unarchived
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
- name: remove our test file for the archive
@ -150,3 +150,42 @@
- name: remove our unarchive destination
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

@ -1 +1 @@
Subproject commit b34075ecb9a85f913b2a59edc0fac243570c5fe0
Subproject commit e3759bd0d396d63b869732a63ecae5ca7a2a9641

@ -1 +1 @@
Subproject commit 8a4f07eecd2bb877f51b7b04b5352efa6076cce5
Subproject commit 86f2124c0d62359a0672fa0a81f85c0850c05dd1