install-debian.yml 1.14 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: present
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
31
32
33
34
35
36
37
38
    state: present
  when: influxdb_install_url is not defined or influxdb_install_url == None

- name: Debug
  debug: var=influxdb_install_url
  
- name: Install InfluxDB from URL [Debian/Ubuntu]
  apt: 
    name: "{{ influxdb_install_url }}"
    state: present
  when: influxdb_install_url is defined and influxdb_install_url != None