Skip to content

Instantly share code, notes, and snippets.

@patrickkelso
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickkelso/b76f99dae6fdeb4b571a to your computer and use it in GitHub Desktop.
Save patrickkelso/b76f99dae6fdeb4b571a to your computer and use it in GitHub Desktop.
Puppet profile
class profile::crontab {
$cronfiles = ['/etc/at.allow', '/etc/crontab']
$crondirs = ['/etc/cron.hourly']
$remove = ['/etc/cron.deny']
file { $cronfiles:
ensure => file,
owner => 'root',
group => 'root',
mode => 'og-rwx',
}
file { $crondirs:
ensure => directory,
owner => 'root',
group => 'root',
mode => 'og-rwx',
}
file { $remove:
ensure => absent,
}
}
class profile::sshserver {
class { 'ssh':
storeconfigs_enabled => false,
server_options => {
'PasswordAuthentication' => 'yes',
'X11Forwarding' => 'no',
'MaxAuthTries' => '4',
'ClientAliveInterval' => '300',
'Port' => [22,],
'ClientAliveCountMax' => '0',
'PermitRootLogin' => 'no',
'Protocol' => '2',
'IgnoreRhosts' => 'yes',
'Banner' => '/etc/issue.net',
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment