Mercurial > repos > other > Puppet
comparison modules/website/manifests/http.pp @ 277:13825cc1ec57
Replace deprecated validation methods
Puppet now supports data types
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sun, 26 Jan 2020 12:08:03 +0000 |
parents | 1df1e161bbb5 |
children | af7df930a670 |
comparison
equal
deleted
inserted
replaced
276:165ad12ea8ca | 277:13825cc1ec57 |
---|---|
4 $docroot_group = 'root', | 4 $docroot_group = 'root', |
5 $serveraliases = [], | 5 $serveraliases = [], |
6 $ensure = 'present', | 6 $ensure = 'present', |
7 $custom_fragment = undef | 7 $custom_fragment = undef |
8 ) { | 8 ) { |
9 validate_re($ensure, '^(present|absent)$', | |
10 "${ensure} is not supported for ensure. | |
11 Allowed values are 'present' and 'absent'.") | |
12 | |
13 if ! defined(Class['website']) { | 9 if ! defined(Class['website']) { |
14 fail('You must include the website base class before using any website defined resources') | 10 fail('You must include the website base class before using any website defined resources') |
15 } | 11 } |
16 | |
17 validate_re($ensure, '^(present|absent)$', | |
18 "${ensure} is not supported for ensure. | |
19 Allowed values are 'present' and 'absent'.") | |
20 | 12 |
21 $shortname = domain_to_short_name($name) | 13 $shortname = domain_to_short_name($name) |
22 $logpart = $shortname | 14 $logpart = $shortname |
23 | 15 |
24 if $docroot == undef { | 16 if $docroot == undef { |