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