moved 'path exists' function to shell

now it will work with powershell/winrm
This commit is contained in:
Brian Coca 2016-03-25 08:13:44 -07:00
parent 81d9066ee1
commit 28d20dbe53
4 changed files with 29 additions and 8 deletions

View file

@ -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