From e496be4c0cf30698c046ca7f31f1a3f469d02a4a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Apr 2020 13:01:24 +0000 Subject: [PATCH] suppression ds telechargement pour passer a des copy --- Ansible/MainTask.yml | 6 +++--- Ansible/roles/arduino/tasks/main.yml | 7 +++++-- Ansible/roles/arduino_Setup/tasks/main.yml | 5 ++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Ansible/MainTask.yml b/Ansible/MainTask.yml index 9b2de7a..9423627 100644 --- a/Ansible/MainTask.yml +++ b/Ansible/MainTask.yml @@ -13,16 +13,16 @@ roles: - role: nucleo_Setup -- name: "Déploiement de code pour Arduino" +- name: "Deploiement de code pour Arduino" hosts: Arduino remote_user: pi become: yes roles: - role: arduino -- name: "Déploiement de code pour Nucleo" +- name: "Deploiement de code pour Nucleo" hosts: Nucleo remote_user: pi become: yes roles: - - role: nucleo \ No newline at end of file + - role: nucleo diff --git a/Ansible/roles/arduino/tasks/main.yml b/Ansible/roles/arduino/tasks/main.yml index 39f05e6..16bf303 100644 --- a/Ansible/roles/arduino/tasks/main.yml +++ b/Ansible/roles/arduino/tasks/main.yml @@ -1,9 +1,12 @@ --- - name: "envoyer du fichier binaire.c" - get_url: - url: http://projet-p10.plil.fr/IMA3_P10/site/upload/main.c + copy: + src: ../../../../site/upload/main.c dest: /home/pi/capteur{{capteur}}/main.c + owner: root + group: root mode: '0644' + - name: "execution du script" shell: /home/pi/capteur{{capteur}}/lancer.sh diff --git a/Ansible/roles/arduino_Setup/tasks/main.yml b/Ansible/roles/arduino_Setup/tasks/main.yml index 61f0977..057e90b 100644 --- a/Ansible/roles/arduino_Setup/tasks/main.yml +++ b/Ansible/roles/arduino_Setup/tasks/main.yml @@ -8,8 +8,7 @@ path: /home/pi/capteur{{capteur}} state: directory -- name: "Download and unzip files" +- name: "Copy and unzip files" unarchive: - src: http://projet-p10.plil.fr/IMA3_P10/site/fichiersRPI/fichiersRPI.zip + src: ../../../../site/fichiersRPI/fichiersRPI.zip dest: /home/pi/capteur{{capteur}} - remote_src: yes -- libgit2 0.21.2