Unverified Commit 5f3c79a4 authored by aflatto's avatar aflatto Committed by GitHub

Merge pull request #4 from Icinga/feature/add-repository

Add official Icinga repository
parents 7d73bb16 62cf086c
......@@ -4,4 +4,5 @@
*.sh
*.ini
*.pem
site.yml
\ No newline at end of file
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"
i2_yum_key: "https://packages.icinga.com/icinga.key"
i2_yum_url: "http://packages.icinga.com/epel/$releasever/release/"
---
# handlers file for icinga2
\ No newline at end of file
# handlers file for icinga2
---
galaxy_info:
author: "Icinga Development Team <info@icinga.com>"
description: "Install and configure Icinga 2"
......@@ -5,17 +7,18 @@ galaxy_info:
license: "license (Apache)"
min_ansible_version: 2.3.2
platforms:
- name: EL
versions:
- 6
- 7
- name: Debian
versions:
- 8
- 9
- name: Ubuntu
- 14.04
- 18.04
- name: EL
versions:
- 6
- 7
- name: Debian
versions:
- 8
- 9
- name: Ubuntu
versions:
- 14.04
- 18.04
categories:
- system
galaxy_tags:
......@@ -23,4 +26,4 @@ galaxy_info:
- icinga
- icinga2
dependencies: []
\ No newline at end of file
dependencies: []
---
- 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
---
- name: RedHat - Add Icinga 2 repository
become: yes
template: src=ICINGA-release.repo dest=/etc/yum.repos.d/ICINGA-release.repo
when: i2_use_repository
---
- 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'
---
# tasks file for icinga2
\ No newline at end of file
- name: include icinga2.yml
include: icinga2.yml
tags:
- install
[icinga-stable-release]
name=ICINGA (stable release for epel)
baseurl={{ i2_yum_url }}
enabled=1
gpgcheck=1
gpgkey={{ i2_yum_key }}
\ 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
\ No newline at end of file
- icinga2
vars:
- i2_use_repository: true
---
# vars file for icinga2
\ No newline at end of file
# vars file for icinga2
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