Issue got resolved by calling self.cleanup function exactly before the shutdown execution, more information in https://github.com/ansible-collections/community.general/pull/700/commits/e5a8eeb1bf86d58eb1619919a8319b1cb4e4fc91 and the commits afterwards.
On Saturday, August 1, 2020 at 1:39:13 PM UTC+4:30 ami...@gmail.com wrote: > I'm trying to contribute a new action to > ansible-collections/community.general ( > https://github.com/ansible-collections/community.general/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? > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/9f392a73-ce64-4e94-b571-923ed6b4c46bn%40googlegroups.com.