Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

commit recent work

  • Loading branch information...
commit 1aacd996f8835750ea64b1e73b370137ece2d956 1 parent baa7072
@anuaimi authored
Showing with 14 additions and 9 deletions.
  1. +1 −1  README.md
  2. +8 −4 Vagrantfile
  3. +5 −4 puppet/manifests/nodes.pp
View
2  README.md
@@ -11,7 +11,7 @@ This project makes it simple and quick to set up an [Apache](http://httpd.apache
##Installation##
- clone the repo
`$ git clone git://github.com/anuaimi/apache_module.git`
- `cd /apache_module`
+ `cd apache_module`
- create the virtual machine. This will start Ubuntu and run [Puppet](http://puppetlabs.com/) to install the needed packages. It will also download the source to Apache.
`$ vagrant up`
- The Apache source is put in the shared directory (/vagrant in the VM and the current directory on your host computer) which means you can view/edit the source on your host machine and run it in the VM
View
12 Vagrantfile
@@ -3,8 +3,12 @@
Vagrant::Config.run do |config|
- config.vm.box = "base"
- # config.vm.box_url = "http://domain.com/path/to/above.box"
+ config.vm.host_name = 'apache.vagrantup.org'
+
+# config.vm.box = "lucid32"
+# config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
+ config.vm.box = "precise32"
+ config.vm.box_url = "http://files.vagrantup.com/precise32.box"
# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
@@ -23,11 +27,11 @@ Vagrant::Config.run do |config|
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
# config.vm.share_folder "v-data", "/vagrant_data", "../data"
- config.vm.provision :shell, :inline => "echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null"
+ config.vm.provision :shell, :inline => 'echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null'
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.manifest_file = "site.pp"
- puppet.module_path = "puppet/modules"
+ # puppet.module_path = "puppet/modules"
# puppet.options = "--verbose --debug"
end
View
9 puppet/manifests/nodes.pp
@@ -1,20 +1,21 @@
-node default {
+node 'modules.apache.org' {
# node /^proxy/ {
group { "puppet":
ensure => "present",
}
+ Group['puppet'] -> Exec['google-dns'] -> Exec['apt-update']
+
exec { 'google-dns':
command => 'echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null',
cwd => '/vagrant',
loglevel => info,
timeout => 1800,
}
- Exec['google-dns'] -> Exec['apt-update']
-
+
exec { 'apt-update':
- command => '/usr/bin/apt-get update',
+ command => 'sudo /usr/bin/apt-get update',
loglevel => info,
timeout => 3600,
}
Please sign in to comment.
Something went wrong with that request. Please try again.