1

I'm using puppet 2.6.8. I've got pluginsync=true on both master and client. I've created a module and a type which lives on the puppetmaster at:

 /etc/puppet/modules/mymodule/lib/puppet/type/mytype.rb

The sync works on the client, but the type ends up here on the client:

 /var/lib/puppet/lib/puppet/type/mytype.rb

but I expected it to live here:

 /var/lib/puppet/mymodule/lib/puppet/type/mytype.rb

so that it doesn't collide with types from other modules.

I must have misconfigured something, but I don't know what.

3 Answers 3

3

Nope, that's how Puppet does pluginsync. That generalised philosophy (of "we don't care that it came from a module") was already in place when I wrote the pluginsync code, so I just ran with it. Even if you namespace the files, you can't namespace native types, so it wouldn't do you any good to have them in separate directories. Keep your type names unique (prefix them with the module name, perhaps, like most existing plugins I've seen do) and you won't have a problem.

1

No, that's how it works. Stuff in different modules are not supposed to conflict -- the separation exists more for organization than for insulation.

1

Also beware the fact that the puppet master apparently does NOT reload your custom type on every agent run; rather it syncs it the first time only.

I have opened a bug at puppetlabs, https://projects.puppetlabs.com/issues/8750 to check whether this is a fault in my assumptions etc.

[and yes I'd rather post this as a comment but that requires reputation that I don't have -- I figured I would save people the trouble that I had researching this as it's not mentioned in the docs]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .