You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.1 KiB
45 lines
1.1 KiB
- name: Creation dossier Promtail |
|
ansible.builtin.file: |
|
path: /opt/promtail |
|
state: directory |
|
owner: root |
|
group: root |
|
become: yes |
|
|
|
- name: Telecharger archive promtail |
|
get_url: |
|
url: https://github.com/grafana/loki/releases/download/v2.4.1/promtail-linux-amd64.zip |
|
dest: /opt/promtail/promtail-linux-amd64.zip |
|
mode: '0440' |
|
become: yes |
|
|
|
- name: Installation de unzip |
|
apt: |
|
name: unzip |
|
state: present |
|
become: yes |
|
|
|
|
|
- name: Desarchiver le zip de promtail |
|
ansible.builtin.unarchive: |
|
src: /opt/promtail/promtail-linux-amd64.zip |
|
dest: /opt/promtail/ |
|
remote_src: yes |
|
become: yes |
|
|
|
- name: Copie du fichier amd64 |
|
ansible.builtin.copy: |
|
remote_src: true |
|
src: "/opt/promtail/promtail-linux-amd64" |
|
dest: "/opt/promtail/promtail" |
|
owner: root |
|
group: root |
|
mode: '0775' |
|
become: yes |
|
|
|
- name: Créer une template pour la configuration de Promtail |
|
ansible.builtin.template: |
|
src: promtail-local-config.yaml.j2 |
|
dest: /opt/promtail/promtail-local-config.yaml |
|
become: yes |
|
notify: Restart Promtail
|
|
|