Skip to content

Instantly share code, notes, and snippets.

@soumyadipdm
Last active March 27, 2018 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soumyadipdm/01c34b654e955f5a2ac47c7d023bef42 to your computer and use it in GitHub Desktop.
Save soumyadipdm/01c34b654e955f5a2ac47c7d023bef42 to your computer and use it in GitHub Desktop.
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