in class ssh::server, there is a subscribe from service {'sshd_service': } resource declaration to File['sshd_config'] resource, which causes the sshd service to be restarted after changes in sshd_config file.
Instead of defining our sshd settings within sshd_config file, we use the Include mechanism in combination with defining our custom sshd settings via ssh::server::config_files hash. This results in the configuration parameters get written into /etc/ssh/sshd_config.d/somefile. So far so good.
Unfortunately, there is no notify in the file resource within ssh::config_file_server class, which is declared in ssh::server class for each $config_files hash key. So, if configuration parameters change in /etc/ssh/sshd_config.d/somefile, the sshd service is not refreshed or restarted
Hi,
in class
ssh::server
, there is a subscribe fromservice {'sshd_service': }
resource declaration toFile['sshd_config']
resource, which causes thesshd
service to be restarted after changes insshd_config
file.Instead of defining our
sshd
settings withinsshd_config
file, we use theInclude
mechanism in combination with defining our customsshd
settings viassh::server::config_files
hash. This results in the configuration parameters get written into/etc/ssh/sshd_config.d/somefile
. So far so good.Unfortunately, there is no notify in the
file
resource withinssh::config_file_server
class, which is declared inssh::server
class for each$config_files
hash key. So, if configuration parameters change in/etc/ssh/sshd_config.d/somefile
, thesshd
service is not refreshed or restarted