diff --git a/files/iceman/iceman.jpg b/files/iceman/iceman.jpg
new file mode 100755
index 0000000..29bb618
Binary files /dev/null and b/files/iceman/iceman.jpg differ
diff --git a/files/iceman/index.html b/files/iceman/index.html
new file mode 100644
index 0000000..2de87fb
--- /dev/null
+++ b/files/iceman/index.html
@@ -0,0 +1,29 @@
+
+
+
+
+ Iceman
+
+
+
+ You can be my wingman any time.
+
+
diff --git a/files/maverick/index.html b/files/maverick/index.html
new file mode 100644
index 0000000..de58afd
--- /dev/null
+++ b/files/maverick/index.html
@@ -0,0 +1,29 @@
+
+
+
+
+ Maverick
+
+
+
+ Bullshit! You can be mine.
+
+
diff --git a/files/maverick/maverick.jpg b/files/maverick/maverick.jpg
new file mode 100755
index 0000000..0e70141
Binary files /dev/null and b/files/maverick/maverick.jpg differ
diff --git a/files/index.html b/files/tc362/index.html
similarity index 100%
rename from files/index.html
rename to files/tc362/index.html
diff --git a/manifests/site.pp b/manifests/site.pp
index 5b3439d..f9892da 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -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': }
@@ -55,7 +69,7 @@ class { 'apache':
}
# CONFIGURATIONS
-ssh::server::configline { 'Port': value => '22984' }
+ssh::server::configline { 'Port': value => '22985' }
ssh::server::configline { 'PermitRootLogin': value => 'no' }
ssh::server::configline { 'PasswordAuthentication': value => 'yes' }
ssh::server::configline { 'AllowUsers/1': value => 'atomaka' }
@@ -74,22 +88,49 @@ apache::vhost { 'tc362.atomaka.com':
docroot_group => 'web',
}
-# FILES
-file { '/var/www/tc362.atomaka.com':
- ensure => directory,
- owner => 'atomaka',
- group => 'web',
- mode => '2775',
- before => Apache::Vhost['tc362.atomaka.com'],
+apache::vhost { 'maverick.atomaka.com':
+ port => '80',
+ docroot => '/var/www/maverick.atomaka.com',
+ docroot_owner => 'maverick',
+ docroot_group => 'maverick',
}
-file { '/var/www/tc362.atomaka.com/index.html':
- ensure => present,
+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,
owner => 'atomaka',
group => 'web',
- mode => '0664',
- content => file('/tmp/puppet/files/index.html'),
- require => File['/var/www/tc362.atomaka.com'],
+ mode => '2775',
+ source => '/tmp/puppet/files/tc362',
+ recurse => true,
+ before => Apache::Vhost['tc362.atomaka.com'],
+}
+
+file { '/var/www/maverick.atomaka.com':
+ ensure => directory,
+ owner => 'maverick',
+ group => 'maverick',
+ mode => '2775',
+ source => '/tmp/puppet/files/maverick',
+ recurse => true,
+ before => Apache::Vhost['maverick.atomaka.com'],
+}
+
+file { '/var/www/iceman.atomaka.com':
+ ensure => directory,
+ owner => 'iceman',
+ group => 'iceman',
+ mode => '2775',
+ source => '/tmp/puppet/files/iceman',
+ recurse => true,
+ before => Apache::Vhost['iceman.atomaka.com'],
}
file { '/home/atomaka/web':
@@ -100,6 +141,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',
diff --git a/week6/subdomains.txt b/week6/subdomains.txt
new file mode 100644
index 0000000..ed829bc
--- /dev/null
+++ b/week6/subdomains.txt
@@ -0,0 +1,3 @@
+162.243.226.212
+* iceman.atomaka.com
+* maverick.atomaka.com