spacepaste

  1.  
  2. $ python
  3. Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
  4. [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
  5. Type "help", "copyright", "credits" or "license" for more information.
  6. >>> import salt.client
  7. >>> import salt.config
  8. >>> opts = salt.config.minion_config('/etc/salt/minion')
  9. >>> opts['timeout'] = 10
  10. >>> local_client = salt.client.LocalClient(mopts=opts)
  11. >>> local_client.cmd('dpuppetk.foobar.com', 'test.ping')
  12. Failed to connect to the Master, is the Salt Master running?
  13. {}
  14.