mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 06:30:19 -07:00
moved 'path exists' function to shell
now it will work with powershell/winrm
This commit is contained in:
parent
81d9066ee1
commit
28d20dbe53
4 changed files with 29 additions and 8 deletions
|
@ -92,6 +92,13 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
)
|
||||
return results
|
||||
|
||||
def _remote_file_exists(self, path):
|
||||
cmd = self._connection._shell.exists(path)
|
||||
result = self._low_level_execute_command(cmd=cmd, sudoable=True)
|
||||
if result['rc'] == 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
def _configure_module(self, module_name, module_args, task_vars=None):
|
||||
'''
|
||||
Handles the loading and templating of the module code through the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue