Last active
March 27, 2018 15:54
-
-
Save soumyadipdm/01c34b654e955f5a2ac47c7d023bef42 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
function my_stdlib::is_app (String $app) >> Boolean { | |
# Check if the host is running the specified app | |
$is_found = false | |
$facts['myapps']['myclusters'].each | $appname, $rval| { | |
if has_key($rval, 'name') { | |
if $rval['name'] == $app { | |
$is_found = true | |
# return from here | |
} | |
} | |
} | |
$is_found | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment