diff --git a/roles/influxdata-repo/tasks/main.yml b/roles/influxdata-repo/tasks/main.yml index bff893d..e3571f2 100644 --- a/roles/influxdata-repo/tasks/main.yml +++ b/roles/influxdata-repo/tasks/main.yml @@ -1,21 +1,22 @@ - name: check distribution assert: that: "ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'" msg: This role only supports Debian-like systems - name: install HTTPS APT transport apt: - state: installed + state: present package: apt-transport-https + when: not (ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('17.10', '>=')) - name: import InfluxData APT key apt_key: id: 2582E0C5 url: "https://repos.influxdata.com/influxdb.key" state: present - name: add InfluxData repository apt_repository: repo: "deb https://repos.influxdata.com/{{ansible_distribution|lower}} {{ansible_distribution_release}} stable" filename: influxdata state: present