-
-
Save whytewolf/ae532b0a772bfec538f1 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
import salt.config | |
import salt.loader | |
__opts__ = salt.config.minion_config('/etc/salt/minion') | |
__grains__ = salt.loader.grains(__opts__) | |
__opts__['grains'] = __grains__ | |
__salt__ = salt.loader.minion_mods(__opts__) | |
pkglist = __salt__['pkg.list_pkgs']() | |
print pkglist |
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
import salt.client | |
local = salt.client.LocalClient() | |
pkglist = local.cmd('*', 'pkg.list_pkgs') | |
print pkglist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment