Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
github-mirror
ansible-icinga2
Commits
04b813ad
Commit
04b813ad
authored
May 07, 2018
by
Blerim Sheqa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use stanza style for modules with multiple parameters
parent
039e87a4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
handlers/main.yml
handlers/main.yml
+5
-3
tasks/icinga2-Debian.yml
tasks/icinga2-Debian.yml
+12
-4
tasks/icinga2-RedHat.yml
tasks/icinga2-RedHat.yml
+6
-2
tasks/main.yml
tasks/main.yml
+4
-1
No files found.
handlers/main.yml
View file @
04b813ad
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
-
name
:
start icinga2
-
name
:
start icinga2
become
:
yes
become
:
yes
service
:
name=icinga2 state=started enabled=yes
service
:
when
:
name=icinga2
-
i2_manage_service
state=started
enabled=yes
when
:
i2_manage_service
tasks/icinga2-Debian.yml
View file @
04b813ad
...
@@ -2,23 +2,31 @@
...
@@ -2,23 +2,31 @@
-
name
:
Debian - Install apt-transport-https
-
name
:
Debian - Install apt-transport-https
become
:
yes
become
:
yes
apt
:
name=apt-transport-https state=present
apt
:
name=apt-transport-https
state=present
when
:
i2_manage_repository
when
:
i2_manage_repository
-
name
:
Debian - Add Icinga 2 repository key
-
name
:
Debian - Add Icinga 2 repository key
become
:
yes
become
:
yes
apt_key
:
url="{{ i2_apt_key }}" state=present
apt_key
:
url="{{ i2_apt_key }}"
state=present
when
:
i2_manage_repository and i2_apt_key
when
:
i2_manage_repository and i2_apt_key
-
name
:
Debian - Add Icinga 2 repository
-
name
:
Debian - Add Icinga 2 repository
become
:
yes
become
:
yes
apt_repository
:
repo={{ item.repo }} state={{ item.state}}
apt_repository
:
repo={{ item.repo }}
state={{ item.state}}
with_items
:
with_items
:
-
{
repo
:
"
{{
i2_apt_url
}}"
,
state
:
"
present"
}
-
{
repo
:
"
{{
i2_apt_url
}}"
,
state
:
"
present"
}
when
:
i2_manage_repository
when
:
i2_manage_repository
-
name
:
Debian - Ensure icinga2 is installed
-
name
:
Debian - Ensure icinga2 is installed
become
:
yes
become
:
yes
apt
:
name=icinga2 state=present
apt
:
name=icinga2
state=present
notify
:
start icinga2
notify
:
start icinga2
when
:
i2_manage_package
when
:
i2_manage_package
tasks/icinga2-RedHat.yml
View file @
04b813ad
...
@@ -2,11 +2,15 @@
...
@@ -2,11 +2,15 @@
-
name
:
RedHat - Add Icinga 2 repository
-
name
:
RedHat - Add Icinga 2 repository
become
:
yes
become
:
yes
template
:
src=ICINGA-release.repo dest=/etc/yum.repos.d/ICINGA-release.repo
template
:
src=ICINGA-release.repo
dest=/etc/yum.repos.d/ICINGA-release.repo
when
:
i2_manage_repository
when
:
i2_manage_repository
-
name
:
RedHat - Ensure icinga2 is installed
-
name
:
RedHat - Ensure icinga2 is installed
become
:
yes
become
:
yes
yum
:
name=icinga2 state=present
yum
:
name=icinga2
state=present
notify
:
start icinga2
notify
:
start icinga2
when
:
i2_manage_package
when
:
i2_manage_package
tasks/main.yml
View file @
04b813ad
...
@@ -5,5 +5,8 @@
...
@@ -5,5 +5,8 @@
-
install
-
install
-
name
:
Make sure Icinga 2 is started
-
name
:
Make sure Icinga 2 is started
service
:
name=icinga2 state=started enabled=yes
service
:
name=icinga2
state=started
enabled=yes
when
:
i2_manage_service
when
:
i2_manage_service
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