Commit 47b8fe637480aa9ac40d00ede2d6d462ef346bfe
1 parent
cc3e3e19
Test de lancement d'Ansible depuis le site
Showing
1 changed file
with
2 additions
and
3 deletions
Show diff stats
site/reception.php
... | ... | @@ -53,8 +53,7 @@ if(isset($_POST['sensor'])) |
53 | 53 | $message = "Upload du fichier réussi !"; |
54 | 54 | $color = "alert-success"; |
55 | 55 | $cmd = "ansible-playbook ../Ansible/taskPing.yml -i upload/inventaire.ini"; |
56 | - $ansible = shell_exec($cmd); | |
57 | - if($ansible==NULL) | |
56 | + if(shell_exec($cmd)==NULL) | |
58 | 57 | { |
59 | 58 | // Gestion de l'erreur |
60 | 59 | $message = $message." Echec du lancement d'Ansible !"; |
... | ... | @@ -63,7 +62,7 @@ if(isset($_POST['sensor'])) |
63 | 62 | else |
64 | 63 | { |
65 | 64 | // Réussite |
66 | - $message = $message." Ansible est lancé !"." Réponse Ansible : "; | |
65 | + $message = $message." Ansible est lancé !"; | |
67 | 66 | } |
68 | 67 | } |
69 | 68 | else | ... | ... |