22.16.92. salt.modules.launchctl

Module for the management of MacOS systems that use launchd/launchctl

depends:
  • plistlib Python module
salt.modules.launchctl.available(job_label)

Check that the given service is available.

CLI Example:

salt '*' service.available com.openssh.sshd
salt.modules.launchctl.get_all()

Return all installed services

CLI Example:

salt '*' service.get_all
salt.modules.launchctl.missing(job_label)

The inverse of service.available Check that the given service is not available.

CLI Example:

salt '*' service.missing com.openssh.sshd
salt.modules.launchctl.restart(job_label, runas=None)

Restart the named service

CLI Example:

salt '*' service.restart <service label>
salt.modules.launchctl.start(job_label, runas=None)

Start the specified service

CLI Example:

salt '*' service.start <service label>
salt '*' service.start org.ntp.ntpd
salt '*' service.start /System/Library/LaunchDaemons/org.ntp.ntpd.plist
salt.modules.launchctl.status(job_label, runas=None)

Return the status for a service, returns a bool whether the service is running.

CLI Example:

salt '*' service.status <service label>
salt.modules.launchctl.stop(job_label, runas=None)

Stop the specified service

CLI Example:

salt '*' service.stop <service label>
salt '*' service.stop org.ntp.ntpd
salt '*' service.stop /System/Library/LaunchDaemons/org.ntp.ntpd.plist

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.91. salt.modules.kmod

Next topic

22.16.93. salt.modules.layman

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.