summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonathan Davila <jonathan@davila.io>2018-10-18 02:09:07 -0400
committerJordan Borean <jborean93@gmail.com>2018-10-18 16:09:07 +1000
commitd3be4f75ca90fe35837a78b618b3cabfad0e0cef (patch)
treec3e651e5d338ff0ce21a1c250fd5088f5f46bf16 /lib
parent0c6513e9b141fb6cdd6bfaae6f0090456a0a86ce (diff)
downloadansible-d3be4f75ca90fe35837a78b618b3cabfad0e0cef.tar.gz
pamd: use module.tmpdir for NamedTemporaryFile() (#47133)
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/modules/system/pamd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/modules/system/pamd.py b/lib/ansible/modules/system/pamd.py
index e2e04e0863..ef83108d8f 100644
--- a/lib/ansible/modules/system/pamd.py
+++ b/lib/ansible/modules/system/pamd.py
@@ -778,7 +778,7 @@ def main():
backupdest = module.backup_local(fname)
print("BACKUP DEST", backupdest)
try:
- temp_file = NamedTemporaryFile(mode='w')
+ temp_file = NamedTemporaryFile(mode='w', dir=module.tmpdir)
with open(temp_file.name, 'w') as fd:
fd.write(str(service))