serilaze output
This commit is contained in:
@@ -219,23 +219,22 @@ class Provision extends BaseController
|
|||||||
|
|
||||||
public function releaseProvision(){
|
public function releaseProvision(){
|
||||||
// Use ls command with shell_exec function
|
// Use ls command with shell_exec function
|
||||||
$output = shell_exec('ls -alt /var/www/html/ANSIBLE/');
|
//$output = shell_exec('ls -alt /var/www/html/ANSIBLE/');
|
||||||
|
//
|
||||||
|
//// Display the list of all files and directories
|
||||||
|
//echo "<pre>$output</pre>";
|
||||||
|
//log_message('critical', "Test poath -> ".$output);
|
||||||
|
|
||||||
// Display the list of all files and directories
|
$this->runAnsibleShell('a file wll be sent');
|
||||||
echo "<pre>$output</pre>";
|
|
||||||
log_message('critical', "Test poath -> ".$output);
|
|
||||||
$this->runAnsibleShell('a file wll be sent');
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
public function runAnsibleShell($provisionFile){
|
public function runAnsibleShell($provisionFile){
|
||||||
try{
|
try{
|
||||||
|
|
||||||
log_message('critical', "***** ***** Provision :: runAnsibleShell($provisionFile) ");
|
log_message('critical', "***** ***** Provision :: runAnsibleShell($provisionFile) ");
|
||||||
$shellCommand ="/var/www/html/ANSIBLE/auto_play.sh ";
|
$shellCommand ="/var/www/html/ANSIBLE/auto_play.sh ";
|
||||||
log_message('critical', $shellCommand);
|
log_message('critical', $shellCommand);
|
||||||
$output = shell_exec($shellCommand );
|
$output = shell_exec($shellCommand );
|
||||||
// var_dump($output);
|
log_message('critical', "***** ***** Provision :: runAnsibleShell(output) AFTER SHELL RUN ".serialize($output));
|
||||||
log_message('critical', "***** ***** Provision :: runAnsibleShell(output) AFTER SHELL RUN ".$output);
|
|
||||||
|
|
||||||
// $shellCommand ="ansible-playbook --vault-password-file /var/www/html/ANSIBLE/secrets.pass --key-file ~/.ssh/ansible_worker -i /var/www/html/ANSIBLE/inventory $provisionFile";
|
// $shellCommand ="ansible-playbook --vault-password-file /var/www/html/ANSIBLE/secrets.pass --key-file ~/.ssh/ansible_worker -i /var/www/html/ANSIBLE/inventory $provisionFile";
|
||||||
// log_message('critical', $shellCommand);
|
// log_message('critical', $shellCommand);
|
||||||
|
|||||||
Reference in New Issue
Block a user