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
Parameters: | name (str) -- The update to download. |
---|---|
Returns: | True if successful, otherwise False |
Return type: | bool |
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.
Parameters: | |
---|---|
Returns: | A list containing all downloaded updates on the system. |
Return type: |
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
Returns: | The catalog being used for update lookups |
---|---|
Return type: | str |
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.
Parameters: | name -- The name of the update to add to the ignore list. |
---|---|
Ptype: | str |
Returns: | True if successful, False if not |
Return type: | bool |
CLI Example:
salt '*' softwareupdate.ignore <update-name>
salt.modules.mac_softwareupdate.
list_available
(recommended=False, restart=False)¶List all available updates.
Parameters: | |
---|---|
Returns: | Returns a dictionary containing the updates |
Return type: |
CLI Example:
salt '*' softwareupdate.list_available
salt.modules.mac_softwareupdate.
list_downloads
()¶Return a list of all updates that have been downloaded locally.
Returns: | A list of updates that have been downloaded |
---|---|
Return type: | list |
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.
Returns: | The list of ignored updates |
---|---|
Return type: | list |
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.
Returns: | True if successful, False if not |
---|---|
Return type: | bool |
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.
Returns: | True if the list was reset, Otherwise False |
---|---|
Return type: | bool |
CLI Example:
salt '*' softwareupdate.reset_ignored
salt.modules.mac_softwareupdate.
schedule_enable
(enable)¶Enable/disable automatic update scheduling.
Parameters: | 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. |
---|---|
Type: | bool str |
Returns: | True if scheduling is enabled, False if disabled |
Return type: | bool |
CLI Example:
salt '*' softwareupdate.schedule_enable on|off
salt.modules.mac_softwareupdate.
schedule_enabled
()¶Check the status of automatic update scheduling.
Returns: | True if scheduling is enabled, False if disabled |
---|---|
Return type: | bool |
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
Parameters: | url (str) -- The url to the update catalog |
---|---|
Returns: | True if successful, False if not |
Return type: | bool |
CLI Example:
salt '*' softwareupdates.set_catalog http://swupd.local:8888/index.sucatalog
salt.modules.mac_softwareupdate.
update
(name)¶Install a named update.
Parameters: | name (str) -- The name of the of the update to install. |
---|---|
Returns: | True if successfully updated, otherwise False |
Return type: | bool |
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.
Parameters: | |
---|---|
Returns: | A dictionary containing the updates that were installed and the status of its installation. If no updates were installed an empty dictionary is returned. |
Return type: |
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.
Parameters: | name (str) -- The name of the update to look for |
---|---|
Returns: | True if available, False if not |
Return type: | bool |
CLI Example:
salt '*' softwareupdate.update_available <update-name>
salt '*' softwareupdate.update_available "<update with whitespace>"