From 0163ddbb4b9595b621938b3162ca5d36644d3ab5 Mon Sep 17 00:00:00 2001 From: grouille Date: Wed, 25 Mar 2020 14:38:05 +0100 Subject: [PATCH] Test de lancement d'Ansible depuis le site --- site/reception.php | 6 +++--- site/reponse.php | 2 +- site/tableau.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/site/reception.php b/site/reception.php index 39b1328..c5dd35c 100644 --- a/site/reception.php +++ b/site/reception.php @@ -46,14 +46,14 @@ if(isset($_POST['sensor'])) if(!$err) { - file_put_contents('upload/inventaire.ini', $ini) + file_put_contents('upload/inventaire.ini', $ini); $upload = load($_FILES['fichier']['tmp_name'], $_FILES['fichier']['name']); if($upload) { $message = "Upload du fichier réussi !"; $color = "alert-success"; $cmd = "ansible-playbook ../Ansible/taskPing.yml -i upload/inventaire.ini"; - /*if(shell_exec($cmd)==NULL) + if(shell_exec($cmd)==NULL) { // gestion de l'erreur $message = $message." Ansible est lancé !"; @@ -62,7 +62,7 @@ if(isset($_POST['sensor'])) { $message = $message." Echec du lancement d'Ansible !"; $color = "alert-danger"; - }*/ + } } else { diff --git a/site/reponse.php b/site/reponse.php index b87d15a..4ba0c29 100644 --- a/site/reponse.php +++ b/site/reponse.php @@ -1,5 +1,5 @@
-
+