salt.modules.softwareupdate

Support for the softwareupdate command on MacOS.

salt.modules.softwareupdate.download(*updates)

Download a named update so that it can be installed later with the install or upgrade function. It returns a list of all updates that are now downloaded.

CLI Example:

salt '*' softwareupdate.download <update name>
salt '*' softwareupdate.download "<update with whitespace>"
salt '*' softwareupdate.download <update1> <update2> <update3>
salt.modules.softwareupdate.download_all(rec=False, restart=True)

Download all available updates so that they can be installed later with the install or upgrade function. It returns a list of updates that are now downloaded.

CLI Example:

salt '*' softwareupdate.download_all
salt.modules.softwareupdate.ignore(*updates)

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_upgrades.

CLI Example:

salt '*' softwareupdate.ignore <update-name>
salt '*' softwareupdate.ignore "<update with whitespace>"
salt '*' softwareupdate.ignore <update1> <update2> <update3>
salt.modules.softwareupdate.install(*updates)

Install a named upgrade. Returns a dictionary containing the name of the update and the status of its installation.

Return values: - True: The update was installed. - False: The update was not installed. - None: There is no update available with that name.

CLI Example:

salt '*' softwareupdate.install <update-name>
salt '*' softwareupdate.install "<update with whitespace>"
salt '*' softwareupdate.install <update1> <update2> <update3>
salt.modules.softwareupdate.list_downloads()

Return a list of all updates that have been downloaded locally.

CLI Example:

salt '*' softwareupdate.list_downloads
salt.modules.softwareupdate.list_ignored()

List all upgrades that has been ignored. Ignored updates are shown without the '-' and version number at the end, this is how the softwareupdate command works.

CLI Example:

salt '*' softwareupdate.list_ignored
salt.modules.softwareupdate.list_upgrades(rec=False, restart=False)

List all available updates.

rec
Return only the recommended updates.
restart
Return only the updates that require a restart.

CLI Example:

salt '*' softwareupdate.list_upgrades
salt.modules.softwareupdate.reset_ignored()

Make sure the ignored updates are not ignored anymore, returns a list of the updates that are no longer ignored.

CLI Example:

salt '*' softwareupdate.reset_ignored
salt.modules.softwareupdate.schedule(*status)

Decide if automatic checking for upgrades should be on or off. If no arguments are given it will return the current status. Append on or off to change the status.

Return values: - True: Automatic checking is now on, - False: Automatic checking is now off, - None: Invalid argument.

CLI Example:

salt '*' softwareupdate.schedule
salt '*' softwareupdate.schedule on|off
salt.modules.softwareupdate.upgrade(rec=False, restart=True)

Install all available upgrades. Returns a dictionary containing the name of the update and the status of its installation.

Return values: - True: The update was installed. - False: The update was not installed.

rec
If set to True, only install all the recommended updates.
restart
Set this to False if you do not want to install updates that require a restart.

CLI Example:

salt '*' softwareupdate.upgrade
salt.modules.softwareupdate.upgrade_available(update)

Check whether or not an upgrade is available with a given name.

CLI Example:

salt '*' softwareupdate.upgrade_available <update-name>
salt '*' softwareupdate.upgrade_available "<update with whitespace>"