Skip to content
Snippets Groups Projects
Commit 32c903e1 authored by hahn's avatar hahn
Browse files

ci server: fix ssh to pupet targets

parent 89c81dab
No related branches found
No related tags found
No related merge requests found
...@@ -193,10 +193,12 @@ if(count($aConfig['mirrorPackages'])){ ...@@ -193,10 +193,12 @@ if(count($aConfig['mirrorPackages'])){
( (
[type] => rsync [type] => rsync
[runas] => [runas] =>
[target] => copy-deployment@puppet.one.iml.unibe.ch:/var/shared/imldeployment [target] => copy-deployment@puppet:/var/shared/imldeployment
) )
*/ */
$sCmd='ssh '.$aData['target']. ' ls -1'; $sTargetHost = preg_replace('/\:.*/', '', $aData['target']);
$sCmd='ssh '.$sTargetHost. ' ls -1';
exec($sCmd, $sOut, $iRc); exec($sCmd, $sOut, $iRc);
$oMonitor->addCheck( $oMonitor->addCheck(
array( array(
...@@ -206,7 +208,7 @@ if(count($aConfig['mirrorPackages'])){ ...@@ -206,7 +208,7 @@ if(count($aConfig['mirrorPackages'])){
"function" => "Simple", "function" => "Simple",
"params" => array( "params" => array(
"result" => $iRc ? RESULT_ERROR : RESULT_OK, "result" => $iRc ? RESULT_ERROR : RESULT_OK,
"value" => "$sCmd returns $sOut", "value" => "Command [$sCmd] returns with exitcode $iRc; output: ".implode(" ", $sOut),
), ),
), ),
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment