Commit 2f08e98b938bb49ca412f1dedbb9e77df779d0dc
1 parent
b81c3e23
Test
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
site/add.php
... | ... | @@ -43,6 +43,9 @@ session_start(); |
43 | 43 | $ini = $ini.$_POST['raspberry']." capteur=".$_POST['numero']." setup=".$setup."\n"; |
44 | 44 | file_put_contents('upload/inventaire.ini', $ini); |
45 | 45 | setup($_POST['raspberry']); |
46 | + $cmd = "ansible-playbook ../Ansible/taskPing.yml -i upload/inventaire.ini"; | |
47 | + $retour = system($cmd, $retval); | |
48 | + $message = $message." Retour : ".$retval."---".$retour; | |
46 | 49 | ?> |
47 | 50 | <div class="alert alert-success" role="alert"> |
48 | 51 | Le capteur a bien été ajouté ! | ... | ... |
site/reception.php
... | ... | @@ -53,7 +53,6 @@ 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 | - $cmd = "ping 172.26.145.113"; | |
57 | 56 | $retour = system($cmd, $retval); |
58 | 57 | //$ansible = exec($cmd, $result); |
59 | 58 | $message = $message." Retour : ".$retval."---".$retour; | ... | ... |