使用Puppetfile在master上安装puppet模块

时间:2017-07-04 15:34:23

标签: puppet

我正在使用R10K来管理我的配置文件。

我想使用Puppet文件在我的主服务器上安装puppet模块。

我转到分支并将以下内容添加到Puppetfile

mod 'puppetlabs-certregen', '0.2.0'

然后我在服务器上运行puppet agent -t。看来命令是成功的,因为我的清单中的命令是运行的,但是当我运行puppet certregen healthcheck时,似乎没有安装模块。

使用Puppetfile安装模块的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

Puppetfile类似于Ruby Gemfile,Python requirements.txt:它列出了依赖项,然后由一个单独的工具安装。

对于Puppetfiles,这是r10k

这里记录了https://puppet.com/docs/pe/2018.1/puppetfile.html

您也可以使用命令行直接下载模块:

puppet module install puppetlabs-certregen
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/Users/petersouter/.puppetlabs/etc/code/modules
└─┬ puppetlabs-certregen (v0.2.0)
  └── puppetlabs-stdlib (v4.17.1)