Mercurial > repos > other > Puppet
comparison modules/apache/manifests/service.pp @ 0:956e484adc12
Initial public release of Puppet configs
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 16 Aug 2014 19:47:38 +0000 |
parents | |
children | 37675581a273 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:956e484adc12 |
---|---|
1 # Class: apache::service | |
2 # | |
3 # Manages the Apache daemon | |
4 # | |
5 # Parameters: | |
6 # | |
7 # Actions: | |
8 # - Manage Apache service | |
9 # | |
10 # Requires: | |
11 # | |
12 # Sample Usage: | |
13 # | |
14 # sometype { 'foo': | |
15 # notify => Class['apache::service'], | |
16 # } | |
17 # | |
18 # | |
19 class apache::service ( | |
20 $service_name = $::apache::params::service_name, | |
21 $service_enable = true, | |
22 $service_ensure = 'running', | |
23 ) { | |
24 # The base class must be included first because parameter defaults depend on it | |
25 if ! defined(Class['apache::params']) { | |
26 fail('You must include the apache::params class before using any apache defined resources') | |
27 } | |
28 validate_bool($service_enable) | |
29 | |
30 service { 'httpd': | |
31 ensure => $service_ensure, | |
32 name => $service_name, | |
33 enable => $service_enable, | |
34 } | |
35 } |