Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automate Puppet's modules install

I am working on one-click deployment of a system onto Ubuntu machine. Just started using Puppet for this. It appears, in order for me to use external modules, I must pre-install them using something like

puppet module install foo

Questions:

  1. Do I always have to pre-install modules in order for me to use them?
  2. How do I automate Puppet modules installation?

It's a standalone puppet set up (so not a master-slave one). I will have to repeat this many times for different customers. Hence will be nice to have a single button doing all the work for me. In later stage, there is a place for master-slave setup. But it must be independent for each customer though.

like image 354
oleksii Avatar asked Dec 20 '22 19:12

oleksii


1 Answers

I'm working in a master less setup.

You should probably look at librarian-puppet You write Puppetfile describe all your modules :

  • local directory,
  • remote git,
  • puppet forge

and librarian-puppet will compute a modules directory for you.

librarian-puppet install

You can then upload it to the target machine and launch the puppet apply. It works well with vagrant also.

config.vm.provision :puppet, :module_path => "modules"
like image 195
mestachs Avatar answered Dec 22 '22 10:12

mestachs