Created
March 20, 2014 15:33
-
-
Save chitacan/9666484 to your computer and use it in GitHub Desktop.
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
class webserver{ | |
case $operatingsystem { | |
ubuntu: { | |
$apache = 'apache2' | |
$configfile = '/etc/apache2/sites-enabled/000-default' | |
} | |
} | |
package { 'apache': | |
name => $apache, | |
ensure => 'installed', | |
} | |
file { 'site-config': | |
path => $configfile, | |
source => '/vagrant/manifests/site-config', | |
require => Package['apache'], | |
} | |
service { 'apache': | |
name => $apache, | |
ensure => 'running', | |
hasrestart => true, | |
subscribe => File['site-config'] | |
} | |
file { '/vagrant/index.html': | |
content => "<h1> vagrant + puppet + ${apache} + ${operatingsystem}</h1>", | |
} | |
if $apache == 'apache2' { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment