https://github.com/airbnb/puppet-munki
https://github.com/airbnb/puppet-munki
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/airbnb/puppet-munki
- Owner: airbnb
- License: other
- Created: 2017-09-07T00:25:30.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-29T16:28:02.000Z (about 1 year ago)
- Last Synced: 2025-08-29T06:33:21.470Z (about 1 month ago)
- Language: Puppet
- Size: 104 KB
- Stars: 29
- Watchers: 18
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# puppet-munki
This module installs and configures a [Munki client](https://github.com/munki/munki).
## Changes in version 2 of this module
### Support for remote files
If you use Autopkg to download Munki, it may be more convenient to host the files on your Munki repo. This module now can make use of [remote_file](https://forge.puppet.com/lwf/remote_file) so you do not need to host your packages on your Puppet server. The module will determine whether to use the Puppet fileserver or remote_package depending on whether `puppet:///` is in your source or not.
### Use of component packages
The module can use the individual packages that autopkg generates. If you wish to continue using the all in one package, you should set `munki::use_aio` to `true`.
## Configuring with Hiera
```yaml
---
classes:
- munkimunki::use_client_cert: false
munki::software_repo_url: "https://munki.example.com"
munki::additional_http_headers: ["Authorization: Basic abc12345=="]
munki::package_source: "puppet:///modules/a_module_with_munkis_pkg/munkitools.pkg"
munki::days_before_broken: 14
```## Configuring directly in Puppet
```puppet
class {'munki':
use_client_cert => false,
software_repo_url => "https://munki.example.com",
additional_http_headers => ['Authorization: Basic abc12345=='],
package_source => "puppet:///modules/a_module_with_munkis_pkg/munkitools.pkg",
days_before_broken => 14,
}
```For all of the configuration options, see `data/common.yaml`. Most options correlate directly with their equivalent Munki preference.
## Options that aren't Munki options
### auto_run_after_install
This will deploy a LaunchDaemon that will run `managedsoftwareupdate --auto` once before cleaning up after itself. This will allow Munki to begin it's run during your Puppet run without blocking the rest of your Puppet config.
### payload_organization
The organization that is displayed in the configuration profile.
### days_before_broken
The number of days since the last successful run after which Munki is considered 'broken' and will be reinstalled.
### munkitools_version
The version of Munki you wish to install. This is the output of `managedsoftwareupdate --version`.
### package_source
The path to the install package on your Puppet server. Defaults to `puppet:///modules/bigfiles/munki/munkitools-${munkitools_version}.pkg`, which means that the install package should be in the `bigfiles` module, in `files/munki`, named to match the version.
### local_only_manifest_name
This is the file name of the local manifest. This defaults to `extra_packages`, so if you have a manifest called this on your server, you should change it to something unique.
## Local managed_installs and managed_uninstalls
This module is able to make use of local only manifests, which allows you to use Hiera to assign software to your nodes. As this composites the configuration from all levels of your hierarchy via the `lookup` function, you _must_ use Hiera (rather than Puppet code directly) to configure this.
## munki_python
Set this to false if you do not wish Munki to install it's own Python.
```yaml
# data/serial_number/YOURSERIALNUMBER.yaml
munki::managed_installs:
- 'windows10_vm'munki::managed_uninstalls:
- 'AdobeFlashPlayer'
```Using the `lookup` function allows you to specify managed installs and uninstalls at different places in your hierarchy, so for example, you can specify installs for all of your machines using something like the below:
```yaml
# data/osfamily/Darwin.yaml
munki::managed_installs:
- "GoogleChrome"
```And then configuring a one off install for a particular machine:
```yaml
# data/serial_number/ABC123.yaml
munki::managed_installs:
- "Firefox"
```Which would produce a local client manifest (at `/Library/Managed Installs/manifests/extra_packages`) for the machine with the serial number ABC123 of:
```xml
managed_installs
windows10_vm
managed_uninstalls
```
## Requirements
- [apple_package](https://github.com/macadmins/puppet-apple_package)
- [client_stdlib](https://github.com/macadmins/puppet-client_stdlib)
- [stdlib](https://forge.puppetlabs.com/puppetlabs/stdlib)
- [mac_profiles_handler](https://github.com/macadmins/puppet-mac_profiles_handler)