-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.yaml
More file actions
39 lines (38 loc) · 912 Bytes
/
bootstrap.yaml
File metadata and controls
39 lines (38 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- hosts: all
become: yes
pre_tasks:
- name: Installer les mises à jour
tags: always
package:
#upgrade: dist
#update_cache: yes
- hosts: monitoring
become: yes
tasks:
- name: Assurer que le paquet htop est installé
tags: htop
package:
name: htop
state: present
when: ansible_distribution in ['Debian', 'Ubuntu']
- name: Assurer que le paquet htop est supprimé
package:
name: htop
state: absent
when: ansible_distribution == 'Debian'
- name: Copier fichier HTML vers /tmp
copy:
src: default_site.html
dest: /tmp/ansible.html
owner: root
group: root
mode: 0644
- name: Stopper Apache
tags: apache2
service:
name: apache2
state: stopped
enabled: no
register: httpd
when: ansible_distribution in ['Debian']