Commit 987cef35 authored by Blerim Sheqa's avatar Blerim Sheqa

Add official Icinga repository

closes #1
parent 7d73bb16
...@@ -4,4 +4,5 @@ ...@@ -4,4 +4,5 @@
*.sh *.sh
*.ini *.ini
*.pem *.pem
site.yml site.yml
\ No newline at end of file tests/test.retry
\ No newline at end of file
--- ---
# defaults file for icinga2 i2_use_repository: true
\ No newline at end of file i2_apt_key: "https://packages.icinga.com/icinga.key"
i2_apt_url: "deb http://packages.icinga.com/{{ ansible_distribution|lower }} icinga-{{ ansible_distribution_release }} main"
\ No newline at end of file
[icinga-stable-release]
name=ICINGA (stable release for epel)
baseurl=http://packages.icinga.com/epel/$releasever/release/
enabled=1
gpgcheck=1
gpgkey=https://packages.icinga.com/icinga.key
\ No newline at end of file
...@@ -14,6 +14,7 @@ galaxy_info: ...@@ -14,6 +14,7 @@ galaxy_info:
- 8 - 8
- 9 - 9
- name: Ubuntu - name: Ubuntu
versions:
- 14.04 - 14.04
- 18.04 - 18.04
categories: categories:
......
---
- name: Debian - Install apt-transport-https
become: yes
apt: name=apt-transport-https state=present
when: i2_use_repository
- name: Debian - Add Icinga 2 repository key
become: yes
apt_key: url="{{ i2_apt_key }}" state=present
when: i2_use_repository and i2_apt_key
- name: Debian - Add Icinga 2 repository
become: yes
apt_repository: repo={{ item.repo }} state={{ item.state}}
with_items:
- { repo: "{{ i2_apt_url }}", state: "present" }
when: i2_use_repository
\ No newline at end of file
---
- name: RedHat - Add Icinga 2 repository
become: yes
copy: src=ICINGA-release.repo dest=/etc/yum.repos.d/ICINGA-release.repo
when: i2_use_repository
\ No newline at end of file
---
- name: Include specific Icinga 2
include: icinga2-Debian.yml
when: ansible_os_family == 'Debian'
- name: Include specific Icinga 2
include: icinga2-RedHat.yml
when: ansible_os_family == 'RedHat'
\ No newline at end of file
--- ---
# tasks file for icinga2 - name: include icinga2.yml
\ No newline at end of file include: icinga2.yml
tags:
- install
\ No newline at end of file
localhost [all]
icinga2
centos7
[debian]
icinga2
[rhel]
centos7
\ No newline at end of file
--- ---
- hosts: localhost
- hosts: all
remote_user: root remote_user: root
roles: roles:
- icinga2 - icinga2
\ No newline at end of file vars:
- i2_use_repository: true
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment