install-redhat.yml 1.07 KB
Newer Older
1
---
2
3
4
5
6
7
8
- name: Install any necessary dependencies [RedHat/CentOS]
  yum: 
    name: "{{ item }}" 
    state: present
  with_items:
    - curl

aisch's avatar
aisch committed
9
10
11
12
13
14
15
16
- name: Install any necessary PIP dependencies [RedHat/CentOS]
  yum: 
    name: "{{ item }}" 
    state: present
  with_items:
    - python-pip
  when: influxdb_install_python_client

17
- name: Add InfluxData repository file [RHEL/CentOS]
18
  template:
19
20
    src: etc/yum.repos.d/influxdata.repo.j2
    dest: /etc/yum.repos.d/influxdata.repo
21
22
    force: yes
    backup: yes
23
  when: influxdb_install_url is not defined or influxdb_install_url == None
24
25
26
27

- name: Install InfluxDB packages [RHEL/CentOS]
  yum: 
    name: influxdb
28
    state: latest
29
30
31
32
33
34
35
  when: influxdb_install_url is not defined or influxdb_install_url == None

- name: Install InfluxDB from URL [RHEL/CentOS]
  yum: 
    name: "{{ influxdb_install_url }}"
    state: present
  when: influxdb_install_url is defined and influxdb_install_url != None
36
37
38
39
40
41

- name: Capture installed InfluxDB version
  command: rpm -q influxdb
  register: reg_influxdb_version

- debug: var=reg_influxdb_version.stdout_lines