integration tests: Ensure temp file removal doesn't fail as non-root user

pull/84378/head
Lee Garrett 3 months ago
parent bb104e7cec
commit e390eae128

@ -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"

@ -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 }}"

Loading…
Cancel
Save