Giter Site home page Giter Site logo

puppet-macdefaults's People

Contributors

grahamgilbert avatar ih84ds avatar jdhatman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

puppet-macdefaults's Issues

How do I delete a key

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"

Repeat runs

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",

Support for setting empty string value

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.