What determines Puppet pluginsync directory structure on clients

puppet

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.

Best Answer

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.