provision files
This commit is contained in:
@@ -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) ");
|
||||
|
||||
Reference in New Issue
Block a user