Conditions are a set of attributes provided by the integrated open source Munki library for determining install applicability. Conditions are defined at a per-application level and are evaluated before download and install of the software. There are some built-in conditions supported by Munki.

Conditions Format

Conditions are written in the format:

                  
                  

machine_type == "laptop" AND os_vers BEGINSWITH "10.7"

Conditional Comparison Attributes

Attribute Type Description Example Comparison
hostname String Hostname hostname=="Lobby imac"
arch String Processor architecture. For example: 'powerpc', 'i386', 'x86_64' arch=="x86_64"
os_vers String Full OS Version. For example: "10.7.2" os_vers BEGINSWITH "10.7"
os_vers_major Integer Major OS Version. For example: '10' os_vers_major == 10
os_vers_minor Integer Minor OS Version. For example:'7' os_vers_minor == 7
os_vers_patch Integer Point release version. For example: '2' os_vers_patch >=2
machine_model String 'MacMini1,1', 'iMac4,1', 'MacBookPro8,2' machine_model == "iMac4,1"
machine_type String 'laptop' or 'desktop' machine_type == "laptop"
ipv4_address Arrays of string This contains current IPv4 addresses for all interfaces ANY ipv4_address CONTAINS '192.168.161.'
munki_version String Full version of the installed munkitools munki_version LIKE '*0.8.3*'
serial_number String machine serial number serial_number =="W9999999U2P"
date UTC date string Date and time. Note the special syntax required to cast a string into an NSDate object. date>CAST("2013-01-02T00:00:00Z", "NSDATE")