tc362/manifests/site.pp

54 lines
1.1 KiB
ObjectPascal
Raw Permalink Normal View History

2014-01-15 15:09:51 -05:00
# USERS
user { 'atomaka':
ensure => 'present',
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'],
}
# 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 { 'PermitRootLogin': value => 'no' }
ssh::server::configline { 'PasswordAuthentication': value => 'no' }
ssh::server::configline { 'AllowUsers/1': value => 'atomaka' }
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'],
}