Skip to content

Commit

Permalink
Merge pull request #1 from kevincoakley/0.13.0
Browse files Browse the repository at this point in the history
Update to 0.13.0
  • Loading branch information
kevincoakley authored Feb 20, 2017
2 parents 57c0b75 + a6946fd commit ba8f0fd
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 74 deletions.
7 changes: 3 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
prometheus_node_exporter_version: 0.12.0
prometheus_node_exporter_download_url: https://github.com/prometheus/node_exporter/releases/download/{{ prometheus_node_exporter_version }}/node_exporter-{{ prometheus_node_exporter_version }}.linux-amd64.tar.gz
prometheus_node_exporter_version: 0.13.0
prometheus_node_exporter_download_url: https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/node_exporter-{{ prometheus_node_exporter_version }}.linux-amd64.tar.gz
prometheus_node_exporter_service_username: node-exp
prometheus_node_exporter_service_group: node-exp

Expand All @@ -10,6 +10,7 @@ prometheus_node_exporter_enabled_collectors:
- entropy
- filefd
- filesystem
- hwmon
- loadavg
- mdadm
- meminfo
Expand All @@ -23,5 +24,3 @@ prometheus_node_exporter_enabled_collectors:
prometheus_node_exporter_config_flags:
'web.listen-address': '0.0.0.0:9100'
'log.level': 'info'

prometheus_gmond_conf_path:
5 changes: 0 additions & 5 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@
- name: reload systemd
command: systemctl daemon-reload

- name: restart gmond
service:
name: "{{ prometheus_node_exporter_gmond_service_name }}"
state: restarted

- name: restart node_exporter
service:
name: node_exporter
Expand Down
52 changes: 0 additions & 52 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
- name: Include OS family specific variables
include_vars: "{{ ansible_os_family }}.yml"

- name: Create the Node Exporter group
group:
name: "{{ prometheus_node_exporter_service_group }}"
Expand All @@ -15,55 +12,6 @@
append: yes
shell: /bin/bash

#
# Install Ganglia Gmond if it is in prometheus_node_exporter_enabled_collectors
#
- name: Download and install epel before installing the required packages (yum)
yum:
name: epel-release
state: present
when:
- ansible_os_family == "RedHat"
- "'gmond' in prometheus_node_exporter_enabled_collectors"

- name: Download and install the required packages (yum)
yum:
name: "{{ item }}"
state: present
with_items: "{{ prometheus_node_exporter_gmond_packages }}"
when:
- ansible_os_family == "RedHat"
- "'gmond' in prometheus_node_exporter_enabled_collectors"

- name: Download and install the required packages (apt)
apt:
name: "{{ item }}"
state: present
with_items: "{{ prometheus_node_exporter_gmond_packages }}"
when:
- ansible_os_family == "Debian"
- "'gmond' in prometheus_node_exporter_enabled_collectors"

- name: Ensure Ganglia Gmond is started and enabled on boot
service:
name: "{{ prometheus_node_exporter_gmond_service_name }}"
state: started
enabled: yes
when:
- "'gmond' in prometheus_node_exporter_enabled_collectors"

- name: Copy the gmond.conf file if the prometheus_gmond_conf variable has a value
copy:
src: "{{ prometheus_gmond_conf_path | default(omit) }}"
dest: /etc/ganglia/gmond.conf
owner: root
group: root
mode: 0755
when:
- not ( (prometheus_gmond_conf_path is undefined) or (prometheus_gmond_conf_path is none) or (prometheus_gmond_conf_path | trim == '') )
- "'gmond' in prometheus_node_exporter_enabled_collectors"
notify: restart gmond

#
# Install Prometheus Node Exporter
#
Expand Down
2 changes: 1 addition & 1 deletion tests/roles/docker
3 changes: 1 addition & 2 deletions tests/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- docker_containers.yml

vars:
- container_state: reloaded
- container_state: started
- container_privileged: true

roles:
Expand All @@ -24,7 +24,6 @@

vars:
prometheus_node_exporter_enabled_collectors:
- gmond
- loadavg

roles:
Expand Down
5 changes: 0 additions & 5 deletions vars/Debian.yml

This file was deleted.

5 changes: 0 additions & 5 deletions vars/RedHat.yml

This file was deleted.

0 comments on commit ba8f0fd

Please sign in to comment.