Add new vhosts and files for two sample subdomains

This commit is contained in:
Andrew Tomaka 2014-02-17 23:10:36 -05:00
parent 511cb12123
commit 25a41ca21e

View file

@ -7,10 +7,15 @@ group { 'web':
# atomaka, with SSH key
user { 'atomaka':
ensure => present,
groups => ['sudo', 'web'],
groups => ['sudo', 'web', 'maverick', 'iceman'],
managehome => true,
shell => '/bin/zsh',
require => [ Package['zsh'], Group['web'] ]
require => [
Package['zsh'],
Group['web'],
User['maverick'],
User['iceman'],
],
}
file { '/home/atomaka/.ssh':
ensure => directory,
@ -36,6 +41,15 @@ user { 'jeff':
password => '$6$.AURF9sE09Q$..S10CFY7G.AVXzSW//w6GoV6yPzBzdvyUl8a7oyYbW/XzBU.o6AdHxTgTkCSWb64zmN3QoKovoUyLJhE/MFP/',
require => Group['web'],
}
#maverick and iceman, no login
user { 'maverick':
ensure => present,
shell => '/sbin/nologin',
}
user { 'iceman':
ensure => present,
shell => '/sbin/nologin',
}
# PACKAGES
package { 'mosh': }
@ -74,6 +88,20 @@ apache::vhost { 'tc362.atomaka.com':
docroot_group => 'web',
}
apache::vhost { 'maverick.atomaka.com':
port => '80',
docroot => '/var/www/maverick.atomaka.com',
docroot_owner => 'maverick',
docroot_group => 'maverick',
}
apache::vhost { 'iceman.atomaka.com':
port => '80',
docroot => '/var/www/iceman.atomaka.com',
docroot_owner => 'iceman',
docroot_group => 'iceman',
}
# FILES
file { '/var/www/tc362.atomaka.com':
ensure => directory,
@ -83,6 +111,36 @@ file { '/var/www/tc362.atomaka.com':
before => Apache::Vhost['tc362.atomaka.com'],
}
file { '/var/www/maverick.atomaka.com':
ensure => directory,
owner => 'maverick',
group => 'maverick',
mode => '2775',
before => Apache::Vhost['maverick.atomaka.com'],
}
file { '/var/www/maverick.atomaka.com/index.html':
ensure => present,
owner => 'maverick',
group => 'maverick',
content => 'Bullshit! You can be mine.',
}
file { '/var/www/iceman.atomaka.com':
ensure => directory,
owner => 'iceman',
group => 'iceman',
mode => '2775',
before => Apache::Vhost['maverick.atomaka.com'],
}
file { '/var/www/iceman.atomaka.com/index.html':
ensure => present,
owner => 'iceman',
group => 'iceman',
content => 'You can be my wingman any time.',
}
file { '/var/www/tc362.atomaka.com/index.html':
ensure => present,
owner => 'atomaka',
@ -100,6 +158,22 @@ file { '/home/atomaka/web':
require => [ User['atomaka'], File['/var/www/tc362.atomaka.com'] ],
}
file { '/home/atomaka/maverick':
ensure => link,
owner => 'atomaka',
group => 'atomaka',
target => '/var/www/maverick.atomaka.com',
require => [ User['atomaka'], File['/var/www/maverick.atomaka.com'] ],
}
file { '/home/atomaka/iceman':
ensure => link,
owner => 'atomaka',
group => 'atomaka',
target => '/var/www/iceman.atomaka.com',
require => [ User['atomaka'], File['/var/www/iceman.atomaka.com'] ],
}
file { '/home/jeff/web':
ensure => link,
owner => 'jeff',