From a407e67a8aa33543a95d9f40dff0ce1b76c345e1 Mon Sep 17 00:00:00 2001 From: psanchez Date: Wed, 4 Mar 2020 17:57:35 +0100 Subject: [PATCH] send files ans try exec --- Ansible/inventaire.ini | 6 +++--- Ansible/playbooktest.yml | 10 ++++++++-- Ansible/roles/arduino_Setup/tasks/main.yml | 16 +++++++++++++++- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/Ansible/inventaire.ini b/Ansible/inventaire.ini index 733c323..56c7d51 100644 --- a/Ansible/inventaire.ini +++ b/Ansible/inventaire.ini @@ -1,6 +1,6 @@ [Arduino_init] -rasp1 -rasp2 +172.26.145.112 +172.26.145.113 [Arduino] -rasp1 capteur1=1 \ No newline at end of file +rasp1 capteur1=1 diff --git a/Ansible/playbooktest.yml b/Ansible/playbooktest.yml index 7846f28..7a4ff43 100644 --- a/Ansible/playbooktest.yml +++ b/Ansible/playbooktest.yml @@ -2,5 +2,11 @@ - name: Wait until the file ./inventaire.ini hosts: localhost tasks: - - wait_for: - path: ./inventaire.ini \ No newline at end of file + - unarchive: + src: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/fichiersRPI/fichiersRPI.zip + dest: /home/pifou/capteur1/ + remote_src: yes + + + + diff --git a/Ansible/roles/arduino_Setup/tasks/main.yml b/Ansible/roles/arduino_Setup/tasks/main.yml index ed58237..ee335f0 100644 --- a/Ansible/roles/arduino_Setup/tasks/main.yml +++ b/Ansible/roles/arduino_Setup/tasks/main.yml @@ -40,4 +40,18 @@ - name: "verif install requests pkg" pip: executable: pip3 - name: requests \ No newline at end of file + name: requests + +- name: "verif install pyserial pkg" + pip: + executable: pip3 + name: pyserial + +- name: "Download and unzip files" + unarchive: + src: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/fichiersRPI/fichiersRPI.zip + dest: /home/pi/ + remote_src: yes + +- name: "Lancement script setup" + shell: /home/pi/fichiersRPI/toto.sh -- libgit2 0.21.2