mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
If ANSIBLE_KEEP_REMOTE_FILES=1 is set as an environment file, remote files will not be deleted, which is useful only for development debugging purposes.
This commit is contained in:
parent
1738440b13
commit
eee2d1afd0
4 changed files with 15 additions and 7 deletions
|
@ -172,6 +172,10 @@ class Runner(object):
|
|||
def _delete_remote_files(self, conn, files):
|
||||
''' deletes one or more remote files '''
|
||||
|
||||
if os.getenv("ANSIBLE_KEEP_REMOTE_FILES","0") == "1":
|
||||
# ability to turn off temp file deletion for debug purposes
|
||||
return
|
||||
|
||||
if type(files) == str:
|
||||
files = [ files ]
|
||||
for filename in files:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue