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

Add official Icinga repository

closes #1
parent 7d73bb16
......@@ -5,3 +5,4 @@
*.ini
*.pem
site.yml
tests/test.retry
\ No newline at end of file
---
# defaults file for icinga2
\ No newline at end of file
i2_use_repository: true
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:
- 8
- 9
- name: Ubuntu
versions:
- 14.04
- 18.04
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
\ No newline at end of file
- name: include icinga2.yml
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
roles:
- icinga2
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