pebbleit / puppet-macdefaults Goto Github PK
View Code? Open in Web Editor NEWA Puppet module to manage defaults on an OS X system
A Puppet module to manage defaults on an OS X system
The following manifest:
class bootstrap::munki($domain = '/Library/Preferences/ManagedInstalls.plist') {
include macdefaults
mac-defaults {'InstallAppleSoftwareUpdates':
domain => $domain,
key => 'InstallAppleSoftwareUpdates',
value => 'true',
type => 'bool',
}
mac-defaults {'SoftwareUpdateServerURL':
action => 'delete',
domain => $domain,
key => 'SoftwareUpdateServerURL',
value => 'http://fs2.whitbyschool.net:8088/index.sucatalog',
type => 'string',
}
}
when I run, I get "Error: Invalid parameter action"
Hello. I use mac-defaults to manage several values. I have an entry that tries to reapply that manifest on each puppet run. All the rest of my entries only apply once unless changed. This is the first time I've tried an array.
Non-working example (This will apply on every puppet run)
mac-defaults { "additionalhttpheaders":
domain => '/Library/Preferences/ManagedInstalls',
key => 'AdditionalHttpHeaders',
type => 'array',
value => "Authorization: Basic XXXXXXXXXXXXXXXX",
Working examples (These will only apply once unless changed).
mac-defaults { "softwarerepourl":
domain => '/Library/Preferences/ManagedInstalls',
key => 'SoftwareRepoURL',
type => 'string',
value => "http://munkiserver1.orchard.fruit.com/munki_repo",
mac-defaults { "installapplesoftwareupdates":
domain => '/Library/Preferences/ManagedInstalls',
key => 'InstallAppleSoftwareUpdates',
type => 'bool',
value => "true",
I would like to set Munki SoftwareUpdateServerURL to an empty string instead of deleting it completely. I looked at the init.pp briefly and it seems that an empty string is correctly written but incorrectly identified as a value that needs to be changed. Perhaps checking if the value is empty and only check the defaults command exit code instead of trying to grep the output would help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.