Skip to content

Instantly share code, notes, and snippets.

@soumyadipdm
Created March 27, 2018 18:18
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/f9e33f912525bf284304c20b150590bb to your computer and use it in GitHub Desktop.
Save soumyadipdm/f9e33f912525bf284304c20b150590bb to your computer and use it in GitHub Desktop.
function my_stdlib::get_apps () >> Array[String] {
# Get all the apps running on the host
$apps = []
$facts['myenc']['myapps'].each | $range, $rval | {
$rval.each | $key, $val | {
if $key == 'appname' {
$apps = concat($apps, $val)
}
}
}
return($apps.unique)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment