copy extra_vars when relaunching ad-hoc commands

see: #1744
This commit is contained in:
Ryan Petrello 2017-03-20 17:20:33 -04:00
parent d0ae818685
commit ba0e9ab775
2 changed files with 2 additions and 2 deletions

View File

@ -3666,7 +3666,7 @@ class AdHocCommandRelaunch(GenericAPIView):
data = {}
for field in ('job_type', 'inventory_id', 'limit', 'credential_id',
'module_name', 'module_args', 'forks', 'verbosity',
'become_enabled'):
'extra_vars', 'become_enabled'):
if field.endswith('_id'):
data[field[:-3]] = getattr(obj, field)
else:

View File

@ -190,7 +190,7 @@ class AdHocCommand(UnifiedJob, JobNotificationMixin):
data = {}
for field in ('job_type', 'inventory_id', 'limit', 'credential_id',
'module_name', 'module_args', 'forks', 'verbosity',
'become_enabled'):
'extra_vars', 'become_enabled'):
data[field] = getattr(self, field)
return AdHocCommand.objects.create(**data)