install-debian.yml 1.31 KB
Newer Older
1
---
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- 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

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

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

- name: Install InfluxDB packages [Debian/Ubuntu]
  apt: 
    name: influxdb
28
29
30
    state: present
  when: influxdb_install_url is not defined or influxdb_install_url == None
  
31
32
33
34
35
36
37
- 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
38
39
    state: present
  when: influxdb_install_url is defined and influxdb_install_url != None