2024-12-25 12:47:27 +01:00
|
|
|
- name: Docker directory
|
|
|
|
ansible.builtin.file:
|
2022-06-12 23:07:59 +02:00
|
|
|
path: /opt/{{ docker_nodeexporter_service_id }}/
|
|
|
|
state: directory
|
|
|
|
|
2024-12-25 12:47:27 +01:00
|
|
|
- name: Prepare config
|
|
|
|
ansible.builtin.template:
|
2022-06-12 23:07:59 +02:00
|
|
|
src: "{{ item }}"
|
|
|
|
dest: /opt/{{ docker_nodeexporter_service_id }}/
|
|
|
|
with_items:
|
|
|
|
- docker-compose.yml
|
2024-12-25 12:45:27 +01:00
|
|
|
- config.yml
|
2022-06-12 23:07:59 +02:00
|
|
|
notify: docker-compose-up
|
|
|
|
|
2024-12-25 12:45:27 +01:00
|
|
|
- name: Copie le certificat pour tls
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "{{ docker_nodeexporter_certificate_url }}"
|
|
|
|
dest: /opt/{{ docker_nodeexporter_service_id }}/cert.pem
|
|
|
|
username: "{{ lookup('env', 'AAP_RESSOURCES_USER') }}"
|
|
|
|
password: "{{ lookup('env', 'AAP_RESSOURCES_PASSWORD') }}"
|
|
|
|
mode: u=rw,g=r,o=r
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
notify:
|
|
|
|
- docker-compose-up
|
|
|
|
|
|
|
|
- name: Copie la clé pour tls
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: "{{ docker_nodeexporter_key_url }}"
|
|
|
|
dest: /opt/{{ docker_nodeexporter_service_id }}/key.pem
|
|
|
|
username: "{{ lookup('env', 'AAP_RESSOURCES_USER') }}"
|
|
|
|
password: "{{ lookup('env', 'AAP_RESSOURCES_PASSWORD') }}"
|
|
|
|
mode: u=rw,g=r,o=
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
notify:
|
|
|
|
- docker-compose-up
|