CFPropertyList usage

63 views
Skip to first unread message

Jason Hatman

unread,
Feb 28, 2014, 10:33:41 AM2/28/14
to puppet...@googlegroups.com
I've been looking all over for usage examples for CFPropertyList.  I'm trying to make a test manifest to create a simple plist and it keeps saying that it can't find class CFPropertyList. I downloaded the zip from https://github.com/ckruse/CFPropertyList/ and unzipped it into /etc/puppet/modules/CFPropertyList.  What am I doing wrong?

Here's my example:

class osx_management::testplist {

require 'CFPropertyList' 

cfpropertylist { 'clientidentifier': 
ensure => present, 
path => '/Library/Preferences/ManagedInstallsTest.plist', 
key => 'ClientIdentifier', 
value => '$::sp_serial_number', 


cfpropertylist { 'installapplesoftwareupdates': 
ensure => present, 
path => '/Library/Preferences/ManagedInstallsTest.plist', 
key => 'InstallAppleSoftwareUpdates', 
value => true, 


cfpropertylist { 'softwarerepourl':
ensure => present, 
path => '/Library/Preferences/ManagedInstallsTest.plist', 
key => 'SoftwareRepoURL', 
value => 'http://munkiserver1.orchard.fruit.com/munki_repo', 

}


José Luis Ledesma

unread,
Feb 28, 2014, 1:06:43 PM2/28/14
to puppet...@googlegroups.com

My experience is puppet doesnt like upper case  in classes, autoloader hates them, so rename the module directory to lowercase.

Regards,

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/02e54492-61eb-4b3d-9f08-d33b48601fb0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Jason Hatman

unread,
Feb 28, 2014, 1:58:42 PM2/28/14
to puppet...@googlegroups.com
Thanks for the suggestion.  I tried making it all lowercase, but I'm getting the same results.


jcbollinger

unread,
Mar 3, 2014, 11:59:09 AM3/3/14
to puppet...@googlegroups.com


On Friday, February 28, 2014 9:33:41 AM UTC-6, Jason Hatman wrote:
I've been looking all over for usage examples for CFPropertyList.  I'm trying to make a test manifest to create a simple plist and it keeps saying that it can't find class CFPropertyList. I downloaded the zip from https://github.com/ckruse/CFPropertyList/ and unzipped it into /etc/puppet/modules/CFPropertyList.  What am I doing wrong?



Is that the URL you intended to post?  The project hosted there does not appear to be a Puppet module, but rather a small Ruby library for working with plists.  Putting it into a Puppet module directory does not automagically cause it to provide a custom Puppet type.  At minimum, you have left out some important information.

Perhaps you were looking for this: https://github.com/glarizza/puppet-cfpropertylist ?


John

Jason Hatman

unread,
Mar 3, 2014, 12:03:00 PM3/3/14
to puppet...@googlegroups.com
Well, that was just ignorance on my part.  I have followed instructions at https://github.com/mosen/puppet-plist and now I'm up and running.  This provider has the ability to use either CFPropertyList or PlistBuddy for plist modification.
Reply all
Reply to author
Forward
0 new messages