You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-8Lines changed: 35 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,7 @@
2
2
3
3
## Requirements
4
4
5
-
If you plan on using [AutoPkg](https://github.com/autopkg/autopkg), a release greater than 2.1 is required as earlier versions do not have Munki repo plugin support. Currently (8/10/20) the latest build does not include support, so the following files need to be pulled from the AutoPkg repo and replaced on your local installation:
6
-
7
-
*`autopkglib/MunkiImporter.py`
8
-
*`autopkglib/munkirepolibs/AutoPkgLib.py`
9
-
*`autopkglib/munkirepolibs/MunkiLibAdapter.py`
5
+
If you plan on using [AutoPkg](https://github.com/autopkg/autopkg), release 2.2 or greater is required as earlier versions do not have Munki repo plugin support.
10
6
11
7
## Installation
12
8
@@ -22,25 +18,56 @@ API keys may be generated within the API section of the SimpleMDM administrator
22
18
23
19
#### Setting the Key
24
20
25
-
The plugin will usually prompt for an API key interactively. To avoid this, you may set the key once per terminal session like so:
21
+
The plugin attempts to fetch the API key three ways, in order:
22
+
23
+
1. environment variable
24
+
1. configuration file
25
+
1. interactively
26
+
27
+
##### Environment Variable
28
+
29
+
You may set the key once per terminal session like so:
You can also set the key for a single command by prepending it like so:
36
+
37
+
```
38
+
SIMPLEMDM_API_KEY="Whvop7kWXxsva326ABDF8VDCSGFyEkuEx2xGgj4jab8AE90cn70QdBTq0fplli0a" autopkg run ...
39
+
```
40
+
41
+
##### Configuration File
42
+
43
+
You may store the key in a configuration file at `/usr/local/simplemdm/munki-plugin/config.plist`. Please scope the permissions on this file so that it is restricted, however still allowing utilities using the repo plugin to access it.
44
+
45
+
The file should be formatted as below. Be sure to provide your own API key:
46
+
47
+
```
48
+
<?xml version="1.0" encoding="UTF-8"?>
49
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Any `.munki` recipe is supported. In this case, we are importing `GoogleChrome.munki`. Be sure to include `extract_icon` if you'd like the icon uploaded to SimpleMDM, if available.
34
61
35
-
**Please Note:** Running MakeCatalogs.munki is not necessary. See "Do not use makecatalogs" below for more information.
62
+
**Please Note:** Running MakeCatalogs.munki is not necessary. See "Using Makecatalogs" below for more information.
36
63
37
64
```
38
65
autopkg run -v GoogleChrome.munki -k MUNKI_REPO_PLUGIN="SimpleMDMRepo" -k extract_icon=True
39
66
```
40
67
41
68
### Using munkiimport and manifestutil
42
69
43
-
**Please Note:** Running makecatalogs is not necessary. See "Do not use makecatalogs" below for more information.
70
+
**Please Note:** Running makecatalogs is not necessary. See "Using Makecatalogs" below for more information.
44
71
45
72
Before using either of these tools, they must be configured by running `munkiimport --configure` or `manifestutil --configure`. Keep all settings default, except:
46
73
- Set repo url to `BLANK` or some other dummy value, as it is unused.
0 commit comments