diff --git a/tasks/exporter/upgrade.yml b/tasks/exporter/cleanup.yml similarity index 100% rename from tasks/exporter/upgrade.yml rename to tasks/exporter/cleanup.yml diff --git a/tasks/exporter/common.yml b/tasks/exporter/common.yml index 830f278..728aaf6 100644 --- a/tasks/exporter/common.yml +++ b/tasks/exporter/common.yml @@ -5,8 +5,8 @@ register: stat_result tags: [ 'prometheus_{{ exporter }}' ] -- name '{{ exporter }} exporter | remove old exporter version' - include_tasks: "upgrade.yml" +- name: '{{ exporter }} exporter | remove old exporter version' + include_tasks: "cleanup.yml" when: stat_result.stat.exists and exporter_upgrade == "yes" tags: [ 'prometheus_{{ exporter }}' ]