Add option to force-recreate containers on config change
This commit is contained in:
parent
570864c00f
commit
c32e305eb3
3 changed files with 10 additions and 2 deletions
_ansible/roles/telegraf/tasks
|
@ -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
|
||||
|
|
Reference in a new issue