My init.pp:
class apache{
if $docroot{
# Set Document Root to the new directory.
line{"$docroot":
file => "/etc/http/conf/httpd.conf",
line => 'DocumentRoot "/var/www/html"',
ensure => comment,
}
file{"$docroot.conf":
path => "/etc/http/conf.d/DocumentRoot.conf",
content =>'# This file sets the webserver Document Root
# dir for Apache.
DocumentRoot "$docroot"',
require => Line["$docroot"],
}
}
else {
$docroot = "/var/www/html"
} #<<< This Line 19.
$packages = {"httpd","mod_ssl","webalizer"}
package{$packages:
ensure => present,
}
file{$docroot:
ensure => directory,
mode => 755,
}
}
Evan
> file{"$docroot.conf":
> path => "/etc/http/conf.d/DocumentRoot.conf",
> content =>'# This file sets the webserver
> Document Root
> # dir for Apache.
> DocumentRoot "$docroot"',
There's currently a filed bug about carriage returns in strings not
counting against the line count. This string is messing up your line
count.
>
> require => Line["$docroot"],
> }
> }
> else {
> $docroot = "/var/www/html"
> } #<<< This
> Line 19.
>
> $packages = {"httpd","mod_ssl","webalizer"}
This is not how you specify an array; use [].
--
Work is not always required. There is such a thing as sacred idleness.
-- George MacDonald
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
Evan
http://reductivelabs.com/trac/puppet/wiki/CompleteConfiguration
-> common
->
http://git.black.co.at/?p=module-common;a=blob;f=manifests/defines/line.pp
Regards, DavidS