install-debian.yml 1.39 KB
Newer Older
1
---
2
3
4
5
6
7
8
9
10
11
- name: Install any necessary dependencies [Debian/Ubuntu]
  apt: 
    name: "{{ item }}" 
    state: present 
    update_cache: yes 
    cache_valid_time: 3600
  with_items:
    - python-httplib2
    - python-apt
    - curl
12
    - apt-transport-https
13

14
- name: Import InfluxData GPG signing key [Debian/Ubuntu]
15
16
17
  apt_key:
    url: https://repos.influxdata.com/influxdb.key
    state: present
18
  when: influxdb_install_url is not defined or influxdb_install_url == None
19

20
- name: Add InfluxData repository [Debian/Ubuntu]
21
  apt_repository:
22
    repo: deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ influxdb_install_version }}
23
    state: present
24
  when: influxdb_install_url is not defined or influxdb_install_url == None
25
26
27
28

- name: Install InfluxDB packages [Debian/Ubuntu]
  apt: 
    name: influxdb
29
    state: latest
Ross McDonald's avatar
Ross McDonald committed
30
    update_cache: yes
31
    cache_valid_time: 3600
32
33
  when: influxdb_install_url is not defined or influxdb_install_url == None
  
34
35
36
37
38
39
40
- name: Download InfluxDB package via URL [Debian/Ubuntu]
  command: curl -o /tmp/influxdb-ansible-download.deb {{ influxdb_install_url }}
  when: influxdb_install_url is defined and influxdb_install_url != None

- name: Install downloaded InfluxDB package [Debian/Ubuntu]
  apt:
    deb: /tmp/influxdb-ansible-download.deb
41
42
    state: present
  when: influxdb_install_url is defined and influxdb_install_url != None