0

Is there any way to restart minions with python code? using local.cmd('*', 'cmd.run', ['net stop salt-minion']). Will shutting down the minions and making them non-responsive is right?

Sabby
  • 2,586
  • 2
  • 27
  • 41
  • OK I got it myself, local.cmd('*', 'cmd.run', ['net stop salt-minion && net start salt-minion']) will do the job. – user3272380 Sep 08 '14 at 23:11

1 Answers1

0

I know service.restart and even pkg.install works with salt-minion:

local.cmd('*', 'service.restart', ['salt-minion'])

Of course, you ought to test this on a subset of minions first.

Dan Garthwaite
  • 3,436
  • 4
  • 22
  • 32