parent
4b2f23db62
commit
bdee7273af
11 changed files with 1800 additions and 136 deletions
|
|
@ -62,7 +62,8 @@ class Remote(object):
|
|||
remote_copy,
|
||||
base_path=None,
|
||||
quiet_mode=None,
|
||||
archiving_mode=None):
|
||||
archiving_mode=None,
|
||||
configuration=None):
|
||||
self.target_host = target_host
|
||||
self._exec = remote_exec
|
||||
self._copy = remote_copy
|
||||
|
|
@ -73,6 +74,10 @@ class Remote(object):
|
|||
self.base_path = "/var/lib/cdist"
|
||||
self.quiet_mode = quiet_mode
|
||||
self.archiving_mode = archiving_mode
|
||||
if configuration:
|
||||
self.configuration = configuration
|
||||
else:
|
||||
self.configuration = {}
|
||||
|
||||
self.conf_path = os.path.join(self.base_path, "conf")
|
||||
self.object_path = os.path.join(self.base_path, "object")
|
||||
|
|
@ -235,7 +240,10 @@ class Remote(object):
|
|||
|
||||
"""
|
||||
|
||||
command = [os.environ.get('CDIST_REMOTE_SHELL', "/bin/sh"), "-e"]
|
||||
command = [
|
||||
self.configuration.get('CDIST_REMOTE_SHELL', "/bin/sh"),
|
||||
"-e"
|
||||
]
|
||||
command.append(script)
|
||||
|
||||
return self.run(command, env, return_output)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue