2
votes

I'm using R10K to manage my configuration files.

I want to install a puppet module on my master server using a Puppet file.

I go to the branch and add the following to Puppetfile:

mod 'puppetlabs-certregen', '0.2.0'

I then run puppet agent -t on the server. It seems the command is successful, in that the commands in my manifest are run, but when I run puppet certregen healthcheck the module doesn't seem to be installed.

What's the correct way to use the Puppetfile to install a module?

1

1 Answers

1
votes

The Puppetfile is similar to a Ruby Gemfile, Python requirements.txt: it lists dependancies which are then installed by a separate tool.

For Puppetfiles, this is r10k.

It's documented here https://puppet.com/docs/pe/2018.1/puppetfile.html

You can also directly download the module with the command line:

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)