Skip to content

Commit ddb8c6e

Browse files
committed
Merge pull request #24 from Tribily/syntax-fix
Syntax fixes
2 parents 789d8d3 + 42bc8ba commit ddb8c6e

File tree

9 files changed

+18
-13
lines changed

9 files changed

+18
-13
lines changed

lib/puppet/type/a2mod.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212

1313
autorequire(:package) { catalog.resource(:package, 'httpd')}
1414

15-
end
16-
end
15+
end

manifests/init.pp

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@
1414
#
1515
class apache {
1616
include apache::params
17+
1718
package { 'httpd':
1819
name => $apache::params::apache_name,
1920
ensure => installed,
2021
}
22+
2123
service { 'httpd':
2224
name => $apache::params::apache_name,
2325
ensure => running,
@@ -26,7 +28,7 @@
2628
}
2729

2830
file { "httpd_vdir":
29-
name => $apache::params::vdir,
31+
path => $apache::params::vdir,
3032
ensure => directory,
3133
recurse => true,
3234
purge => true,

manifests/params.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
$user = 'www-data'
2222
$group = 'www-data'
23-
$ssl = 'true'
23+
$ssl = true
2424
$template = 'apache/vhost-default.conf.erb'
2525
$priority = '25'
2626
$servername = ''
@@ -30,7 +30,7 @@
3030
$options = 'Indexes FollowSymLinks MultiViews'
3131
$vhost_name = '*'
3232

33-
case $operatingsystem {
33+
case $::operatingsystem {
3434
'centos', 'redhat', 'fedora', 'scientific': {
3535
$apache_name = 'httpd'
3636
$php_package = 'php'

manifests/ssl.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
include apache
1818

19-
case $operatingsystem {
19+
case $::operatingsystem {
2020
'centos', 'fedora', 'redhat', 'scientific': {
2121
package { "apache_ssl_package":
2222
name => "$apache::params::ssl_package",

manifests/vhost.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
# Since the template will use auth, redirect to https requires mod_rewrite
5959
if $redirect_ssl == true {
60-
case $operatingsystem {
60+
case $::operatingsystem {
6161
'debian','ubuntu': {
6262
A2mod <| title == 'rewrite' |>
6363
}
@@ -66,7 +66,7 @@
6666
}
6767

6868
file { "${priority}-${name}.conf":
69-
name => "${apache::params::vdir}/${priority}-${name}.conf",
69+
path => "${apache::params::vdir}/${priority}-${name}.conf",
7070
content => template($template),
7171
owner => 'root',
7272
group => 'root',

manifests/vhost/proxy.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
}
4141

4242
file { "${priority}-${name}":
43-
name => "${apache::params::vdir}/${priority}-${name}",
43+
path => "${apache::params::vdir}/${priority}-${name}",
4444
content => template($template),
4545
owner => 'root',
4646
group => 'root',

manifests/vhost/redirect.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
$srvname = $name
3131

3232
file { "${priority}-${name}":
33-
name => "${apache::params::vdir}/${priority}-${name}",
33+
path => "${apache::params::vdir}/${priority}-${name}",
3434
content => template($template),
3535
owner => 'root',
3636
group => 'root',

files/test.vhost templates/test.vhost.erb

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
NameVirtualHost *:80
55
<VirtualHost *:80>
66
ServerName testvhost
7-
DocumentRoot /tmp/testvhost
8-
<Directory /tmp/testvhost>
7+
DocumentRoot <%= docroot %>
8+
<Directory <%= docroot %>>
99
Options Indexes FollowSymLinks MultiViews
1010
AllowOverride None
1111
Order allow,deny

tests/vhost.pp

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
include apache
2-
apache::vhost { 'test.vhost': source => 'puppet:///modules/apache/test.vhost' }
2+
apache::vhost { 'test.vhost':
3+
port => 80,
4+
docroot => '/tmp/testvhost',
5+
template => 'apache/test.vhost.erb'
6+
}

0 commit comments

Comments
 (0)