Last active
August 29, 2015 14:09
-
-
Save adamcrews/21f4d41fb29b9a5fa366 to your computer and use it in GitHub Desktop.
Apache example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Exec { | |
path => ['/usr/bin', '/usr/local/bin'], | |
} | |
exec { 'update': | |
command => 'apt-get update', | |
} | |
class { 'apache': | |
mpm_module => 'prefork', | |
} | |
class { 'apache::mod::php': | |
require => Exec['update'], | |
} | |
apache::vhost { 'personal-site': | |
port => 80, | |
docroot => '/vagrant/docroot', | |
docroot_owner => 'vagrant', | |
docroot_group => 'vagrant', | |
} | |
host { 'personal-site': | |
ensure => present, | |
ip => $::ipaddress, | |
} | |
file { '/vagrant/docroot/index.php': | |
ensure => file, | |
owner => 'vagrant', | |
group => 'vagrant', | |
mode => '0644', | |
content => '<?php $title=\'From the php\'; ?> <h1> <?php echo $title; ?> </h1>', | |
require => Apache::Vhost['personal-site'], | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "puppetlabs/ubuntu-14.04-64-puppet" | |
config.vm.provision "puppet" do |puppet| | |
puppet.manifests_path = "manifests" | |
puppet.manifest_file = "default.pp" | |
puppet.module_path = "modules" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment