Commit a407e67a8aa33543a95d9f40dff0ce1b76c345e1

Authored by lringot
1 parent 73d5437d

send files ans try exec

Ansible/inventaire.ini
1 1 [Arduino_init]
2   -rasp1
3   -rasp2
  2 +172.26.145.112
  3 +172.26.145.113
4 4  
5 5 [Arduino]
6   -rasp1 capteur1=1
7 6 \ No newline at end of file
  7 +rasp1 capteur1=1
... ...
Ansible/playbooktest.yml
... ... @@ -2,5 +2,11 @@
2 2 - name: Wait until the file ./inventaire.ini
3 3 hosts: localhost
4 4 tasks:
5   - - wait_for:
6   - path: ./inventaire.ini
7 5 \ No newline at end of file
  6 + - unarchive:
  7 + src: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/fichiersRPI/fichiersRPI.zip
  8 + dest: /home/pifou/capteur1/
  9 + remote_src: yes
  10 +
  11 +
  12 +
  13 +
... ...
Ansible/roles/arduino_Setup/tasks/main.yml
... ... @@ -40,4 +40,18 @@
40 40 - name: "verif install requests pkg"
41 41 pip:
42 42 executable: pip3
43   - name: requests
44 43 \ No newline at end of file
  44 + name: requests
  45 +
  46 +- name: "verif install pyserial pkg"
  47 + pip:
  48 + executable: pip3
  49 + name: pyserial
  50 +
  51 +- name: "Download and unzip files"
  52 + unarchive:
  53 + src: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/fichiersRPI/fichiersRPI.zip
  54 + dest: /home/pi/
  55 + remote_src: yes
  56 +
  57 +- name: "Lancement script setup"
  58 + shell: /home/pi/fichiersRPI/toto.sh
... ...