install-debian.yml 1.62 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
aisch's avatar
aisch committed
13
14
15
16
17
18
19
20
21
22
    
- name: Install any necessary PIP dependencies [Debian/Ubuntu]
  apt: 
    name: "{{ item }}" 
    state: present 
    update_cache: yes 
    cache_valid_time: 3600
  with_items:
    - python-pip
  when: influxdb_install_python_client
23

24
- name: Import InfluxData GPG signing key [Debian/Ubuntu]
25
26
27
  apt_key:
    url: https://repos.influxdata.com/influxdb.key
    state: present
28
  when: influxdb_install_url is not defined or influxdb_install_url == None
29

30
- name: Add InfluxData repository [Debian/Ubuntu]
31
  apt_repository:
32
    repo: deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ influxdb_install_version }}
33
    state: present
34
  when: influxdb_install_url is not defined or influxdb_install_url == None
35
36
37
38

- name: Install InfluxDB packages [Debian/Ubuntu]
  apt: 
    name: influxdb
39
    state: latest
Ross McDonald's avatar
Ross McDonald committed
40
    update_cache: yes
41
    cache_valid_time: 3600
42
43
  when: influxdb_install_url is not defined or influxdb_install_url == None
  
44
45
46
47
48
49
50
- 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
51
52
    state: present
  when: influxdb_install_url is defined and influxdb_install_url != None