upadated image

This commit is contained in:
CHIEFSOFT\ameye
2025-01-24 06:05:43 -05:00
parent cfd51365c6
commit ea47b5aef8
3 changed files with 16 additions and 6 deletions
+13 -1
View File
@@ -11,6 +11,8 @@ class Provision extends BaseController
{
$this->allocatePortNo(); // allocte port for the conyainer use
$this->prepareDataBase(); // allocte port for the conyainer use
$this->updateProvision();
$provArrv = [
@@ -37,6 +39,13 @@ class Provision extends BaseController
return 0;
}
private function prepareDataBase():string
{
return '';
}
public function updateProvision(): string
{
$list_limit = 1; // for noow
@@ -50,6 +59,7 @@ class Provision extends BaseController
$mysql = "SELECT id, uid, internal_url,product_id,status,provision_port,updated, member_id
FROM members_products
WHERE provision_port > 0
AND provision_status = 0
ORDER BY updated ASC LIMIT ".$list_limit;
$query = $this->db->query($mysql);
@@ -233,8 +243,10 @@ class Provision extends BaseController
try{
log_message('critical', "***** ***** Provision :: runAnsibleShell($provisionFile) ");
$shellCommand ="ansible-playbook --vault-password-file secrets.pass --key-file ~/.ssh/ansible_worker -i inventory $provisionFile";
log_message('critical', $shellCommand);
$output = shell_exec($shellCommand );
log_message('critical', "***** ***** Provision :: runAnsibleShell(output) ".$output);
log_message('critical', "***** ***** Provision :: runAnsibleShell(output) AFTER SHELL RUN ".$output);
} catch ( \Exception $e){
log_message('critical', "***** ***** Provision Error:: runAnsibleShell() ".$e->getMessage());
}