Merge pull request #260 from pigmej/sync_templates_in_shell
Sync templates and scripts in shell handler
This commit is contained in:
commit
d53ecc71e4
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
from solar.core.log import log
|
from solar.core.log import log
|
||||||
from solar import errors
|
from solar import errors
|
||||||
|
import os
|
||||||
|
|
||||||
from solar.core.handlers.base import TempFileHandler
|
from solar.core.handlers.base import TempFileHandler
|
||||||
|
|
||||||
@ -24,9 +25,12 @@ class Shell(TempFileHandler):
|
|||||||
action_file = self._compile_action_file(resource, action_name)
|
action_file = self._compile_action_file(resource, action_name)
|
||||||
log.debug('action_file: %s', action_file)
|
log.debug('action_file: %s', action_file)
|
||||||
|
|
||||||
action_file_name = '/tmp/{}.sh'.format(resource.name)
|
action_file_name = os.path.join(self.dirs[resource.name], action_file)
|
||||||
self.transport_sync.copy(resource, action_file, action_file_name)
|
self._copy_templates_and_scripts(resource, action_name)
|
||||||
|
|
||||||
|
self.transport_sync.copy(resource, self.dst, '/tmp')
|
||||||
self.transport_sync.sync_all()
|
self.transport_sync.sync_all()
|
||||||
|
|
||||||
cmd = self.transport_run.run(
|
cmd = self.transport_run.run(
|
||||||
resource,
|
resource,
|
||||||
'bash', action_file_name,
|
'bash', action_file_name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user