diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index 79aeebd..b732342 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -1,10 +1,11 @@ --- -- name: Enable backports for prometheus - apt_repository: repo='deb http://httpredir.debian.org/debian stretch-backports main' +- name: Check OS release + fail: msg="This role is only supported on Debian buster" + when: not (ansible_distribution == 'Debian' and ansible_distribution_release == 'buster') - name: Install prometheus - apt: name=prometheus default_release=stretch-backports + apt: name=prometheus - name: Configure prometheus template: src=prometheus.yml.j2 dest=/etc/prometheus/prometheus.yml