tc362/manifests/site.pp

64 lines
1.5 KiB
ObjectPascal
Raw Normal View History

2014-01-15 15:09:51 -05:00
# USERS
# atomaka, with SSH key
2014-01-15 15:09:51 -05:00
user { 'atomaka':
ensure => present,
2014-01-15 15:09:51 -05:00
groups => ['sudo'],
managehome => true,
shell => '/bin/zsh',
require => Package['zsh'],
}
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'],
}
# jeff, with password
user { 'jeff':
ensure => present,
managehome => true,
shell => '/bin/bash',
password => '$6$.AURF9sE09Q$..S10CFY7G.AVXzSW//w6GoV6yPzBzdvyUl8a7oyYbW/XzBU.o6AdHxTgTkCSWb64zmN3QoKovoUyLJhE/MFP/'
}
2014-01-15 15:09:51 -05:00
# PACKAGES
package { 'mosh': }
package { 'zsh': }
# 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'],
}
class { 'apache': }
# CONFIGURATIONS
ssh::server::configline { 'Port': value => '22984' }
2014-01-15 15:09:51 -05:00
ssh::server::configline { 'PermitRootLogin': value => 'no' }
ssh::server::configline { 'PasswordAuthentication': value => 'yes' }
2014-01-15 15:09:51 -05:00
ssh::server::configline { 'AllowUsers/1': value => 'atomaka' }
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-15 15:09:51 -05:00
# FILES
file { '/var/www/index.html':
ensure => present,
content => file('/tmp/puppet/files/index.html'),
require => Class['apache'],
}