O problema é causado porque /etc/puppet/environments/production/modules/ssh/files/config/sshd_config
ou /etc/puppet/modules/ssh/files/config/sshd_config
não existe
o fantoche pode executar exec no nó, mas não pode transferir o arquivo do módulo.
servidor Ubuntu 14.04 Fantoche 3.8.4
Já tentei:
No mestre:
/etc/puppet/puppet.conf
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
modulepath = /etc/puppet/modules
factpath=$vardir/lib/facter
/etc/puppet/manifests/site.pp
node 'gitlab.domain' {
include ssh
}
/etc/puppet/modules/ssh/manifests/init.pp
class ssh {
exec { 'apt-update':
command => 'apt-get update',
path => ['/usr/bin', '/bin', '/sbin'],
logoutput => on_failure,
}
# ensure openssh installed
package { 'openssh-server':
ensure => installed,
require => Exec['apt-update'],
}
# make sure ssh keeps running
service { 'ssh':
ensure => 'running',
enable => true,
require => Package['openssh-server'],
}
# copy sshd_config
file { '/etc/ssh/sshd_config':
ensure => 'present',
notify => Service['ssh'],
source => 'puppet:///modules/ssh/config/sshd_config',
owner => 'root',
group => 'root',
mode => '0600',
require => Package['openssh-server'],
}
}
No mestre:
ls -la /etc/puppet/modules/ssh/config
-rw-r--r-- 1 puppet root 356 Nov 27 11:43 sshd_config
No nó:
sudo puppet agent -t -v
[....]
Info: Applying configuration version ...
Notice: /Stage[main]/Ssh/Exec[apt-update]/returns: executed successfully
Error: /Stage[main]/Ssh/File[/etc/ssh/sshd_config]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/ssh/config/sshd_config
Tags puppet