Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sol1 Ansible Roles
sol1-influxdb
Commits
66e4f038
Commit
66e4f038
authored
May 10, 2016
by
Ross McDonald
Browse files
Merge pull request #9 from aisch/optional-python-lib
optionally install python client
parents
725aecb3
b4dfd52b
Changes
5
Hide whitespace changes
Inline
Side-by-side
defaults/main.yml
View file @
66e4f038
...
@@ -17,6 +17,10 @@ influxdb_load_sample_data: no
...
@@ -17,6 +17,10 @@ influxdb_load_sample_data: no
influxdb_sample_database_name
:
sample_database
influxdb_sample_database_name
:
sample_database
influxdb_sample_measurement_name
:
random_ints
influxdb_sample_measurement_name
:
random_ints
influxdb_bind_hostname
:
"
{{
ansible_hostname
}}"
influxdb_install_python_client
:
no
# NOTE: Since Ansible uses Python on the backend, all boolean values are capitalized when being
# NOTE: Since Ansible uses Python on the backend, all boolean values are capitalized when being
# rendered (which is not valid TOML). To get around this, make sure you quote any boolean values
# rendered (which is not valid TOML). To get around this, make sure you quote any boolean values
# (true -> "true") to ensure correct formatting (for template variables).
# (true -> "true") to ensure correct formatting (for template variables).
...
...
tasks/install-debian.yml
View file @
66e4f038
...
@@ -10,6 +10,16 @@
...
@@ -10,6 +10,16 @@
-
python-apt
-
python-apt
-
curl
-
curl
-
apt-transport-https
-
apt-transport-https
-
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
-
name
:
Import InfluxData GPG signing key [Debian/Ubuntu]
-
name
:
Import InfluxData GPG signing key [Debian/Ubuntu]
apt_key
:
apt_key
:
...
...
tasks/install-redhat.yml
View file @
66e4f038
...
@@ -6,6 +6,14 @@
...
@@ -6,6 +6,14 @@
with_items
:
with_items
:
-
curl
-
curl
-
name
:
Install any necessary PIP dependencies [RedHat/CentOS]
yum
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
-
python-pip
when
:
influxdb_install_python_client
-
name
:
Add InfluxData repository file [RHEL/CentOS]
-
name
:
Add InfluxData repository file [RHEL/CentOS]
template
:
template
:
src
:
etc/yum.repos.d/influxdata.repo.j2
src
:
etc/yum.repos.d/influxdata.repo.j2
...
...
tasks/install.yml
View file @
66e4f038
...
@@ -16,6 +16,13 @@
...
@@ -16,6 +16,13 @@
-
include
:
install-debian.yml
-
include
:
install-debian.yml
when
:
ansible_os_family == "Debian"
when
:
ansible_os_family == "Debian"
-
name
:
Install InfluxDB python client package [PIP]
pip
:
>
name=influxdb
state={{ influxdb_python_client_state | default(omit) }}
version={{ influxdb_python_client_version | default(omit) }}
when
:
influxdb_install_python_client
-
name
:
Capture InfluxDB version information
-
name
:
Capture InfluxDB version information
command
:
influxd version
command
:
influxd version
register
:
influxdb_runtime_version_raw
register
:
influxdb_runtime_version_raw
...
...
templates/influxdb.conf.j2
View file @
66e4f038
...
@@ -18,8 +18,8 @@ reporting-disabled = {{ influxdb_disable_reporting }}
...
@@ -18,8 +18,8 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[meta]
[meta]
enabled = {{ influxdb_meta_enabled }}
enabled = {{ influxdb_meta_enabled }}
dir = "{{ influxdb_meta_dir }}"
dir = "{{ influxdb_meta_dir }}"
bind-address = "{{
ansible
_hostname }}:{{ influxdb_meta_port }}"
bind-address = "{{
influxdb_bind
_hostname }}:{{ influxdb_meta_port }}"
http-bind-address = "{{
ansible
_hostname }}:{{ influxdb_meta_http_port }}"
http-bind-address = "{{
influxdb_bind
_hostname }}:{{ influxdb_meta_http_port }}"
retention-autocreate = {{ influxdb_meta_retention_autocreate }}
retention-autocreate = {{ influxdb_meta_retention_autocreate }}
election-timeout = "{{ influxdb_meta_election_timeout }}"
election-timeout = "{{ influxdb_meta_election_timeout }}"
heartbeat-timeout = "{{ influxdb_meta_heartbeat_timeout }}"
heartbeat-timeout = "{{ influxdb_meta_heartbeat_timeout }}"
...
@@ -118,7 +118,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
...
@@ -118,7 +118,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[admin]
[admin]
enabled = {{ influxdb_admin_enabled }}
enabled = {{ influxdb_admin_enabled }}
bind-address = "{{
ansible
_hostname }}:{{ influxdb_admin_port }}"
bind-address = "{{
influxdb_bind
_hostname }}:{{ influxdb_admin_port }}"
https-enabled = {{ influxdb_admin_https_enabled }}
https-enabled = {{ influxdb_admin_https_enabled }}
https-certificate = "{{ influxdb_admin_https_certificate }}"
https-certificate = "{{ influxdb_admin_https_certificate }}"
...
@@ -139,7 +139,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
...
@@ -139,7 +139,7 @@ reporting-disabled = {{ influxdb_disable_reporting }}
[http]
[http]
enabled = {{ influxdb_http_enabled }}
enabled = {{ influxdb_http_enabled }}
bind-address = "{{
ansible
_hostname }}:{{ influxdb_http_port }}"
bind-address = "{{
influxdb_bind
_hostname }}:{{ influxdb_http_port }}"
auth-enabled = {{ influxdb_http_auth_enabled }}
auth-enabled = {{ influxdb_http_auth_enabled }}
log-enabled = {{ influxdb_http_log_enabled }}
log-enabled = {{ influxdb_http_log_enabled }}
write-tracing = {{ influxdb_http_write_tracing }}
write-tracing = {{ influxdb_http_write_tracing }}
...
@@ -190,12 +190,20 @@ reporting-disabled = {{ influxdb_disable_reporting }}
...
@@ -190,12 +190,20 @@ reporting-disabled = {{ influxdb_disable_reporting }}
# ignore-unnamed = {{ influxdb_graphite_ignore_unnamed }}
# ignore-unnamed = {{ influxdb_graphite_ignore_unnamed }}
###
###
{% if influxdb_runtime_version | version_compare('0.11', '<') %}
### [[collectd]]
### [[collectd]]
{% else %}
### [collectd]
{% endif %}
###
###
### Controls the listener for collectd data.
### Controls the listener for collectd data.
###
###
{% if influxdb_runtime_version | version_compare('0.11', '<') %}
[[collectd]]
[[collectd]]
{% else %}
[collectd]
{% endif %}
enabled = {{ influxdb_collectd_enabled }}
enabled = {{ influxdb_collectd_enabled }}
bind-address = ":{{ influxdb_collectd_port }}"
bind-address = ":{{ influxdb_collectd_port }}"
database = "{{ influxdb_collectd_database }}"
database = "{{ influxdb_collectd_database }}"
...
@@ -206,12 +214,20 @@ reporting-disabled = {{ influxdb_disable_reporting }}
...
@@ -206,12 +214,20 @@ reporting-disabled = {{ influxdb_disable_reporting }}
typesdb = "{{ influxdb_collectd_typesdb }}"
typesdb = "{{ influxdb_collectd_typesdb }}"
###
###
{% if influxdb_runtime_version | version_compare('0.11', '<') %}
### [[opentsdb]]
### [[opentsdb]]
{% else %}
### [opentsdb]
{% endif %}
###
###
### Controls the listener for OpenTSDB data.
### Controls the listener for OpenTSDB data.
###
###
{% if influxdb_runtime_version | version_compare('0.11', '<') %}
[[opentsdb]]
[[opentsdb]]
{% else %}
[opentsdb]
{% endif %}
enabled = {{ influxdb_opentsdb_enabled }}
enabled = {{ influxdb_opentsdb_enabled }}
# bind-address = ":{{ influxdb_opentsdb_port }}"
# bind-address = ":{{ influxdb_opentsdb_port }}"
# database = "{{ influxdb_opentsdb_database }}"
# database = "{{ influxdb_opentsdb_database }}"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment