Change action temp files to contain resource.name
This commit is contained in:
parent
6d72f47dcd
commit
9490fa7c59
@ -7,7 +7,7 @@ input:
|
||||
value:
|
||||
target_directory:
|
||||
schema: str!
|
||||
value: /var/lib/astute
|
||||
value: /var/lib/astute/
|
||||
key_name:
|
||||
schema: str!
|
||||
value: ceph
|
||||
|
@ -103,12 +103,14 @@ class Puppet(TempFileHandler):
|
||||
|
||||
self.upload_manifests(resource)
|
||||
|
||||
action_file_name = '/tmp/{}.pp'.format(resource.name)
|
||||
self.prepare_templates_and_scripts(resource, action_file, '')
|
||||
self.transport_sync.copy(resource, action_file, '/tmp/action.pp')
|
||||
self.transport_sync.copy(resource, action_file, action_file_name)
|
||||
self.transport_sync.sync_all()
|
||||
|
||||
cmd_args = ['puppet', 'apply', '-vd',
|
||||
'/tmp/action.pp', '--detailed-exitcodes']
|
||||
action_file_name,
|
||||
'--detailed-exitcodes']
|
||||
if 'puppet_modules' in resource.args:
|
||||
cmd_args.append('--modulepath={}'.format(
|
||||
resource.args['puppet_modules']))
|
||||
|
@ -24,11 +24,12 @@ class Shell(TempFileHandler):
|
||||
action_file = self._compile_action_file(resource, action_name)
|
||||
log.debug('action_file: %s', action_file)
|
||||
|
||||
self.transport_sync.copy(resource, action_file, '/tmp/action.sh')
|
||||
action_file_name = '/tmp/{}.sh'.format(resource.name)
|
||||
self.transport_sync.copy(resource, action_file, action_file_name)
|
||||
self.transport_sync.sync_all()
|
||||
cmd = self.transport_run.run(
|
||||
resource,
|
||||
'bash', '/tmp/action.sh',
|
||||
'bash', action_file_name,
|
||||
use_sudo=True,
|
||||
warn_only=True
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user