Is there a way to install multiple puppet modules from a directory in one command?
I have a directory containing multiple puppet modules in tar.gz form downloaded from the forge, and I need to install all the modules. However puppet module install
only takes an argument for one module. I initially used a bash loop to call puppet module install
once for each module in the directory. However, I quickly discovered that it takes 1.6 to 2 seconds on my system to install each module due to the slow puppet start time (it appears to be due to ruby being slow to load all the gems). As I have added more modules to install, the time to install them all has become a problem.
Running puppet with no arguments or just puppet help
takes 1.6 to 2 seconds; it also takes that long to run puppet module install
when the module is already installed. This shows that the majority of the time to install the module is just start up time of puppet and not the time it takes to install the module. When I strace the puppet call there are thousands of stat and lstat calls resulting in ENOENT no such file or directory that I believe, based on my research, is ruby loading the gems some of which use shared libraries.
The hosts on which I am installing the modules are on an isolated network and do not have access to the forge, so installing directly from the forge is not an option.
I briefly looked into using bolt, but I could not find in the documentation a way to install modules from a local directory.