Skip to content

Instantly share code, notes, and snippets.

@eliasp
Last active August 29, 2015 14:01
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 eliasp/6b377962f53b8bdee4cb to your computer and use it in GitHub Desktop.
Save eliasp/6b377962f53b8bdee4cb to your computer and use it in GitHub Desktop.
Updating/improving Saltstack's 'grains'

Listing available grains

  • How does 'grains.ls' build its list?
    • It looks, like it currently simply executes all grain methods and then returns the keys of the resulting dictionary. Simply building the list could be probably done way better, e.g. similar to states/modules returning their virtual name. This would also allow grains to return multiple names for backwards compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment