diff --git a/test/integration/targets/ansible-vault/runme.sh b/test/integration/targets/ansible-vault/runme.sh index 0bcd3c3c67e..f64728def65 100755 --- a/test/integration/targets/ansible-vault/runme.sh +++ b/test/integration/targets/ansible-vault/runme.sh @@ -5,7 +5,7 @@ source virtualenv.sh MYTMPDIR=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir') -trap 'rm -rf "${MYTMPDIR}"' EXIT +trap 'chmod -R u+rwx ${MYTMPDIR}; rm -rf "${MYTMPDIR}"' EXIT # create a test file TEST_FILE="${MYTMPDIR}/test_file" diff --git a/test/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml b/test/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml index 39872d749f3..23eee727d9e 100644 --- a/test/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml +++ b/test/integration/targets/setup_remote_tmp_dir/tasks/default-cleanup.yml @@ -1,3 +1,11 @@ +- name: Ensure temporary directory has correct perms to delete + file: + path: "{{ remote_tmp_dir }}" + mode: u+rwx + recurse: yes + follow: no + no_log: yes + - name: delete temporary directory file: path: "{{ remote_tmp_dir }}"