Created
July 18, 2012 05:18
-
-
Save jamescarr/3134362 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
import 'mysql' | |
import 'apache' | |
node default { | |
include users | |
include db | |
include apache_server | |
exec {"apt-update": | |
command => "apt-get update", | |
path => "/usr/bin" | |
} | |
package{ "make": | |
ensure => present, | |
} | |
package{ "ruby-shadow": | |
ensure => present, | |
provider => gem | |
} | |
package{ "vim": | |
ensure => present | |
} | |
package {"git-core": | |
ensure => present | |
} | |
file { "/var/www": | |
owner => 'www-deploy', | |
group => 'www-data', | |
mode => 770, | |
recurse => true | |
} | |
} | |
class { 'mysql::server': | |
config_hash => { 'root_password' =>'foo'} | |
} | |
class { 'apache': | |
} | |
class { 'apache::php': | |
} | |
class apache_server { | |
apache::vhost { 'my.example.com': | |
priority => '10', | |
port => '80', | |
docroot => '/var/www/current/', | |
serveraliases => ['example.com',], | |
} | |
} | |
class db { | |
mysql::db { 'shipping': | |
user => 'myuser', | |
password => 'mypass', | |
host => 'localhost', | |
grant => ['all'], | |
} | |
} | |
class users { | |
user { 'www-deploy': | |
ensure => present, | |
password => '$6$kQ8Tudhe$niOaH1vWIg7Xl9EkTlfSri1c/HHClACGIJCtLxubnlzoZNEaYLunzMmbUJ9sNI7GD6t0nPyvnZrTMHk9wba221', | |
groups => 'www-data', | |
managehome => true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment