Closed abuzze closed 9 years ago
I believe the issue you are seeing is caused by you moving the module into an environment.
Puppet environments are funky -- they do not provide real isolation -- and I believe the issue you are seeing is likely related to the fact that the module no longer resides in /etc/puppet/modules
.
Our setup is very similar. To fix this, we are required to either:
a) keep a copy of the managedmac
module in /etc/puppet/modules
OR
b) symlink the module out of the environment back into /etc/puppet/modules
Neither of these solutions is great, but if you are using a module that contains plugins AND environments, your efforts to fully isolate the environment that requires such a module will be futile.
Try symlinking the module back into /etc/puppet/modules
, running puppet agent -t
on the master and then syncing the puppet client again.
HTH
B.
For what it's worth, I'm keeping managedmac in /etc/puppet/environments/production/managedmac, but I have pluginsync enabled, and managedmac is magically added to /etc/pupppet/environments
Do you have pluginsync enabled?
@groob Are you saying you are NOT placing the module in /etc/puppet/modules
or an environmental equivalent? Or maybe you got the path incorrect?
Sorry, I fumbled that above comment. I don't use a puppet master so I might not experience this behavior.
My managedmac module is under /etc/puppet/environments/production/modules
However, I had to write the class below to even get plugins to work with puppet apply
# A hack to get around the fact that pluginsync doesn't work properly
# when using 'puppet apply'
# Will recursively sync the plugins folder to the right directory.
class profile::puppet::pluginsync (
$libdir = "/var/lib/puppet/lib",
) {
file {"$libdir":
source => "puppet:///plugins",
recurse => true,
purge => true,
force => true,
}
}
I'm suggesting that if @abuzze has not done it yet, he should try enabling pluginsync=true
in his puppet config.
https://docs.puppetlabs.com/guides/plugins_in_modules.html
@groob couple things:
/etc/puppet/modules
and saved yourself a heap of troubleI am not quite sure what happened, but i continued working on this problem this morning and it worked without any changes. Also i cannot reproduce the error any more. Maybe it's some strange caching problem with the puppet master. Thank you very much for the quick replies and keep up the work on this great module.
I am rather new to puppet and my goal is to manage some macs with managedmac 0.7.2 on a puppetmaster 3.8. It's running on Ubuntu 14.04.
After moving the module to /etc/puppet/environments/production/modules, i already figured out how to join a client to the active directory and enabling the remote management. The next step should be managing some plist files. But running sudo puppet agent -tv results in this error:
I verified that pluginsync is true in [main] on the server and the client in the puppet.conf. Changing the module files, results in a download to the client, so it should be working. I can also see all files in /lib/puppet/ on the client.
I installed CFPropertyList (2.3.1, 2.2.8) and sqlite3 (1.3.7) on the client and the server via gem install ... To test if my Hashes contain an error i used the example and added this to the site.pp. It resulted in the same error.
I also run puppet agent -t on the server, as mentioned in other similar issues. It tried 3 different clients. All OS X 10.10.4.
Any hints on how to debug this problem would be highly appreciated.