Closed pete0emerson closed 13 years ago
This is indeed a bug. Hm. I don't want to overwhelm the reader with a larger Puppet manifest. But I can't think of an immediately better way...
I agree with the desire to not overwhelm the reader. If you documented every possible way vagrant can be touched and tested and used, you'd never get anything else done! How about leaving the documentation as is, putting fuller code in a repo, and then make a note in the documentation that the current puppet example is not identical to the Chef example, but for a full example go
Thanks again for vagrant. It's really slick.
Pete
Thanks for your response. I've done just as you said :)
The website will be updated when Vagrant 0.8.0 is pushed (a week or so).
Your puppet example at http://vagrantup.com/docs/getting-started/provisioning.html gets Apache running, but leaves it at the default site instead of connecting to your dummy index.html like the chef recipe does.
Here's my proposed change to the recipe, and a support file to go with it:
Basic Puppet Apache manifest
class lucid32 { package { "apache2": ensure => present, } file { "/etc/apache2/sites-available/project.conf": require => Package["apache2"], ensure => file, owner => root, group => root, mode => 0644, source => "/vagrant/project.conf", notify => Service["apache2"] } file { "/etc/apache2/sites-enabled/project.conf": ensure => "/etc/apache2/sites-available/project.conf", require => File["/etc/apache2/sites-available/project.conf"], notify => Service["apache2"] } file { "/etc/apache2/sites-enabled/000-default": ensure => absent, require => File["/etc/apache2/sites-enabled/project.conf"], notify => Service["apache2"] } service { "apache2": require => File["/etc/apache2/sites-enabled/project.conf"], ensure => running } }
include lucid32
In my vagrant root dir is project.conf. Note that unlike chef it's not as dynamic, but it does the job.
<VirtualHost *:80> DocumentRoot /vagrant
Pete