Don't reload ssh service in a chroot

When we're building vms in chroots, attempting to reload the ssh service
will fail. Don't do it.

Change-Id: I346bdeaa73a9f8a8a7afd3f4866c18c2ed640dbc
This commit is contained in:
Monty Taylor
2015-05-10 14:16:17 -04:00
committed by Spencer Krum
parent 993d9df29d
commit 8dcdef8e1e

View File

@@ -5,10 +5,16 @@ class ssh ($trusted_ssh_source = 'puppetmaster.openstack.org') {
package { $::ssh::params::package_name:
ensure => present,
}
service { $::ssh::params::service_name:
ensure => running,
hasrestart => true,
subscribe => File['/etc/ssh/sshd_config'],
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,