feat: add support of centos 7
This commit is contained in:
parent
671864be35
commit
53c0b080e8
12 changed files with 55 additions and 9 deletions
|
@ -40,6 +40,13 @@ platforms:
|
||||||
volume:
|
volume:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
security_opt: seccomp=unconfined
|
security_opt: seccomp=unconfined
|
||||||
|
- name: centos7
|
||||||
|
driver_config:
|
||||||
|
image: "nishiki/centos7:ansible-<%= ENV['ANSIBLE_VERSION'] ? ENV['ANSIBLE_VERSION'] : '2.7' %>"
|
||||||
|
command: /usr/sbin/init
|
||||||
|
volume:
|
||||||
|
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||||
|
security_opt: seccomp=unconfined
|
||||||
|
|
||||||
suites:
|
suites:
|
||||||
- name: default
|
- name: default
|
||||||
|
|
|
@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
- feat: add support of centos 7
|
||||||
- feat: add support of ubuntu 16.04
|
- feat: add support of ubuntu 16.04
|
||||||
- feat: add support of ubuntu 18.04
|
- feat: add support of ubuntu 18.04
|
||||||
- feat: add multiple namespaces for the checks, filters, handlers or assets
|
- feat: add multiple namespaces for the checks, filters, handlers or assets
|
||||||
|
|
|
@ -12,6 +12,7 @@ Install and configure sensu-go backend and agent
|
||||||
* Debian Stretch
|
* Debian Stretch
|
||||||
* Ubuntu 18.04
|
* Ubuntu 18.04
|
||||||
* Ubuntu 16.04
|
* Ubuntu 16.04
|
||||||
|
* Centos 7
|
||||||
|
|
||||||
## Role variables
|
## Role variables
|
||||||
### General
|
### General
|
||||||
|
|
|
@ -15,6 +15,9 @@ galaxy_info:
|
||||||
versions:
|
versions:
|
||||||
- xenial
|
- xenial
|
||||||
- cosmic
|
- cosmic
|
||||||
|
- name: centos
|
||||||
|
versions:
|
||||||
|
- 7
|
||||||
|
|
||||||
galaxy_tags:
|
galaxy_tags:
|
||||||
- sensu
|
- sensu
|
||||||
|
|
|
@ -1,13 +1,11 @@
|
||||||
---
|
---
|
||||||
- name: install sensu-agent packages
|
- name: install sensu-agent packages
|
||||||
apt:
|
package:
|
||||||
name: '{{ packages }}'
|
name: '{{ packages }}'
|
||||||
vars:
|
vars:
|
||||||
packages:
|
packages:
|
||||||
- sensu-go-agent
|
- sensu-go-agent
|
||||||
- sensu-plugins-ruby
|
- sensu-plugins-ruby
|
||||||
- build-essential
|
|
||||||
- monitoring-plugins-basic
|
|
||||||
register: result
|
register: result
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 1
|
delay: 1
|
||||||
|
|
5
tasks/backend-dependencies-debian.yml
Normal file
5
tasks/backend-dependencies-debian.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
- name: install backend dependencies
|
||||||
|
apt:
|
||||||
|
name: python-requests
|
||||||
|
tags: sensu
|
19
tasks/backend-dependencies-redhat.yml
Normal file
19
tasks/backend-dependencies-redhat.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
---
|
||||||
|
- name: uninstall bad dependencies
|
||||||
|
yum:
|
||||||
|
name: '{{ packages }}'
|
||||||
|
state: absent
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- python-urllib3
|
||||||
|
- python-requests
|
||||||
|
tags: sensu
|
||||||
|
|
||||||
|
- name: install backend dependencies
|
||||||
|
pip:
|
||||||
|
name: '{{ packages }}'
|
||||||
|
vars:
|
||||||
|
packages:
|
||||||
|
- urllib3
|
||||||
|
- requests
|
||||||
|
tags: sensu
|
|
@ -1,12 +1,13 @@
|
||||||
---
|
---
|
||||||
|
- include_tasks: 'backend-dependencies-{{ ansible_os_family|lower }}.yml'
|
||||||
|
|
||||||
- name: install sensu-backend packages
|
- name: install sensu-backend packages
|
||||||
apt:
|
package:
|
||||||
name: '{{ packages }}'
|
name: '{{ packages }}'
|
||||||
vars:
|
vars:
|
||||||
packages:
|
packages:
|
||||||
- sensu-go-backend
|
- sensu-go-backend
|
||||||
- sensu-go-cli
|
- sensu-go-cli
|
||||||
- python-requests
|
|
||||||
register: result
|
register: result
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 1
|
delay: 1
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- import_tasks: repository.yml
|
- include_tasks: 'repository-{{ ansible_os_family|lower }}.yml'
|
||||||
|
|
||||||
- import_tasks: agent.yml
|
- import_tasks: agent.yml
|
||||||
when: sensu_agent
|
when: sensu_agent
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
- ca-certificates
|
- ca-certificates
|
||||||
- gnupg2
|
- gnupg2
|
||||||
- software-properties-common
|
- software-properties-common
|
||||||
|
- build-essential
|
||||||
register: result
|
register: result
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 1
|
delay: 1
|
13
tasks/repository-redhat.yml
Normal file
13
tasks/repository-redhat.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
- name: add sensu repository
|
||||||
|
yum_repository:
|
||||||
|
name: sensu-{{ item }}
|
||||||
|
description: Sensu {{ item }} repository
|
||||||
|
gpgkey: 'https://packagecloud.io/sensu/{{ item }}/gpgkey'
|
||||||
|
gpgcheck: false
|
||||||
|
repo_gpgcheck: true
|
||||||
|
baseurl: 'https://packagecloud.io/sensu/{{ item }}/el/$releasever/$basearch'
|
||||||
|
loop:
|
||||||
|
- stable
|
||||||
|
- community
|
||||||
|
tags: sensu
|
|
@ -11,9 +11,6 @@ puts '================================'
|
||||||
sensu-go-agent
|
sensu-go-agent
|
||||||
sensu-go-cli
|
sensu-go-cli
|
||||||
sensu-go-backend
|
sensu-go-backend
|
||||||
build-essential
|
|
||||||
monitoring-plugins-basic
|
|
||||||
python-requests
|
|
||||||
].each do |package|
|
].each do |package|
|
||||||
describe package(package) do
|
describe package(package) do
|
||||||
it { should be_installed }
|
it { should be_installed }
|
||||||
|
|
Loading…
Reference in a new issue