This repository has been archived on 2024-11-01. You can view files and clone it, but cannot push or open issues or pull requests.
services/_ansible/roles/telegraf/tasks/main.yml

24 lines
604 B
YAML
Raw Normal View History

2023-12-08 00:55:57 +00:00
---
- name: Deploy {{ svc.name }}
tags:
- telegraf
- monitoring
block:
- import_tasks: steps/create-service-directory.yml
- import_tasks: steps/template-docker-compose.yml
- name: Template config
ansible.builtin.template:
src: telegraf.conf.j2
dest: "{{ (service_path, 'telegraf.conf') | path_join }}"
mode: "0664"
register: cmd_result
- name: Set the docker force-recreate flag
ansible.builtin.set_fact:
docker_force_recreate: "--force-recreate"
when: cmd_result.changed
2023-12-08 00:55:57 +00:00
- import_tasks: steps/start-service.yml