diff --git a/app/Controllers/Provision.php b/app/Controllers/Provision.php index 3564b98..6292ec9 100644 --- a/app/Controllers/Provision.php +++ b/app/Controllers/Provision.php @@ -219,23 +219,22 @@ class Provision extends BaseController public function releaseProvision(){ // 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 "
$output"; +//log_message('critical', "Test poath -> ".$output); - // Display the list of all files and directories - echo "
$output"; - log_message('critical', "Test poath -> ".$output); - $this->runAnsibleShell('a file wll be sent'); + $this->runAnsibleShell('a file wll be sent'); return 0; } public function runAnsibleShell($provisionFile){ try{ - log_message('critical', "***** ***** Provision :: runAnsibleShell($provisionFile) "); $shellCommand ="/var/www/html/ANSIBLE/auto_play.sh "; log_message('critical', $shellCommand); $output = shell_exec($shellCommand ); - // var_dump($output); - log_message('critical', "***** ***** Provision :: runAnsibleShell(output) AFTER SHELL RUN ".$output); + log_message('critical', "***** ***** Provision :: runAnsibleShell(output) AFTER SHELL RUN ".serialize($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"; // log_message('critical', $shellCommand);