diff --git a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js index 045afd3585..1d88abdb8b 100644 --- a/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js +++ b/awx/ui/client/lib/components/relaunchButton/relaunchButton.component.js @@ -101,13 +101,22 @@ function atRelaunchCtrl ( }; }); } else { - jobObj.postRelaunch({ - id: vm.job.id - }).then((launchRes) => { - if (!$state.includes('jobs')) { - $state.go('jobResult', { id: launchRes.data.id }, { reload: true }); - } - }); + const launchParams = { + id: vm.job.id, + }; + + if (_.has(option, 'name')) { + launchParams.relaunchData = { + hosts: (option.name).toLowerCase() + }; + } + + jobObj.postRelaunch(launchParams) + .then((launchRes) => { + if (!$state.includes('jobs')) { + $state.go('jobResult', { id: launchRes.data.id }, { reload: true }); + } + }); } }); };