Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

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.

share|improve this answer

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

share|improve this answer

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]

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.