You are not logged in.

#1 2020-08-03 07:58:46

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

[SOLVED] Set ANSIBLE_KEEP_REMOTE_FILES=1 in ansible module

I don't know if this topic is appropriate for this forum or not, so please move it another forum if it needs to.

I'm trying to contribute a new action to ansible-collections/community.general (https://github.com/ansible-collections/ … l/pull/700), it shuts down the remote server.

As ansible tries to remove temp files after executing the module and the server is not running, it always gives an error (cannot connect to server).

It can be verified that

export ANSIBLE_KEEP_REMOTE_FILES=1

fixes the issue and the module runs correctly.

But of course user cannot always set this in his configurations.

Is there a way to tell the module not to keep remote files always?

Last edited by aminvakil (2020-08-09 08:10:40)

Offline

#2 2020-08-09 08:10:25

aminvakil
Member
From: Tehran
Registered: 2019-08-01
Posts: 29
Website

Re: [SOLVED] Set ANSIBLE_KEEP_REMOTE_FILES=1 in ansible module

This got fixed in https://github.com/ansible-collections/ … 1cb4e4fc91.

Cleaning up temp files just before executing shutdown command.

Offline

Board footer

Powered by FluxBB