plugin sync and different platforms

36 views
Skip to first unread message

James A. Peltier

unread,
Aug 20, 2012, 8:32:25 PM8/20/12
to puppet...@googlegroups.com
Hi All,

I'm trying to write some plugins that should only be sync'd if they're for a specific platform. For example, in our environment we're supporting Solaris, Ubuntu, Fedora, CentOS and Mac OS X. We've developed some OS X plugins and some Solaris plugins but we've noticed that our Linux hosts have imported our OS X plugins and now throw errors each time the agent is started

Aug 20 17:30:53 hostname puppet-agent[29934]: (/File[/var/lib/puppet/lib/puppet/type/sysctl.rb]/ensure) defined content as '{md5}0ba25754548630344738a7959fea2bb8'
Aug 20 17:30:53 hostname puppet-agent[29934]: (/File[/var/lib/puppet/lib/puppet/provider/x_policy]/ensure) created
Aug 20 17:30:53 hostname puppet-agent[29934]: (/File[/var/lib/puppet/lib/puppet/provider/x_policy/x_mcx.rb]/ensure) defined content as '{md5}5ea505d684d7c4b401950927e1680d04'
Aug 20 17:30:53 hostname puppet-agent[29934]: Could not load downloaded file /var/lib/puppet/lib/facter/mac_console_users.rb: no such file to load -- osx/cocoa
Aug 20 17:30:53 hostname puppet-agent[29934]: Could not load fact file /var/lib/puppet/lib/facter/mac_console_users.rb: no such file to load -- osx/cocoa

Am I missing something? Is there a way to stop this from happening?

--
James A. Peltier
Manager, IT Services - Research Computing Group
Simon Fraser University - Burnaby Campus
Phone : 778-782-6573
Fax : 778-782-3045
E-Mail : jpel...@sfu.ca
Website : http://www.sfu.ca/itservices
http://blogs.sfu.ca/people/jpeltier

Success is to be measured not so much by the position that one has reached
in life but as by the obstacles they have overcome. - Booker T. Washington

Jeff McCune

unread,
Aug 20, 2012, 9:06:39 PM8/20/12
to puppet...@googlegroups.com
On Monday, August 20, 2012, James A. Peltier wrote:
Hi All,

I'm trying to write some plugins that should only be sync'd if they're for a specific platform.  For example, in our environment we're supporting Solaris, Ubuntu, Fedora, CentOS and Mac OS X.  We've developed some OS X plugins and some Solaris plugins but we've noticed that our Linux hosts have imported our OS X plugins and now throw errors each time the agent is started

Plugins are always synced, regardless of platform.  What types of plugins are you developing?

The best way to deal with this is to deactivate the provider or fact on systems that don't support the behavior.

-Jeff

James A. Peltier

unread,
Aug 20, 2012, 9:36:58 PM8/20/12
to puppet...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

We've developed a set of plugins for managing Macs entirely via puppet.  The providers are available here https://github.com/dayglojesus/x_types  We're also making extensive use of already available modules.

How do I go about deactivating providers and facts specific to platforms?

James A. Peltier

unread,
Aug 20, 2012, 9:54:23 PM8/20/12
to puppet...@googlegroups.com
Never mind.  I suspect that you're referring to the confine :operatingsystem => :darwin or the likes

Jeff McCune

unread,
Aug 21, 2012, 11:50:18 AM8/21/12
to puppet...@googlegroups.com
Yes, the confine system should work well for this situation.

-Jeff
Reply all
Reply to author
Forward
0 new messages