Add option to force-recreate containers on config change

This commit is contained in:
Tobias Reisinger 2023-12-11 02:40:11 +01:00
parent 570864c00f
commit c32e305eb3
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
3 changed files with 10 additions and 2 deletions
_ansible/roles/telegraf/tasks

View file

@ -12,5 +12,12 @@
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
- import_tasks: steps/start-service.yml