Skip to content

Instantly share code, notes, and snippets.

@55abhilash
Created January 10, 2017 03:27
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 55abhilash/e8964dfb5c61cd03a20363fac81a3289 to your computer and use it in GitHub Desktop.
Save 55abhilash/e8964dfb5c61cd03a20363fac81a3289 to your computer and use it in GitHub Desktop.
salt python client api localclient.
wheel.cmd('key.accept', machine_orig)
client = salt.client.LocalClient()
os_info = client.cmd(machine, 'grains.item',['os'])[machine]['os'] + ' ' + client.cmd(machine, 'grains.item',['osrelease'])[machine]['osrelease'] + ' ' + client.cmd(machine, 'grains.item', ['oscodename'])[machine]['oscodename']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment