provision files

This commit is contained in:
CHIEFSOFT\ameye
2025-01-25 11:10:05 -05:00
parent bbb78a514e
commit 5cd374af24
3 changed files with 84 additions and 2 deletions
+15 -2
View File
@@ -33,9 +33,9 @@ class Provision extends BaseController
];
foreach ($provArrv as $svv){
$tgt = $ansible_folder = str_replace(".", "_", $svv).".yml";
// $this->runAnsibleShell($tgt);
$this->runAnsibleShell("/var/www/html/ANSIBLE/".$tgt);
}
// $this->runAnsibleShell('94099_devprov_mermsemr_com.yml');
// $this->runAnsibleShell('/var/www/html/ANSIBLE/94099_devprov_mermsemr_com.yml');
return 0;
}
@@ -239,6 +239,19 @@ class Provision extends BaseController
return 0;
}
public function releaseProvision(){
// Use ls command with shell_exec function
$output = shell_exec('ls -alt /var/www/html/ANSIBLE/');
// Display the list of all files and directories
echo "<pre>$output</pre>";
$shellCommand ="/var/www/html/ANSIBLE/auto_play.sh ";
log_message('critical', $shellCommand);
$output = shell_exec($shellCommand );
var_dump($output);
return 0;
}
public function runAnsibleShell($provisionFile){
try{
log_message('critical', "***** ***** Provision :: runAnsibleShell($provisionFile) ");