Derek Higgins 5d55606789 Make sshd PermitRootLogin configurable
Make this configurable so that it can be enabled for images used
by nodepool.

Change-Id: I704453c6d3091a24e68509650c61efb638aea601
2016-07-08 23:46:57 +01:00

31 lines
748 B
Puppet

# == Class: ssh
#
class ssh (
$trusted_ssh_source = 'puppetmaster.openstack.org',
$permit_root_login = 'no',
) {
include ::ssh::params
package { $::ssh::params::package_name:
ensure => present,
}
if ($::in_chroot) {
notify { 'sshd in chroot':
message => 'sshd not refreshed, running in chroot',
}
} else {
service { $::ssh::params::service_name:
ensure => running,
hasrestart => true,
subscribe => File['/etc/ssh/sshd_config'],
}
}
file { '/etc/ssh/sshd_config':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
content => template('ssh/sshd_config.erb'),
replace => true,
}
}