Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ansible-icinga2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
github-mirror
ansible-icinga2
Commits
039e87a4
Commit
039e87a4
authored
May 07, 2018
by
Blerim Sheqa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Install Icinga 2 package
closes #2
parent
62cf086c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
9 deletions
+30
-9
defaults/main.yml
defaults/main.yml
+3
-1
handlers/main.yml
handlers/main.yml
+6
-1
meta/main.yml
meta/main.yml
+1
-1
tasks/icinga2-Debian.yml
tasks/icinga2-Debian.yml
+9
-3
tasks/icinga2-RedHat.yml
tasks/icinga2-RedHat.yml
+7
-1
tasks/main.yml
tasks/main.yml
+4
-0
tests/test.yml
tests/test.yml
+0
-2
No files found.
defaults/main.yml
View file @
039e87a4
---
i2_
us
e_repository
:
true
i2_
manag
e_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/"
i2_manage_package
:
true
i2_manage_service
:
true
handlers/main.yml
View file @
039e87a4
---
# handlers file for icinga2
-
name
:
start icinga2
become
:
yes
service
:
name=icinga2 state=started enabled=yes
when
:
-
i2_manage_service
meta/main.yml
View file @
039e87a4
...
...
@@ -17,7 +17,7 @@ galaxy_info:
-
9
-
name
:
Ubuntu
versions
:
-
1
4
.04
-
1
6
.04
-
18.04
categories
:
-
system
...
...
tasks/icinga2-Debian.yml
View file @
039e87a4
...
...
@@ -3,16 +3,22 @@
-
name
:
Debian - Install apt-transport-https
become
:
yes
apt
:
name=apt-transport-https state=present
when
:
i2_
us
e_repository
when
:
i2_
manag
e_repository
-
name
:
Debian - Add Icinga 2 repository key
become
:
yes
apt_key
:
url="{{ i2_apt_key }}" state=present
when
:
i2_
us
e_repository and i2_apt_key
when
:
i2_
manag
e_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
when
:
i2_manage_repository
-
name
:
Debian - Ensure icinga2 is installed
become
:
yes
apt
:
name=icinga2 state=present
notify
:
start icinga2
when
:
i2_manage_package
tasks/icinga2-RedHat.yml
View file @
039e87a4
...
...
@@ -3,4 +3,10 @@
-
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
when
:
i2_manage_repository
-
name
:
RedHat - Ensure icinga2 is installed
become
:
yes
yum
:
name=icinga2 state=present
notify
:
start icinga2
when
:
i2_manage_package
tasks/main.yml
View file @
039e87a4
...
...
@@ -3,3 +3,7 @@
include
:
icinga2.yml
tags
:
-
install
-
name
:
Make sure Icinga 2 is started
service
:
name=icinga2 state=started enabled=yes
when
:
i2_manage_service
tests/test.yml
View file @
039e87a4
...
...
@@ -4,5 +4,3 @@
remote_user
:
root
roles
:
-
icinga2
vars
:
-
i2_use_repository
:
true
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment