Skip to content

Instantly share code, notes, and snippets.

<key>Input</key>
<dict>
<key>NAME</key>
<string>Adium</string>
<key>MUNKI_REPO_SUBDIR</key>
<string>apps</string>
<key>pkginfo</key>
<dict>
<key>catalogs</key>
<array>
% autopkg info Firefox_RC.munki
Description: Downloads Firefox disk image and imports into Munki.
Values for FIREFOX_BUILD correspond to directories here: http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/
Some useful values are: 'latest', 'latest-10.0esr', 'latest-esr', 'latest-3.6', 'latest-beta'
LOCALE corresponds to directories at http://download-origin.cdn.mozilla.net/pub/mozilla.org/firefox/releases/$FIREFOX_BUILD/mac/
Examples include 'en-US', 'de', 'ja-JP-mac', 'sv-SE', and 'zh-TW'
No idea if all Firefox builds are available in all the same localizations, so you may need to verify that any particular
combination is offered.
Identifier: com.disneyanimation.firefox-RC
Munki import recipe: True
<key>_autopromotion_data<key>
<dict>
<key>2014-05-30</key>
<array>
<string>testing</string>
</array>
<key>2014-06-07<key>
<array>
<string>production</string>
</array>
<key>_autopromotion_data<key>
<dict>
<key>4</key>
<array>
<string>testing</string>
</array>
<key>11<key>
<array>
<string>production</string>
</array>
@gregneagle
gregneagle / Firefox-29.0.plist
Last active August 29, 2015 14:01
P-O-C makecatalogs with support for autopromotion
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>_autopromotion_catalogs</key>
<dict>
<key>7</key>
<array>
<string>production</string>
<string>firefox-testing</string>
import subprocess
output = subprocess.check_output(['/usr/bin/profiles', '-C'])
for line in output.splitlines():
(stuff, label, profile_identifier) = line.partition(' profileIdentifier: ')
if label and profile_identifer.startswith('com.apple.mdm.mdm.educ.psu.edu'):
print profile_identifier
import urllib2
url = 'http://www.macbartender.com/updates/Appcast.xml'
request = urllib2.Request(url=url)
request.add_header('user-agent', 'Mozilla/5.0')
url_handle = urllib2.urlopen(request)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>CalDAVAccountDescription</key>
<string>My Organization</string>
<key>CalDAVHostName</key>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Description</key>
<string>Downloads and imports Munki 2 tools. Gets the latest build from https://munkibuilds.org/munkitools2-latest.pkg</string>
<key>Identifier</key>
<string>com.foo.autopkg.munki.munkitools2</string>
<key>Input</key>
<dict>
#!/usr/bin/python
"""
Programmatically altering plists with Python, shooting to add support to ansible
"""
import optparse
import FoundationPlist
# from munkilib import FoundationPlist