mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
Merge pull request #64 from dj-wasabi/use-base-ci
Using base ci requirements.txt
This commit is contained in:
@ -5,6 +5,7 @@ services:
|
||||
- docker
|
||||
|
||||
install:
|
||||
- curl -sSlo requirements.txt https://raw.githubusercontent.com/dj-wasabi/ansible-ci-base/master/requirements.txt
|
||||
- pip install -r requirements.txt
|
||||
|
||||
script:
|
||||
|
@ -31,7 +31,7 @@ provisioner:
|
||||
telegraf_plugins_default:
|
||||
- plugin: cpu
|
||||
config:
|
||||
- percpu = true
|
||||
- percpu = true
|
||||
- plugin: disk
|
||||
- plugin: io
|
||||
- plugin: mem
|
||||
@ -43,14 +43,7 @@ provisioner:
|
||||
- plugin: kernel
|
||||
- plugin: nginx
|
||||
config:
|
||||
- urls = ["http://localhost/nginx_status"]
|
||||
- plugin: logparser
|
||||
config:
|
||||
- files = ["/var/log/nginx/access.log"]
|
||||
- from_beginning = true
|
||||
- name_override = "nginx_access_log"
|
||||
- \[logparser.grok\]
|
||||
- patterns = ["%{COMBINED_LOG_FORMAT}"]
|
||||
- urls = ["http://localhost/nginx_status"]
|
||||
|
||||
scenario:
|
||||
name: default
|
||||
|
@ -1,22 +1,4 @@
|
||||
---
|
||||
- hosts: all
|
||||
pre_tasks:
|
||||
- name: "Installing which on CentOS"
|
||||
yum:
|
||||
name: which
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: "Installing wget on Debian"
|
||||
apt:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
with_items:
|
||||
- wget
|
||||
- gpg
|
||||
|
||||
roles:
|
||||
- role: ansible-telegraf
|
||||
|
19
molecule/default/prepare.yml
Normal file
19
molecule/default/prepare.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: "Installing which on CentOS"
|
||||
yum:
|
||||
name: which
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
|
||||
- name: "Installing wget on Debian"
|
||||
apt:
|
||||
name:
|
||||
- wget
|
||||
- gpg
|
||||
state: present
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
@ -1,4 +0,0 @@
|
||||
ansible==2.4.4.0
|
||||
docker==3.3.0
|
||||
molecule==2.13.1
|
||||
testinfra==1.12.0
|
Reference in New Issue
Block a user