Commit b05b0dc5f7e46c9bc38f48070d150f65d913c98f
1 parent
4bad3ae3
gestion des roles
Showing
7 changed files
with
72 additions
and
8 deletions
Show diff stats
Ansible/execAnsible.sh
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | -while [ 1 ] | ||
3 | -do | ||
4 | -ansible-playbook playbooktest.yml | ||
5 | -ansible-playbook taskPing.yml -i inventaire.ini --ask-pass | ||
6 | -rm inventaire.ini | ||
7 | -done | ||
8 | \ No newline at end of file | 2 | \ No newline at end of file |
3 | +trap exit SIGINT | ||
4 | +#while [ 1 ] | ||
5 | +#do | ||
6 | +#ansible-playbook playbooktest.yml | ||
7 | +#ansible-playbook taskPing.yml -i inventaire.ini --ask-pass | ||
8 | +ansible-playbook my_task.yml -i inventaire.ini | ||
9 | +#rm inventaire.ini | ||
10 | +#done | ||
9 | \ No newline at end of file | 11 | \ No newline at end of file |
Ansible/my_task.yml
Ansible/playbooktest.yml
1 | --- | 1 | --- |
2 | -- name: Wait until the file /home/pifou/inventaire.ini | 2 | +- name: Wait until the file ./inventaire.ini |
3 | hosts: localhost | 3 | hosts: localhost |
4 | tasks: | 4 | tasks: |
5 | - wait_for: | 5 | - wait_for: |
6 | - path: /home/pifou/inventaire.ini | ||
7 | \ No newline at end of file | 6 | \ No newline at end of file |
7 | + path: ./inventaire.ini | ||
8 | \ No newline at end of file | 8 | \ No newline at end of file |
@@ -0,0 +1,43 @@ | @@ -0,0 +1,43 @@ | ||
1 | +--- | ||
2 | +- name: Copy file for proxy setup | ||
3 | + copy: | ||
4 | + src: ../files/proxy.conf | ||
5 | + dest: /etc/apt/apt.conf.d/proxy.conf | ||
6 | + owner: root | ||
7 | + group: root | ||
8 | + mode: '0644' | ||
9 | + | ||
10 | +- name: "verif install python3" | ||
11 | + apt: | ||
12 | + name: python3 | ||
13 | + state: present | ||
14 | + | ||
15 | +- name: "verif install python3-pip" | ||
16 | + apt: | ||
17 | + name: python3-pip | ||
18 | + state: present | ||
19 | + | ||
20 | +- name: "verif install minicom" | ||
21 | + apt: | ||
22 | + name: minicom | ||
23 | + state: present | ||
24 | + | ||
25 | +- name: "verif install wiringpi" | ||
26 | + apt: | ||
27 | + name: wiringpi | ||
28 | + state: present | ||
29 | + | ||
30 | +- name: "verif install avrdude" | ||
31 | + apt: | ||
32 | + name: avrdude | ||
33 | + state: present | ||
34 | + | ||
35 | +- name: "verif install lxml pkg" | ||
36 | + pip: | ||
37 | + executable: pip3 | ||
38 | + name: lxml | ||
39 | + | ||
40 | +- name: "verif install requests pkg" | ||
41 | + pip: | ||
42 | + executable: pip3 | ||
43 | + name: requests | ||
0 | \ No newline at end of file | 44 | \ No newline at end of file |