How to use the win_service module in a state?

325 views
Skip to first unread message

Fredrik Averpil

unread,
Feb 9, 2016, 7:24:13 AM2/9/16
to salt-...@googlegroups.com

I’m trying to use the win_service module in my highstate, in order to make sure the service is configured properly.

I’ve created a custom package, which installs fine. The service is ensured to be running. But I’m getting “Module function win_service.config is not available” when trying to run the win_service module.

What am I doing wrong?

tractor-blade:
  pkg:
    - installed

Pixar Tractor Blade Service 2.2:
  service.running: []
  module.run:
    - name: win_service.config
    - m_name: Pixar Tractor Blade Service 2.2
    - display_name: Pixar Tractor Blade Service 2.2
    - obj: fredrik
    - password: secret

Fredrik Averpil

unread,
Feb 9, 2016, 9:42:12 AM2/9/16
to Salt-users
So, it seems win_service is not available in 2015.8.5, despite the docs.

Is there any documentation anywhere on how you can download this module from github and include it inside e.g. an 2015.8.5 install?

Regards,
Fredrik

Fredrik Averpil

unread,
Feb 10, 2016, 12:16:32 AM2/10/16
to salt-...@googlegroups.com
Okay, for anyone traversing down the same road;
  • Create /srv/salt/_modules
  • Copy e.g. win_service.py from github into /srv/salt/_modules
  • Execute: salt '*' saltutil.sync_modules
  • Execute: salt '*' sys.list_functions (to verify)
  • Possibly restart the salt master at some point
 
Cheers,
Fredrik



--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Leonhardt

unread,
Feb 10, 2016, 12:52:27 AM2/10/16
to salt-...@googlegroups.com
Hi,

I'd raise that as a bug. Or, are you sure, both minion and master are n 2015.8.5? Maybe the minion is not - version mismatch on master vs minion has caught out quite a few in the past. May be worth checking.

Alex
--

Fredrik Averpil

unread,
Feb 10, 2016, 7:00:05 AM2/10/16
to salt-...@googlegroups.com
Hi Alex,

Both master and minion running 2015.8.5 (Beryllium). Already reported: https://github.com/saltstack/salt/issues/31041



Reply all
Reply to author
Forward
0 new messages