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-03-18 11:21:38 -04:00
|
|
|
groups => ['sudo', 'web', 'maverick', 'iceman', 'wordpress'],
|
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-03-18 11:21:38 -04:00
|
|
|
User['wordpress'],
|
2014-02-17 23:10:36 -05:00
|
|
|
],
|
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-03-18 11:21:38 -04:00
|
|
|
#maverick, iceman, and wordpress with no login
|
2014-02-17 23:10:36 -05:00
|
|
|
user { 'maverick':
|
|
|
|
ensure => present,
|
|
|
|
shell => '/sbin/nologin',
|
|
|
|
}
|
|
|
|
user { 'iceman':
|
|
|
|
ensure => present,
|
|
|
|
shell => '/sbin/nologin',
|
|
|
|
}
|
2014-03-18 11:21:38 -04:00
|
|
|
user { 'wordpress':
|
|
|
|
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
|
|
|
|
2014-03-18 11:21:38 -04:00
|
|
|
class { '::ssh::server':
|
2014-01-15 15:09:51 -05:00
|
|
|
require => Class['augeas'],
|
|
|
|
}
|
2014-01-22 09:42:02 -05:00
|
|
|
|
2014-03-18 11:21:38 -04:00
|
|
|
class { '::apache':
|
2014-01-22 09:42:02 -05:00
|
|
|
default_vhost => false,
|
2014-03-18 11:21:38 -04:00
|
|
|
mpm_module => 'prefork',
|
|
|
|
}
|
|
|
|
class { '::apache::mod::php': }
|
|
|
|
|
|
|
|
class { '::mysql::server': }
|
|
|
|
class { '::mysql::bindings':
|
|
|
|
php_enable => true,
|
|
|
|
}
|
|
|
|
|
|
|
|
class { '::wordpress':
|
|
|
|
wp_owner => 'root',
|
|
|
|
wp_group => 'wordpress',
|
|
|
|
install_dir => '/var/www/wordpress.atomaka.com',
|
2014-01-22 09:42:02 -05:00
|
|
|
}
|
2014-01-15 15:09:51 -05:00
|
|
|
|
|
|
|
# CONFIGURATIONS
|
2014-02-19 16:23:40 -05:00
|
|
|
ssh::server::configline { 'Port': value => '22984' }
|
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-03-18 11:21:38 -04:00
|
|
|
apache::vhost { 'wordpress.atomaka.com':
|
|
|
|
port => '80',
|
|
|
|
docroot => '/var/www/wordpress.atomaka.com',
|
|
|
|
docroot_owner => 'wordpress',
|
|
|
|
docroot_group => 'wordpress',
|
|
|
|
}
|
2014-02-17 23:10:36 -05:00
|
|
|
|
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-03-18 11:21:38 -04:00
|
|
|
file { '/home/atomaka/wordpress':
|
|
|
|
ensure => link,
|
|
|
|
owner => 'atomaka',
|
|
|
|
group => 'atomaka',
|
|
|
|
target => '/var/www/wordpress.atomaka.com',
|
|
|
|
require => [ User['atomaka'], File['/var/www/wordpress.atomaka.com'] ],
|
|
|
|
}
|
2014-02-17 23:10:36 -05:00
|
|
|
|
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'],
|
|
|
|
}
|