Skip to content

Commit

Permalink
Merge pull request #9 from kevincoakley/1.0.0
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
kevincoakley authored May 26, 2020
2 parents 744833d + fef0cef commit e79ce97
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 60 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/molecule-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Molecule Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
molecule_distro: ['centos7', 'centos8', 'ubuntu1804', 'ubuntu2004']
env:
ANSIBLE_CALLBACK_WHITELIST: profile_tasks

steps:
- uses: actions/checkout@v1
- name: Set up Python 3
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible-lint flake8 molecule docker
- name: Test with molecule
run: |
molecule test --all
env:
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
ansible-role-prometheus-node-exporter
=====================================

[![Build Status](https://travis-ci.org/kevincoakley/ansible-role-prometheus-node-exporter.svg?branch=master)](https://travis-ci.org/kevincoakley/ansible-role-prometheus-node-exporter)
![](https://github.com/kevincoakley/ansible-role-prometheus-node-exporter/workflows/Molecule%20Test/badge.svg)

Install Prometheus Node Exporter - https://github.com/prometheus/node_exporter . Tested with CentOS 7 and Ubuntu 18.04

Use role release >= 0.15.0 on node_exporter versions >= 0.15.0. Use role release <= 0.14.0 on node_exporter versions <= 0.14.0
Install Prometheus Node Exporter - https://github.com/prometheus/node_exporter . Tested with CentOS 7, CentOS 8, Ubuntu 18.04 and Ubuntu 20.04

Requirements
------------
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
prometheus_node_exporter_version: 0.18.1
prometheus_node_exporter_version: 1.0.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_manage_user: true
prometheus_node_exporter_service_username: node-exp
Expand Down
3 changes: 2 additions & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ galaxy_info:
- name: EL
versions:
- 7
- 8
- name: Ubuntu
versions:
- xenial
- bionic
- focal
#
# Below are all categories currently available. Just as with
# the platforms above, uncomment those that apply to your role.
Expand Down
13 changes: 13 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Converge
hosts: all
become: true

vars:
prometheus_node_exporter_enabled_collectors:
- logind
prometheus_node_exporter_disabled_collectors:
- netstat

roles:
- role: ansible-role-prometheus-node-exporter
24 changes: 15 additions & 9 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,31 @@ dependency:
name: galaxy
driver:
name: docker
lint:
name: yamllint
options:
config-file: molecule/default/yaml-lint.yml
lint: |
set -e
yamllint -c molecule/yaml-lint.yml .
ansible-lint
flake8
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
exposed_ports:
- 9100/tcp
published_ports:
- 0.0.0.0:9100:9100/tcp
privileged: true
pre_build_image: true
provisioner:
name: ansible
lint:
name: ansible-lint
log: false
options:
vvv: false
playbooks:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
scenario:
name: default
verifier:
name: testinfra
lint:
name: flake8
name: ansible
26 changes: 0 additions & 26 deletions molecule/default/playbook.yml

This file was deleted.

10 changes: 10 additions & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Verify
hosts: all
become: true

tasks:
- name: Verify that the Node Exporter is running on port 9100
uri:
url: http://127.0.0.1:9100
status_code: 200
File renamed without changes.

0 comments on commit e79ce97

Please sign in to comment.