Skip to content

Instantly share code, notes, and snippets.

@jamescarr
Created July 18, 2012 05:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jamescarr/3134362 to your computer and use it in GitHub Desktop.
Save jamescarr/3134362 to your computer and use it in GitHub Desktop.
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