Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixing #1088 - Adding puppet file configuration to copy index.html file ... #1115

Closed
wants to merge 2 commits into from

2 participants

Ryan Neufeld Mitchell Hashimoto
Ryan Neufeld

Adding puppet file configuration to copy index.html file to the correct location.

Ryan Neufeld

Mergey mergey?

Mitchell Hashimoto
Owner

Hm. I think instead of this I'd prefer if the entire "/vagrant" directory was a document root. Perhaps the cleanest way to do this would be an augeas rule but I'm not sure if augeas is installed by default in the VMs. Thoughts?

At the very least, maybe make this a symlink to "/vagrant/index.html" so that people following the guide can create it after the fact.

Ryan Neufeld

I don't think augeas is installed by default, and it would mean some extra modules for puppet as well. As far as a quick start guide is concerned I think that would be not-quick.

Perhaps a symlink of /var/www to /vagrant (or /vagrant/www) would be a better option?

Ryan Neufeld

@mitchellh We're hoping to depend on this doc for next weeks jQuery summit. Is there any chance you can merge this PR, and I'll come up with a better option for you later on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 17, 2012
  1. Require apache class for index.html

    Ryan Neufeld authored
  2. Ryan Neufeld

    Require apache class for index.html

    ryanneufeld authored Ryan Neufeld committed
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 4 deletions.
  1. +14 −4 v1/docs/getting-started/provisioning.md
18 v1/docs/getting-started/provisioning.md
View
@@ -86,6 +86,15 @@ class apache {
}
include apache
+
+file { "/var/www/index.html":
+ ensure => present,
+ source => "/vagrant/index.html",
+ owner => "root",
+ group => "root",
+ require => Class['apache'],
+}
+
{% endhighlight %}
We then add support in the Vagrantfile to support Puppet provisioning:
@@ -102,10 +111,11 @@ end
Alternatively you can run Puppet in client-server mode by enabling the `:puppet_server` provisioner. See the [Puppet Server](/v1/docs/provisioners/puppet_server.html) documentation for more details.
**Note:** The Puppet example above is not quite equivalent to the Chef example,
-Apache isn't properly configured to serve our `/vagrant` directory. The main
-purpose here is to show you how Puppet provisioning works with Vagrant. You
-can imagine how you would configure Apache further to serve from the `/vagrant`
-directory.
+Apache isn't properly configured to serve our `/vagrant` directory; instead we
+have configured puppet to copy the `index.html` file to the default webroot
+directory. The main purpose here is to show you how Puppet provisioning works
+with Vagrant. You can imagine how you would configure Apache further to serve
+from the `/vagrant` directory.
## Running it!
Something went wrong with that request. Please try again.