Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 04, 2012
@jesusaurus jesusaurus Adding support for Ubuntu
I don't expect Ubuntu to be any different from Debian, but just in case...
a6315dd
@jesusaurus jesusaurus Make the target class parameterized
If the $ipv6 parameter is true, then create a second host definition
with the ipv6 address, appending a '6' to the new resource's $name.
ff79e74
Showing with 19 additions and 1 deletion.
  1. +4 −0 manifests/init.pp
  2. +12 −1 manifests/target.pp
  3. +3 −0  manifests/ubuntu.pp
View
4 manifests/init.pp
@@ -30,6 +30,10 @@
$nagios_cfgdir = '/etc/nagios3'
include nagios::debian
}
+ 'ubuntu': {
+ $nagios_cfgdir = '/etc/nagios3'
+ include nagios::ubuntu
+ }
default: { fail("No such operatingsystem: ${::operatingsystem} yet defined") }
}
}
View
13 manifests/target.pp
@@ -1,6 +1,6 @@
# manifests/target.pp
-class nagios::target {
+class nagios::target ( $ipv6 = false ) {
@@nagios_host { "${fqdn}":
address => $ipaddress,
@@ -12,4 +12,15 @@
Nagios_host["${fqdn}"] { parents => $nagios_parents }
}
+ if ($ipv6 == true) {
+ @@nagios_host { "${fqdn}6":
+ address => $ipaddress6,
+ alias => "${hostname}6",
+ use => 'generic-host',
+ }
+ if ($nagios_parents != '') {
+ Nagios_host["${fqdn}6"] { parents => $nagios_parents }
+ }
+ }
+
}
View
3  manifests/ubuntu.pp
@@ -0,0 +1,3 @@
+class nagios::ubuntu inherits nagios::debian {
+
+}

No commit comments for this range

Something went wrong with that request. Please try again.