大网数据广告活动
服务器运维问答

Puppet can't find file of module

· 52CE 我爱测

I have spun up a puppet server (5.0.0) using the docker-compose example and successfully brought up six clients (using the debian-provided puppet agent). While I can provide files with raw content, e.g. file { '/etc/systemd/times…

问题原文

原帖链接 · Marco Schuster · CC BY-SA 3.0

I have spun up a puppet server (5.0.0) using the docker-compose example and successfully brought up six clients (using the debian-provided puppet agent).

While I can provide files with raw content, e.g.

file { '/etc/systemd/timesyncd.conf':
  ensure => present,
  content => "[Time]\nNTP=time.xxx.net\n",
  notify => Service["systemd-timesyncd.service"]
}

supplying the files via source does not work:

file { "/etc/default/grub":
  ensure => present,
  source => "puppet:///modules/debian-noquiet-grub/etc-default-grub",
}

The clients error out with

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

and the server with

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

The file locations are (inside the Docker container):

/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)

What causes this error and how do I fix it?

已采纳解答

原帖链接 · gxx · CC BY-SA 3.0

As per the docs (and the comments):

Module names should only contain lowercase letters, numbers, and underscores, and should begin with a lowercase letter. [...]

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-08-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。