Skip to content

Instantly share code, notes, and snippets.

@b4ldr
Last active August 29, 2015 13:57
Show Gist options
  • Save b4ldr/9830501 to your computer and use it in GitHub Desktop.
Save b4ldr/9830501 to your computer and use it in GitHub Desktop.
#In the example below the class "something::else" includes class "postgresql".
#De class puppios::checks::auto checks for the existence of both "postgresql"
#and "something::else". It will only detect "something::else" while the class
#postgresql is correctly applied to the host.
class puppios::checks::auto(
) inherits puppios::params {
#Check for classes
#check for postgres class, if available add the check_postgres class
if tagged(postgresql) {
include puppios::checks::check_postgres
notify {"Postgres Yeeeaaahhh":}
}
if tagged(something::else) {
notify {"something else Yeeeaaahhh":}
}
}
class something::else {
include postgresql
}
node 'www1.example.com' {
include something::else
include puppios::checks::auto
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment