Last active
August 29, 2015 13:57
-
-
Save b4ldr/9830501 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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":} | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class something::else { | |
include postgresql | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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