Support for the softwareupdate command on MacOS.
salt.modules.mac_softwareupdate.
download
(name)¶Download a named update so that it can be installed later with the
update
or update_all
functions
name (str) -- The update to download.
True if successful, otherwise False
CLI Example:
salt '*' softwareupdate.download <update name>
salt.modules.mac_softwareupdate.
download_all
(recommended=False, restart=True)¶Download all available updates so that they can be installed later with the
update
or update_all
functions. It returns a list of updates that
are now downloaded.
A list containing all downloaded updates on the system.
CLI Example:
salt '*' softwareupdate.download_all
salt.modules.mac_softwareupdate.
get_catalog
()¶New in version 2016.3.0.
Get the current catalog being used for update lookups. Will return a url if a custom catalog has been specified. Otherwise the word 'Default' will be returned
The catalog being used for update lookups
CLI Example:
salt '*' softwareupdates.get_catalog
salt.modules.mac_softwareupdate.
ignore
(name)¶Ignore a specific program update. When an update is ignored the '-' and version number at the end will be omitted, so "SecUpd2014-001-1.0" becomes "SecUpd2014-001". It will be removed automatically if present. An update is successfully ignored when it no longer shows up after list_updates.
name -- The name of the update to add to the ignore list.
str
True if successful, False if not
CLI Example:
salt '*' softwareupdate.ignore <update-name>
salt.modules.mac_softwareupdate.
list_available
(recommended=False, restart=False)¶List all available updates.
Returns a dictionary containing the updates
CLI Example:
salt '*' softwareupdate.list_available
salt.modules.mac_softwareupdate.
list_downloads
()¶Return a list of all updates that have been downloaded locally.
A list of updates that have been downloaded
CLI Example:
salt '*' softwareupdate.list_downloads
salt.modules.mac_softwareupdate.
list_ignored
()¶List all updates that have been ignored. Ignored updates are shown without the '-' and version number at the end, this is how the softwareupdate command works.
The list of ignored updates
CLI Example:
salt '*' softwareupdate.list_ignored
salt.modules.mac_softwareupdate.
reset_catalog
()¶New in version 2016.3.0.
Reset the Software Update Catalog to the default.
True if successful, False if not
CLI Example:
salt '*' softwareupdates.reset_catalog
salt.modules.mac_softwareupdate.
reset_ignored
()¶Make sure the ignored updates are not ignored anymore, returns a list of the updates that are no longer ignored.
True if the list was reset, Otherwise False
CLI Example:
salt '*' softwareupdate.reset_ignored
salt.modules.mac_softwareupdate.
schedule_enable
(enable)¶Enable/disable automatic update scheduling.
enable -- True/On/Yes/1 to turn on automatic updates. False/No/Off/0 to turn off automatic updates. If this value is empty, the current status will be returned.
bool str
True if scheduling is enabled, False if disabled
CLI Example:
salt '*' softwareupdate.schedule_enable on|off
salt.modules.mac_softwareupdate.
schedule_enabled
()¶Check the status of automatic update scheduling.
True if scheduling is enabled, False if disabled
CLI Example:
salt '*' softwareupdate.schedule_enabled
salt.modules.mac_softwareupdate.
set_catalog
(url)¶New in version 2016.3.0.
Set the Software Update Catalog to the URL specified
url (str) -- The url to the update catalog
True if successful, False if not
CLI Example:
salt '*' softwareupdates.set_catalog http://swupd.local:8888/index.sucatalog
salt.modules.mac_softwareupdate.
update
(name)¶Install a named update.
name (str) -- The name of the of the update to install.
True if successfully updated, otherwise False
CLI Example:
salt '*' softwareupdate.update <update-name>
salt.modules.mac_softwareupdate.
update_all
(recommended=False, restart=True)¶Install all available updates. Returns a dictionary containing the name of the update and the status of its installation.
A dictionary containing the updates that were installed and the status of its installation. If no updates were installed an empty dictionary is returned.
CLI Example:
salt '*' softwareupdate.update_all
salt.modules.mac_softwareupdate.
update_available
(name)¶Check whether or not an update is available with a given name.
name (str) -- The name of the update to look for
True if available, False if not
CLI Example:
salt '*' softwareupdate.update_available <update-name>
salt '*' softwareupdate.update_available "<update with whitespace>"