File: unit_services_win.cf

package info (click to toggle)
cfengine3 3.2.4-2%2Bnmu1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,976 kB
  • sloc: ansic: 66,527; sh: 11,600; yacc: 407; makefile: 288
file content (50 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#########################################################################
#
#   win_services.cf - Windows Service Management
#
#########################################################################

bundle agent win_services
{
vars:

# NOTE: Use "Service Name" (not "Display Name");
#       Administrative Tools -> Services -> Double Click on one to see its name

  "bad_services"       slist => { 
                                "RemoteRegistry"
                                };
  

Windows_Server_2003_R2::

  "autostart_services" slist => { 
                                "Alerter",
                                "W32Time"  # Windows Time
                                };

Windows_Server_2008::

  "autostart_services" slist => { 
                                "MpsSvc",  # Windows Firewall
                                "W32Time"  # Windows Time
                                };


services:

  "$(bad_services)"
     service_policy => "disable",
     service_method => force_deps,
     comment => "Disable services that create security issues";
  

Windows_Server_2003_R2|Windows_Server_2008::
  
  "$(autostart_services)"
     service_policy => "start",
     service_method => bootstart,
     comment => "Make sure important services are running and set to start at boot time";

}