Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to separate 3rd party modules from own modules

There's many modules on forge.puppetlabs.com, which can be used easily right away, but when I decided to write my own modules, couple questions came up on my mind.

I will most probably want to keep my custom modules completely separated from existing downloaded/installed modules from forge (I still want to be able to smoothly upgrade all 3rd party modules), therefore I'll have two module paths.

As I want to use Puppet in dev environment (with Vagrant), I need to use it with puppet apply and the basic option --modulepath doesn't accept more than one directory.

In other words, I always end up with this error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

puppet provisioner:
* The configured module path doesn't exist: /private/var/workspace/vagrant/puppet/modules/forge:../puppet/modules/custom

Although the official variable seems to support list of directories, puppet apply doesn't seem to.

How to achieve the separation when using Puppet with Vagrant as a provisioner?

How to separate 3rd party modules from own modules

There's many modules on forge.puppetlabs.com, which can be used easily right away, but when I decided to write my own modules, couple questions came up on my mind.

I will most probably want to keep my custom modules completely separated from existing downloaded/installed modules from forge (I still want to be able to smoothly upgrade all 3rd party modules), therefore I'll have two module paths.

As I want to use Puppet in dev environment (with Vagrant), I need to use it with puppet apply and the basic option --modulepath doesn't accept more than one directory.

In other words, I always end up with this error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

puppet provisioner:
* The configured module path doesn't exist: /private/var/workspace/vagrant/puppet/modules/forge:../puppet/modules/custom

Both directories exists (separately), but the puppet apply seems to parse it as one path with colon.

Although the official variable seems to support list of directories, puppet apply doesn't seem to.

How to achieve the separation when using Puppet with Vagrant as a provisioner?

How to separate 3rd party modules from own modules

There's many modules on forge.puppetlabs.com, which can be used easily right away, but when I decided to write my own modules, couple questions came up on my mind.

I will most probably want to keep my custom modules completely separated from existing downloaded/installed modules from forge (I still want to be able to smoothly upgrade all 3rd party modules), therefore I'll have two module paths.

As I want to use Puppet in dev environment (with Vagrant), I need to use it with puppet apply and the basic option --modulepath doesn't accept more than one directory.directory

Update: it is supported, the issue is more about how Vagrant interprets modulepath as a config option:

config.vm.provision :puppet do |puppet| puppet.module_path = '../puppet/modules/forge'

In other words, I always end up with this error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

puppet provisioner:
* The configured module path doesn't exist: /private/var/workspace/vagrant/puppet/modules/forge:../puppet/modules/custom

Both directories exists (separately), but the puppet apply seems to parse it as one path with colon.

Although the The official variable seems to support list of directories, directories., puppet apply doesn't seem to.to

How to achieve the separation when using Puppet with Vagrant as a provisioner?

How to separate 3rd party modules from own modules

There's many modules on forge.puppetlabs.com, which can be used easily right away, but when I decided to write my own modules, couple questions came up on my mind.

I will most probably want to keep my custom modules completely separated from existing downloaded/installed modules from forge (I still want to be able to smoothly upgrade all 3rd party modules), therefore I'll have two module paths.

As I want to use Puppet in dev environment (with Vagrant), I need to use it with puppet apply and the basic option --modulepath doesn't accept more than one directory

Update: it is supported, the issue is more about how Vagrant interprets modulepath as a config option:

config.vm.provision :puppet do |puppet|
   puppet.module_path = '../puppet/modules/forge'

'../puppet/modules/forge'

In other words, I always end up with this error:

There are errors in the configuration of this machine. Please fix
the following errors and try again:

puppet provisioner:
* The configured module path doesn't exist: /private/var/workspace/vagrant/puppet/modules/forge:../puppet/modules/custom

Both directories exists (separately), but the puppet apply seems to parse it as one path with colon.

The official variable seems to support list of directories., puppet apply doesn't seem to

How to achieve the separation when using Puppet with Vagrant as a provisioner?