我使用docker-compose示例创build了一个puppet服务器(5.0.0),并成功地启动了六个客户端(使用debian提供的puppet代理)。
虽然我可以提供原始内容的文件,例如
file { '/etc/systemd/timesyncd.conf': ensure => present, content => "[Time]\nNTP=time.xxx.net\n", notify => Service["systemd-timesyncd.service"] }
通过源提供文件不起作用:
file { "/etc/default/grub": ensure => present, source => "puppet:///modules/debian-noquiet-grub/etc-default-grub", }
客户错误了
Error: /Stage[main]/Loudgrub/File[/etc/default/grub]: Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/debian-noquiet-grub/etc-default-grub
和服务器
2017-08-24 13:40:21,582 INFO [puppetserver] Puppet Not Found: Could not find file_metadata modules/debian-noquiet-grub/etc-default-grub 10.161.xxx.zzz - - - 24/Aug/2017:13:40:21 +0000 "GET /puppet/v3/file_metadata/modules/debian-noquiet-grub/etc-default-grub?environment=production&links=manage&checksum_type=md5&source_permissions=ignore HTTP/1.1" 404 132 10.161.xxx.zzz 10.161.xxx.zzz 8140 6
文件位置(在Docker容器内):
/etc/puppetlabs/code/environments/production/manifests/site.pp (site.pp) /etc/puppetlabs/code/environments/production/modules/debian-noquiet-grub/files/etc-default-grub (the text file) /etc/puppetlabs/code/environments/production/modules (first element of puppet config print modulepath --section master --environment production)
什么原因导致这个错误,我该如何解决?
根据文档 (和评论):
模块名称只能包含小写字母,数字和下划线,并且应该以小写字母开头。 […]