Commit 8fb6b9d187b75779da145013cd0e85ed810eb850
1 parent
c16f439b
modification des taches + test telechargement des fichiers pour envoi
Showing
6 changed files
with
64 additions
and
18 deletions
Show diff stats
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +--- | ||
2 | +- name: "Setup des Raspberry pi pour capteur Arduino" | ||
3 | + hosts: Arduino_init | ||
4 | + remote_user: pi | ||
5 | + become: yes | ||
6 | + roles: | ||
7 | + - role: arduino_Setup | ||
8 | + | ||
9 | +- name: "Setup des Raspberry pi pour capteur Nucleo" | ||
10 | + hosts: Nucleo_init | ||
11 | + remote_user: pi | ||
12 | + become: yes | ||
13 | + roles: | ||
14 | + - role: nucleo_Setup | ||
15 | + | ||
16 | +- name: "Déploiement de code pour Arduino" | ||
17 | + hosts: Arduino | ||
18 | + remote_user: pi | ||
19 | + become: yes | ||
20 | + roles: | ||
21 | + - role: arduino | ||
22 | + | ||
23 | +- name: "Déploiement de code pour Nucleo" | ||
24 | + hosts: Nucleo | ||
25 | + remote_user: pi | ||
26 | + become: yes | ||
27 | + roles: | ||
28 | + - role: nucleo | ||
0 | \ No newline at end of file | 29 | \ No newline at end of file |
Ansible/inventaire.ini
Ansible/my_task.yml deleted
Ansible/roles/arduino/tasks/main.yml
1 | +--- | ||
2 | +- name: "envoyer d'un fichier vers arduino cpt1" | ||
3 | + get_url: | ||
4 | + url: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/upload/binaire.c | ||
5 | + dest: /home/pi/capteur1/binaire.c | ||
6 | + mode: '0440' | ||
7 | + when: capteur1 is undefined | ||
1 | 8 | ||
2 | - | 9 | +- name: "envoyer d'un fichier vers arduino cpt2" |
10 | + copy: | ||
11 | + src: ../files/proxy.conf | ||
12 | + dest: /home/pi/capteur2/makefile | ||
13 | + owner: root | ||
14 | + group: root | ||
15 | + mode: '0644' | ||
16 | + when: capteur2 is undefined | ||
3 | \ No newline at end of file | 17 | \ No newline at end of file |
Ansible/roles/arduino_Setup/tasks/main.yml
1 | --- | 1 | --- |
2 | -- name: Copy file for proxy setup | 2 | +- name: "Copy file for proxy setup" |
3 | copy: | 3 | copy: |
4 | src: ../files/proxy.conf | 4 | src: ../files/proxy.conf |
5 | dest: /etc/apt/apt.conf.d/proxy.conf | 5 | dest: /etc/apt/apt.conf.d/proxy.conf |
6 | owner: root | 6 | owner: root |
7 | group: root | 7 | group: root |
8 | mode: '0644' | 8 | mode: '0644' |
9 | - when: capteur1 is undefined | ||
10 | 9 | ||
11 | - name: "verif install python3" | 10 | - name: "verif install python3" |
12 | apt: | 11 | apt: |
Ansible/taskPing.yml
1 | --- | 1 | --- |
2 | - name: Ping | 2 | - name: Ping |
3 | - hosts: all | 3 | + hosts: localhost |
4 | remote_user: pi | 4 | remote_user: pi |
5 | tasks: | 5 | tasks: |
6 | - - ping: | ||
7 | \ No newline at end of file | 6 | \ No newline at end of file |
7 | + - ping: | ||
8 | + | ||
9 | +- name: "envoyer d'un fichier vers arduino cpt1" | ||
10 | + hosts: localhost | ||
11 | + tasks: | ||
12 | + - file: | ||
13 | + path: /home/pifou/Documents/test | ||
14 | + state: directory | ||
15 | + mode: 0755 | ||
16 | + group: pifou | ||
17 | + owner: pifou | ||
18 | + - get_url: | ||
19 | + url: http://serveur-etu.polytech-lille.fr/~grouille/PROJET/upload/binaire.c | ||
20 | + dest: /home/pifou/Documents/test/binaire.c | ||
21 | + mode: '0440' | ||
8 | \ No newline at end of file | 22 | \ No newline at end of file |