Moved server to env

This commit is contained in:
CHIEFSOFT\ameye
2025-07-17 19:22:14 -04:00
parent 75f3a37ce4
commit 09e7f7243e
2 changed files with 10 additions and 5 deletions
+4
View File
@@ -14,6 +14,10 @@ ANSIBLE_AUTOMATION_SERVER_LOCATION="http://172.16.4.90:3000"
SOCKET_SERVER_LOCATION="http://10.10.10.13:5006"
DEPLOYMENT_SERVER_1="172.16.4.92"
DEPLOYMENT_SERVER_2="172.16.4.91"
DEPLOYMENT_SERVER_3="172.16.4.95"
#--------------------------------------------------------------------
# Example Environment Configuration file
#
+6 -5
View File
@@ -336,21 +336,22 @@ class Provision extends BaseController
switch ($productId) {
case "A000001":
case "A000002":
$primaryServer = "172.16.4.92";
$primaryServer = $_ENV['DEPLOYMENT_SERVER_1'];
break;
case "A000003":
case "A000004":
$primaryServer = "172.16.4.91";
$primaryServer = $_ENV['DEPLOYMENT_SERVER_2'];
break;
case "A000005":
$primaryServer = "172.16.4.95";
$primaryServer = $_ENV['DEPLOYMENT_SERVER_3'];
break;
}
return $primaryServer;
}
/*
[A000001_SERVER]
*
[A000001_SERVER]
172.16.4.92
[A000002_SERVER]
@@ -434,7 +435,7 @@ class Provision extends BaseController
$members_product_id = $pr->mpid;
log_message('critical', "Members Product ID ***** ".$pr->mpid." Provision_Status == ". $pr->provision_status);
$this->updateToNow($productUid); // increase count not to repeat
$ansible_host = $productId . "_SERVER";
$ContainerName = $this->generatedContainerName($productId, $pr->mpid ); //$productId ."-SVR-". str_pad($pr->mpid, 10, "0", STR_PAD_LEFT);