diff --git a/hooks/templates/inc_projects_config.php.erb b/hooks/templates/inc_projects_config.php.erb index e18e745b8fa6b29c11c61386c9767a92814855c8..0db51c41793e8b64395cf103f5b896a869b84775 100644 --- a/hooks/templates/inc_projects_config.php.erb +++ b/hooks/templates/inc_projects_config.php.erb @@ -4,7 +4,7 @@ // fetch status infos von den einzelnen Phasen // ---------------------------------------------------------------------- - $aConfig = array( +$aConfig = array( // Basispfad: 'workDir' => '/var/imldeployment', 'tmpDir' => '/var/tmp/imldeployment', @@ -101,6 +101,10 @@ // override for local development // ---------------------------------------------------------------------- +// unsafe ... +// make a check that fits your environemnt +// php_uname("n") can send a short hostname (without domain) +$bProd=!!strpos(__DIR__, '/ci.iml.unibe.ch/'); switch (php_uname("n")) { case "USER": @@ -112,19 +116,21 @@ switch (php_uname("n")) { case "ci.iml.unibe.ch": case "ci": - // synch der Pakete nur auf dem Livesystem - $aConfig['mirrorPackages'] = array( - 'puppet' => array( - 'type' => 'rsync', - 'runas' => 'www-data', // nur fuer commandline - 'target' => 'ladmin@calcium.iml.unibe.ch:/share/imldeployment', - ), - 'puppet.one' => array( - 'type' => 'rsync', - 'runas' => 'www-data', // nur fuer commandline - 'target' => 'copy-deployment@puppet.one.iml.unibe.ch:/var/shared/imldeployment', - ), - ); + if ($bProd){ + // synch der Pakete nur auf dem Livesystem + $aConfig['mirrorPackages'] = array( + 'puppet' => array( + 'type' => 'rsync', + 'runas' => 'www-data', // nur fuer commandline + 'target' => 'ladmin@calcium.iml.unibe.ch:/share/imldeployment', + ), + 'puppet.one' => array( + 'type' => 'rsync', + 'runas' => 'www-data', // nur fuer commandline + 'target' => 'copy-deployment@puppet.one.iml.unibe.ch:/var/shared/imldeployment', + ), + ); + } break; default: