Commit 5750036c authored by Ross McDonald's avatar Ross McDonald
Browse files

Added option installation URL variable to vars, where InfluxDB will be...

Added option installation URL variable to vars, where InfluxDB will be installed via URL instead of through the package repo.
parent 896dd284
---
- 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
......@@ -14,14 +14,25 @@
apt_key:
url: https://repos.influxdata.com/influxdb.key
state: present
when: influxdb_install_url is not defined or influxdb_install_url == None
- name: Add InfluxDB repository [Debian/Ubuntu]
apt_repository:
repo: deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ influxdb_install_version }}
state: present
when: influxdb_install_url is not defined or influxdb_install_url == None
- name: Install InfluxDB packages [Debian/Ubuntu]
apt:
name: influxdb
state: present
\ No newline at end of file
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
---
- name: Install any necessary dependencies [RedHat/CentOS]
yum:
name: "{{ item }}"
......@@ -11,8 +12,17 @@
dest: /etc/yum.repos.d/influxdb.repo
force: yes
backup: yes
when: influxdb_install_url is not defined or influxdb_install_url == None
- name: Install InfluxDB packages [RHEL/CentOS]
yum:
name: influxdb
state: present
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
\ No newline at end of file
---
# Whether or not the playbook is run locally (changes clustering logic slightly)
# Whether or not the playbook is run locally (changes clustering and testing logic slightly)
# This should only be set in the Vagrantfile and not modified elsewhere
is_vagrant: no
# Whether or not to purge peer data on each run (useful for cluster testing),
# NOTE: This will cause data loss on an active cluster, so use caution
# By default, the InfluxData package repository will be used for installation. Alternatively,
# if you have a specific package/version you want to install from, you can specify a package
# URL here. Note that this does not modify any other logic, so installing older versions may
# lead to unexpected results. Use at your own risk.
influxdb_install_url:
# Whether or not to purge peer data on each run (useful for cluster testing). NOTE: This will
# cause data loss on an active cluster, so use caution
influxdb_purge_peer_data: no
# If yes, service will be started. Will not be started if set to no.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment