我已经使用docker-compose 示例并成功启动了六个客户端(使用 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)
什么原因导致了此错误?我该如何修复它?
答案1
根据文档(以及评论):
模块名称只能包含小写字母、数字和下划线,并且以小写字母开头。[...]