httpd vhost

19 views
Skip to first unread message

nicu lelu

unread,
Mar 21, 2018, 10:54:17 AM3/21/18
to Puppet Users
hi,
i like to configure apache vhost on centos 6.here the apache daemon is httpd.

[root@v manifests]# more site.pp
import '/etc/puppet/manifests/httpd.pp'
import '/etc/puppet/manifests/vhost.pp'
node 'y' {
include httpd
include y
}

[root@v manifests]# more vhost.pp
class y {
httpd::vhost {'testy.com':
port => '80',
docroot => '/var/www/vhost'
}
}

[root@v manifests]# more httpd.pp
class httpd {
package { httpd:

ensure => installed
}
file {
'/etc/httpd/conf/httpd.conf':
ensure => 'present',
source => 'puppet:///extra_files/httpd.conf'
}
file {
'/v':
ensure => 'directory'
}
service { httpd:
ensure => true,
enable => true,
subscribe => [File["/etc/httpd/conf/httpd.conf"],Package [httpd]]
}
}

on node y where is the agent with puppet agent -t is installed httpd but no vhost created.nothing in /etc/httpd/conf/httpd.conf.
tnx

Reply all
Reply to author
Forward
0 new messages