2014-01-22 09:42:02 -05:00
|
|
|
# GROUPS
|
|
|
|
group { 'web':
|
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
|
2014-01-15 15:09:51 -05:00
|
|
|
# USERS
|
2014-01-22 09:26:19 -05:00
|
|
|
# atomaka, with SSH key
|
2014-01-15 15:09:51 -05:00
|
|
|
user { 'atomaka':
|
2014-01-22 09:26:19 -05:00
|
|
|
ensure => present,
|
2014-02-17 23:10:36 -05:00
|
|
|
groups => ['sudo', 'web', 'maverick', 'iceman'],
|
2014-01-15 15:09:51 -05:00
|
|
|
managehome => true,
|
|
|
|
shell => '/bin/zsh',
|
2014-02-17 23:10:36 -05:00
|
|
|
require => [
|
|
|
|
Package['zsh'],
|
|
|
|
Group['web'],
|
|
|
|
User['maverick'],
|
|
|
|
User['iceman'],
|
|
|
|
],
|
2014-01-15 15:09:51 -05:00
|
|
|
}
|
|
|
|
file { '/home/atomaka/.ssh':
|
|
|
|
ensure => directory,
|
|
|
|
owner => 'atomaka',
|
|
|
|
group => 'atomaka',
|
|
|
|
mode => '0700',
|
|
|
|
require => User['atomaka'],
|
|
|
|
}
|
|
|
|
file { '/home/atomaka/.ssh/authorized_keys':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'atomaka',
|
|
|
|
group => 'atomaka',
|
|
|
|
mode => '0600',
|
2014-01-15 15:34:42 -05:00
|
|
|
content => file('/tmp/puppet/files/keys/atomaka'),
|
2014-01-15 15:09:51 -05:00
|
|
|
require => File['/home/atomaka/.ssh'],
|
|
|
|
}
|
2014-01-22 09:26:19 -05:00
|
|
|
# jeff, with password
|
|
|
|
user { 'jeff':
|
|
|
|
ensure => present,
|
2014-01-22 09:42:02 -05:00
|
|
|
groups => ['web'],
|
2014-01-22 09:26:19 -05:00
|
|
|
managehome => true,
|
|
|
|
shell => '/bin/bash',
|
2014-01-22 09:42:02 -05:00
|
|
|
password => '$6$.AURF9sE09Q$..S10CFY7G.AVXzSW//w6GoV6yPzBzdvyUl8a7oyYbW/XzBU.o6AdHxTgTkCSWb64zmN3QoKovoUyLJhE/MFP/',
|
|
|
|
require => Group['web'],
|
2014-01-22 09:26:19 -05:00
|
|
|
}
|
2014-02-17 23:10:36 -05:00
|
|
|
#maverick and iceman, no login
|
|
|
|
user { 'maverick':
|
|
|
|
ensure => present,
|
|
|
|
shell => '/sbin/nologin',
|
|
|
|
}
|
|
|
|
user { 'iceman':
|
|
|
|
ensure => present,
|
|
|
|
shell => '/sbin/nologin',
|
|
|
|
}
|
2014-01-15 15:09:51 -05:00
|
|
|
|
|
|
|
# PACKAGES
|
|
|
|
package { 'mosh': }
|
|
|
|
package { 'zsh': }
|
2014-02-06 15:34:21 -05:00
|
|
|
package { 'mailutils': }
|
2014-01-15 15:09:51 -05:00
|
|
|
|
|
|
|
# CLASSES
|
|
|
|
include augeas
|
2014-01-15 15:47:28 -05:00
|
|
|
include sudo
|
2014-01-15 15:09:51 -05:00
|
|
|
|
|
|
|
class { 'ssh::server':
|
|
|
|
require => Class['augeas'],
|
|
|
|
}
|
2014-01-22 09:42:02 -05:00
|
|
|
|
|
|
|
class { 'apache':
|
|
|
|
default_vhost => false,
|
|
|
|
}
|
2014-01-15 15:09:51 -05:00
|
|
|
|
|
|
|
# CONFIGURATIONS
|
2014-02-19 11:01:28 -05:00
|
|
|
ssh::server::configline { 'Port': value => '22985' }
|
2014-01-15 15:09:51 -05:00
|
|
|
ssh::server::configline { 'PermitRootLogin': value => 'no' }
|
2014-01-22 09:26:19 -05:00
|
|
|
ssh::server::configline { 'PasswordAuthentication': value => 'yes' }
|
2014-01-15 15:09:51 -05:00
|
|
|
ssh::server::configline { 'AllowUsers/1': value => 'atomaka' }
|
2014-01-22 09:26:19 -05:00
|
|
|
ssh::server::configline { 'AllowUsers/2': value => 'jeff' }
|
2014-01-15 15:09:51 -05:00
|
|
|
|
2014-01-15 15:47:28 -05:00
|
|
|
sudo::conf { 'sudo':
|
|
|
|
priority => 10,
|
|
|
|
content => "%sudo ALL=(ALL) NOPASSWD: ALL\n",
|
|
|
|
}
|
|
|
|
|
2014-01-22 09:42:02 -05:00
|
|
|
apache::vhost { 'tc362.atomaka.com':
|
|
|
|
default_vhost => true,
|
|
|
|
port => '80',
|
|
|
|
docroot => '/var/www/tc362.atomaka.com',
|
|
|
|
docroot_owner => 'atomaka',
|
|
|
|
docroot_group => 'web',
|
|
|
|
}
|
|
|
|
|
2014-02-17 23:10:36 -05:00
|
|
|
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',
|
|
|
|
}
|
|
|
|
|
2014-01-15 15:09:51 -05:00
|
|
|
# FILES
|
2014-01-22 09:42:02 -05:00
|
|
|
file { '/var/www/tc362.atomaka.com':
|
2014-02-19 11:01:28 -05:00
|
|
|
ensure => directory,
|
|
|
|
owner => 'atomaka',
|
|
|
|
group => 'web',
|
|
|
|
mode => '2775',
|
|
|
|
source => '/tmp/puppet/files/tc362',
|
|
|
|
recurse => true,
|
|
|
|
before => Apache::Vhost['tc362.atomaka.com'],
|
2014-01-22 09:42:02 -05:00
|
|
|
}
|
|
|
|
|
2014-02-17 23:10:36 -05:00
|
|
|
file { '/var/www/maverick.atomaka.com':
|
2014-02-19 11:01:28 -05:00
|
|
|
ensure => directory,
|
2014-02-18 01:32:01 -05:00
|
|
|
owner => 'maverick',
|
|
|
|
group => 'maverick',
|
2014-02-19 11:01:28 -05:00
|
|
|
mode => '2775',
|
|
|
|
source => '/tmp/puppet/files/maverick',
|
|
|
|
recurse => true,
|
|
|
|
before => Apache::Vhost['maverick.atomaka.com'],
|
2014-02-17 23:10:36 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
file { '/var/www/iceman.atomaka.com':
|
2014-02-19 11:01:28 -05:00
|
|
|
ensure => directory,
|
2014-02-18 01:32:01 -05:00
|
|
|
owner => 'iceman',
|
|
|
|
group => 'iceman',
|
2014-02-19 11:01:28 -05:00
|
|
|
mode => '2775',
|
|
|
|
source => '/tmp/puppet/files/iceman',
|
|
|
|
recurse => true,
|
|
|
|
before => Apache::Vhost['iceman.atomaka.com'],
|
2014-01-15 15:09:51 -05:00
|
|
|
}
|
2014-01-22 11:04:46 -05:00
|
|
|
|
|
|
|
file { '/home/atomaka/web':
|
|
|
|
ensure => link,
|
|
|
|
owner => 'atomaka',
|
|
|
|
group => 'atomaka',
|
|
|
|
target => '/var/www/tc362.atomaka.com',
|
|
|
|
require => [ User['atomaka'], File['/var/www/tc362.atomaka.com'] ],
|
|
|
|
}
|
|
|
|
|
2014-02-17 23:10:36 -05:00
|
|
|
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'] ],
|
|
|
|
}
|
|
|
|
|
2014-01-22 11:04:46 -05:00
|
|
|
file { '/home/jeff/web':
|
|
|
|
ensure => link,
|
|
|
|
owner => 'jeff',
|
|
|
|
group => 'jeff',
|
|
|
|
target => '/var/www/tc362.atomaka.com',
|
|
|
|
require => [ User['jeff'], File['/var/www/tc362.atomaka.com'] ],
|
|
|
|
}
|
2014-02-06 15:34:21 -05:00
|
|
|
|
|
|
|
file { '/etc/profile':
|
|
|
|
ensure => present,
|
|
|
|
content => file('/tmp/puppet/files/profile'),
|
|
|
|
require => Package['mailutils'],
|
|
|
|
}
|