neulab/tldr huggingface dataset:
salt.modules.yumpkg.version(*names, **kwargs) Returns a string representing the package version or an empty string if not installed. If more than one package name is specified, a dict of name/version pairs is returned.
salt.modules.yumpkg.version_cmp(pkg1, pkg2, ignore_epoch=False, **kwargs) New in version 2015.5.4.
Do a cmp-style comparison on two packages. Return -1 if pkg1 < pkg2, 0 if pkg1 == pkg2, and 1 if pkg1 > pkg2. Return None if there was a problem making the comparison.
salt.modules.zabbix Support for Zabbix
• zabbix server
configuration This module is not usable until the zabbix user and zabbix password are specified either in a pillar or in the minion's config file. Zabbix url should be also specified.
zabbix.user: Admin zabbix.password: mypassword zabbix.url: http://127.0.0.1/zabbix/api_jsonrpc.php
Connection arguments from the minion config file can be overridden on the CLI by using arguments with _connection_ prefix.
zabbix.apiinfo_version _connection_user=Admin _connection_password=zabbix _connection_url=http://host/zabbix/
salt.modules.zabbix.apiinfo_version(**connection_args) Retrieve the version of the Zabbix API.
• _connection_user -- Optional - zabbix user (can also be set in opts or pillar, see module's docstring)
• _connection_password -- Optional - zabbix password (can also be set in opts or pillar, see module's docstring)
• _connection_url -- Optional - url of zabbix frontend (can also be set in opts, pillar, see module's docstring)
Returns On success string with Zabbix API version, False on failure.
salt '*' zabbix.apiinfo_version
salt.modules.zabbix.compare_params(defined, existing, return_old_value=False) New in version 2017.7.
Compares Zabbix object definition against existing Zabbix object.
• defined -- Zabbix object definition taken from sls file.
• existing -- Existing Zabbix object taken from result of an API call.
• return_old_value -- Default False. If True, returns dict("old"=old_val, "new"=new_val) for rollback purpose.
Returns Params that are different from existing object. Result extended by object ID can be passed directly to Zabbix API update method.
salt.modules.zabbix.configuration_import(config_file, rules=None, file_format='xml', **connection_args) New in version 2017.7.
Imports Zabbix configuration specified in file to Zabbix server.
• config_file -- File with Zabbix config (local or remote)
• rules -- Optional - Rules that have to be different from default (defaults are the same as in Zabbix web UI.)
• file_format -- Config file format (default: xml)
salt '*' zabbix.configuration_import salt://zabbix/config/zabbix_templates.xml         "{'screens': {'createMissing': True, 'updateExisting': True}}"
salt.modules.zabbix.get_object_id_by_params(obj, params=None, **connection_args) New in version 2017.7.
Get ID of single Zabbix object specified by its name.
• obj -- Zabbix object type
• params -- Parameters by which object is uniquely identified
Returns object ID
salt.modules.zabbix.get_zabbix_id_mapper() New in version 2017.7.
Make ZABBIX_ID_MAPPER constant available to state modules.
Returns ZABBIX_ID_MAPPER
salt.modules.zabbix.host_create(host, groups, interfaces, **connection_args) New in version 2016.3.0.
Create new host
NOTE: This function accepts all standard host properties: keyword argument names differ depending on your zabbix version, see here.
• host -- technical name of the host
• groups -- groupids of host groups to add the host to
• interfaces -- interfaces to be created for the host
• visible_name -- string with visible name of the host, use 'visible_name' instead of 'name' parameter to not mess with value supplied from Salt sls file.
return: ID of the created host.
salt '*' zabbix.host_create technicalname 4 interfaces='{type: 1, main: 1, useip: 1, ip: "192.168.3.1", dns: "", port: 10050}' visible_name='Host Visible Name' inventory_mode=0 inventory='{"alias": "something"}'
salt.modules.zabbix.host_delete(hostids, **connection_args) Delete hosts.
• hostids -- Hosts (hostids) to delete.
Returns IDs of the deleted hosts.
salt '*' zabbix.host_delete 10106
salt.modules.zabbix.host_exists(host=None, hostid=None, name=None, node=None, nodeids=None, **connection_args) Checks if at least one host that matches the given filter criteria exists.
• name -- visible name of the host
• node -- name of the node the hosts must belong to (zabbix API < 2.4)
• nodeids -- IDs of the node the hosts must belong to (zabbix API < 2.4)
Returns IDs of the deleted hosts, False on failure.
salt '*' zabbix.host_exists 'Zabbix server'
salt.modules.zabbix.host_get(host=None, name=None, hostids=None, **connection_args) New in version 2016.3.0.
Retrieve hosts according to the given parameters
NOTE: This function accepts all optional host.get parameters: keyword argument names differ depending on your zabbix version, see here.
• hostids -- ids of the hosts
Returns Array with convenient hosts details, False if no host found or on failure.
salt '*' zabbix.host_get 'Zabbix server'
salt.modules.zabbix.host_inventory_get(hostids, **connection_args) Retrieve host inventory according to the given parameters.  See: https://www.zabbix.com/documentation/2.4/manual/api/reference/host/object#host_inventory
• hostids -- ID of the host to query
Returns Array with host inventory fields, populated or not, False if host inventory is disabled or on failure.
salt '*' zabbix.host_inventory_get 101054
salt.modules.zabbix.host_inventory_set(hostid, **connection_args) Update host inventory items NOTE: This function accepts all standard host: keyword argument names for inventory see: https://www.zabbix.com/documentation/2.4/manual/api/reference/host/object#host_inventory
• hostid -- ID of the host to update
• clear_old -- Set to True in order to remove all existing inventory items before setting the specified items
Returns ID of the updated host, False on failure.
salt '*' zabbix.host_inventory_set 101054 asset_tag=jml3322 type=vm clear_old=True
salt.modules.zabbix.host_list(**connection_args) Retrieve all hosts.
Returns Array with details about hosts, False on failure.
salt '*' zabbix.host_list
salt.modules.zabbix.host_update(hostid, **connection_args) New in version 2016.3.0.
Update existing hosts
NOTE: This function accepts all standard host and host.update properties: keyword argument names differ depending on your zabbix version, see the documentation for host objects and the documentation for updating hosts.
Returns ID of the updated host.
salt '*' zabbix.host_update 10084 name='Zabbix server2'
salt.modules.zabbix.hostgroup_create(name, **connection_args) New in version 2016.3.0.
Create a host group
NOTE: This function accepts all standard host group properties: keyword argument names differ depending on your zabbix version, see here.
• name -- name of the host group
Returns ID of the created host group.
salt '*' zabbix.hostgroup_create MyNewGroup
salt.modules.zabbix.hostgroup_delete(hostgroupids, **connection_args) Delete the host group.
• hostgroupids -- IDs of the host groups to delete
Returns ID of the deleted host groups, False on failure.
salt '*' zabbix.hostgroup_delete 23
salt.modules.zabbix.hostgroup_exists(name=None, groupid=None, node=None, nodeids=None, **connection_args) Checks if at least one host group that matches the given filter criteria exists.
• name -- names of the host groups
• groupid -- host group IDs
• node -- name of the node the host groups must belong to (zabbix API < 2.4)
• nodeids -- IDs of the nodes the host groups must belong to (zabbix API < 2.4)
Returns True if at least one host group exists, False if not or on failure.
salt '*' zabbix.hostgroup_exists MyNewGroup
salt.modules.zabbix.hostgroup_get(name=None, groupids=None, hostids=None, **connection_args) New in version 2016.3.0.
Retrieve host groups according to the given parameters
NOTE: This function accepts all standard hostgroup.get properities: keyword argument names differ depending on your zabbix version, see here.
• node -- name of the node the host groups must belong to
• nodeids -- IDs of the nodes the host groups must belong to
• hostids -- return only host groups that contain the given hosts
Returns Array with host groups details, False if no convenient host group found or on failure.
salt '*' zabbix.hostgroup_get MyNewGroup
salt.modules.zabbix.hostgroup_list(**connection_args) Retrieve all host groups.
Returns Array with details about host groups, False on failure.
salt '*' zabbix.hostgroup_list
salt.modules.zabbix.hostgroup_update(groupid, name=None, **connection_args) New in version 2016.3.0.
Update existing hosts group
• groupid -- ID of the host group to update
Returns IDs of updated host groups.
salt '*' zabbix.hostgroup_update 24 name='Renamed Name'
salt.modules.zabbix.hostinterface_create(hostid, ip_, dns='', main=1, if_type=1, useip=1, port=None, **connection_args) New in version 2016.3.0.
Create new host interface
NOTE: This function accepts all standard host group interface: keyword argument names differ depending on your zabbix version, see here.
• hostid -- ID of the host the interface belongs to
• ip -- IP address used by the interface
• dns -- DNS name used by the interface
• main -- whether the interface is used as default on the host (0 - not default, 1 - default)
• port -- port number used by the interface
• type -- Interface type (1 - agent; 2 - SNMP; 3 - IPMI; 4 - JMX)
• useip -- Whether the connection should be made via IP (0 - connect using host DNS name; 1 - connect using host IP address for this host interface)
Returns ID of the created host interface, False on failure.
salt '*' zabbix.hostinterface_create 10105 192.193.194.197
salt.modules.zabbix.hostinterface_delete(interfaceids, **connection_args) Delete host interface
• interfaceids -- IDs of the host interfaces to delete
Returns ID of deleted host interfaces, False on failure.
salt '*' zabbix.hostinterface_delete 50
salt.modules.zabbix.hostinterface_get(hostids, **connection_args) New in version 2016.3.0.
NOTE: This function accepts all standard hostinterface.get properities: keyword argument names differ depending on your zabbix version, see here.
• hostids -- Return only host interfaces used by the given hosts.
Returns Array with host interfaces details, False if no convenient host interfaces found or on failure.
salt '*' zabbix.hostinterface_get 101054
salt.modules.zabbix.hostinterface_update(interfaceid, **connection_args) New in version 2016.3.0.
Update host interface
NOTE: This function accepts all standard hostinterface: keyword argument names differ depending on your zabbix version, see here.
• interfaceid -- ID of the hostinterface to update
Returns ID of the updated host interface, False on failure.
salt '*' zabbix.hostinterface_update 6 ip_=0.0.0.2
salt.modules.zabbix.mediatype_create(name, mediatype, **connection_args) Create new mediatype
NOTE: This function accepts all standard mediatype properties: keyword argument names differ depending on your zabbix version, see here.
• mediatype -- media type - 0: email, 1: script, 2: sms, 3: Jabber, 100: Ez Texting
• exec_path -- exec path - Required for script and Ez Texting types, see Zabbix API docs
• gsm_modem -- exec path - Required for sms type, see Zabbix API docs
• smtp_email -- email address from which notifications will be sent, required for email type
• smtp_helo -- SMTP HELO, required for email type
• smtp_server -- SMTP server, required for email type
• status -- whether the media type is enabled - 0: enabled, 1: disabled
• username -- authentication user, required for Jabber and Ez Texting types
• passwd -- authentication password, required for Jabber and Ez Texting types
return: ID of the created mediatype.
salt '*' zabbix.mediatype_create 'Email' 0 smtp_email='noreply@example.com' smtp_server='mailserver.example.com' smtp_helo='zabbix.example.com'
salt.modules.zabbix.mediatype_delete(mediatypeids, **connection_args) Delete mediatype
• interfaceids -- IDs of the mediatypes to delete
Returns ID of deleted mediatype, False on failure.
salt '*' zabbix.mediatype_delete 3
salt.modules.zabbix.mediatype_get(name=None, mediatypeids=None, **connection_args) Retrieve mediatypes according to the given parameters.
• name -- Name or description of the mediatype
• mediatypeids -- ids of the mediatypes
• connection_args (optional) --
_connection_user: zabbix user (can also be set in opts or pillar, see module's docstring) _connection_password: zabbix password (can also be set in opts or pillar, see module's docstring) _connection_url: url of zabbix frontend (can also be set in opts or pillar, see module's docstring)
all optional mediatype.get parameters: keyword argument names depends on your zabbix version, see:
https://www.zabbix.com/documentation/2.2/manual/api/reference/mediatype/get
Returns Array with mediatype details, False if no mediatype found or on failure.
salt '*' zabbix.mediatype_get name='Email' salt '*' zabbix.mediatype_get mediatypeids="['1', '2', '3']"
salt.modules.zabbix.mediatype_update(mediatypeid, name=False, mediatype=False, **connection_args) Update existing mediatype
• mediatypeid -- ID of the mediatype to update
Returns IDs of the updated mediatypes, False on failure.
salt '*' zabbix.usergroup_update 8 name="Email update"
salt.modules.zabbix.run_query(method, params, **connection_args) Send Zabbix API call
• method -- actual operation to perform via the API
• params -- parameters required for specific method
all optional template.get parameters: keyword argument names depends on your zabbix version, see:
https://www.zabbix.com/documentation/2.4/manual/api/reference/
Returns Response from Zabbix API
salt '*' zabbix.run_query proxy.create '{"host": "zabbixproxy.domain.com", "status": "5"}'
salt.modules.zabbix.substitute_params(input_object, extend_params=None, filter_key='name', **kwargs) New in version 2017.7.
Go through Zabbix object params specification and if needed get given object ID from Zabbix API and put it back as a value. Definition of the object is done via dict with keys "query_object" and "query_name".
• input_object -- Zabbix object type specified in state file
• extend_params -- Specify query with params
• filter_key -- Custom filtering key (default: name)
Returns Params structure with values converted to string for further comparison purposes
salt.modules.zabbix.template_get(name=None, host=None, templateids=None, **connection_args) Retrieve templates according to the given parameters.
• host -- technical name of the template
• name -- visible name of the template
• hostids -- ids of the templates
https://www.zabbix.com/documentation/2.4/manual/api/reference/template/get
Returns Array with convenient template details, False if no template found or on failure.
salt '*' zabbix.template_get name='Template OS Linux' salt '*' zabbix.template_get templateids="['10050', '10001']"
salt.modules.zabbix.user_addmedia(userids, active, mediatypeid, period, sendto, severity, **connection_args) Add new media to multiple users.
• userids -- ID of the user that uses the media
• active -- Whether the media is enabled (0 enabled, 1 disabled)
• mediatypeid -- ID of the media type used by the media
• period -- Time when the notifications can be sent as a time period
• sendto -- Address, user name or other identifier of the recipient
• severity -- Trigger severities to send notifications about
Returns IDs of the created media.
salt '*' zabbix.user_addmedia 4 active=0 mediatypeid=1 period='1-7,00:00-24:00' sendto='support2@example.com' severity=63
salt.modules.zabbix.user_create(alias, passwd, usrgrps, **connection_args) New in version 2016.3.0.
Create new zabbix user
NOTE: This function accepts all standard user properties: keyword argument names differ depending on your zabbix version, see here.
• alias -- user alias
• passwd -- user's password
• usrgrps -- user groups to add the user to
• _connection_user -- zabbix user (can also be set in opts or pillar, see module's docstring)
• _connection_password -- zabbix password (can also be set in opts or pillar, see module's docstring)
• _connection_url -- url of zabbix frontend (can also be set in opts or pillar, see module's docstring)
• firstname -- string with firstname of the user, use 'firstname' instead of 'name' parameter to not mess with value supplied from Salt sls file.
Returns On success string with id of the created user.
salt '*' zabbix.user_create james password007 '[7, 12]' firstname='James Bond'
salt.modules.zabbix.user_delete(users, **connection_args) Delete zabbix users.
• users -- array of users (userids) to delete
Returns On success array with userids of deleted users.
salt '*' zabbix.user_delete 15
salt.modules.zabbix.user_deletemedia(mediaids, **connection_args) Delete media by id.
• mediaids -- IDs of the media to delete
Returns IDs of the deleted media, False on failure.
salt '*' zabbix.user_deletemedia 27
salt.modules.zabbix.user_exists(alias, **connection_args) Checks if user with given alias exists.
Returns True if user exists, else False.
salt '*' zabbix.user_exists james
salt.modules.zabbix.user_get(alias=None, userids=None, **connection_args) Retrieve users according to the given parameters.
• userids -- return only users with the given IDs
Returns Array with details of convenient users, False on failure of if no user found.
salt '*' zabbix.user_get james
salt.modules.zabbix.user_getmedia(userids=None, **connection_args) New in version 2016.3.0.
Retrieve media according to the given parameters
NOTE: This function accepts all standard usermedia.get properties: keyword argument names differ depending on your zabbix version, see here.
• userids -- return only media that are used by the given users
Returns List of retrieved media, False on failure.
salt '*' zabbix.user_getmedia
salt.modules.zabbix.user_list(**connection_args) Retrieve all of the configured users.
Returns Array with user details.
salt '*' zabbix.user_list
salt.modules.zabbix.user_update(userid, **connection_args) New in version 2016.3.0.
Update existing users
• userid -- id of the user to update
Returns Id of the updated user on success.
salt '*' zabbix.user_update 16 visible_name='James Brown'
salt.modules.zabbix.usergroup_create(name, **connection_args) New in version 2016.3.0.
Create new user group
NOTE: This function accepts all standard user group properties: keyword argument names differ depending on your zabbix version, see here.
• name -- name of the user group
Returns IDs of the created user groups.
salt '*' zabbix.usergroup_create GroupName
salt.modules.zabbix.usergroup_delete(usergroupids, **connection_args) New in version 2016.3.0.
• usergroupids -- IDs of the user groups to delete
Returns IDs of the deleted user groups.
salt '*' zabbix.usergroup_delete 28
salt.modules.zabbix.usergroup_exists(name=None, node=None, nodeids=None, **connection_args) Checks if at least one user group that matches the given filter criteria exists
• name -- names of the user groups
• node -- name of the node the user groups must belong to (This will override the nodeids parameter.)
• nodeids -- IDs of the nodes the user groups must belong to
Returns True if at least one user group that matches the given filter criteria exists, else False.
salt '*' zabbix.usergroup_exists Guests
salt.modules.zabbix.usergroup_get(name=None, usrgrpids=None, userids=None, **connection_args) New in version 2016.3.0.
Retrieve user groups according to the given parameters
NOTE: This function accepts all usergroup_get properties: keyword argument names differ depending on your zabbix version, see here.
• usrgrpids -- return only user groups with the given IDs
• userids -- return only user groups that contain the given users
Returns Array with convenient user groups details, False if no user group found or on failure.
salt '*' zabbix.usergroup_get Guests
salt.modules.zabbix.usergroup_list(**connection_args) Retrieve all enabled user groups.
Returns Array with enabled user groups details, False on failure.
salt '*' zabbix.usergroup_list
salt.modules.zabbix.usergroup_update(usrgrpid, **connection_args) New in version 2016.3.0.
Update existing user group
• usrgrpid -- ID of the user group to update.
Returns IDs of the updated user group, False on failure.
salt '*' zabbix.usergroup_update 8 name=guestsRenamed
salt.modules.zabbix.usermacro_create(macro, value, hostid, **connection_args) Create new host usermacro.
• macro -- name of the host usermacro
• value -- value of the host usermacro
• hostid -- hostid or templateid
return: ID of the created host usermacro.
salt '*' zabbix.usermacro_create '{$SNMP_COMMUNITY}' 'public' 1
salt.modules.zabbix.usermacro_createglobal(macro, value, **connection_args) Create new global usermacro.
• macro -- name of the global usermacro
• value -- value of the global usermacro
return: ID of the created global usermacro.
salt '*' zabbix.usermacro_createglobal '{$SNMP_COMMUNITY}' 'public'
salt.modules.zabbix.usermacro_delete(macroids, **connection_args) Delete host usermacros.
• macroids -- macroids of the host usermacros
return: IDs of the deleted host usermacro.
salt '*' zabbix.usermacro_delete 21
salt.modules.zabbix.usermacro_deleteglobal(macroids, **connection_args) Delete global usermacros.
• macroids -- macroids of the global usermacros
return: IDs of the deleted global usermacro.
salt '*' zabbix.usermacro_deleteglobal 21
salt.modules.zabbix.usermacro_get(macro=None, hostids=None, templateids=None, hostmacroids=None, globalmacroids=None, globalmacro=False, **connection_args) Retrieve user macros according to the given parameters.
• macro -- name of the usermacro
• hostids -- Return macros for the given hostids
• templateids -- Return macros for the given templateids
• hostmacroids -- Return macros with the given hostmacroids
• globalmacroids -- Return macros with the given globalmacroids (implies globalmacro=True)
• globalmacro -- if True, returns only global macros
• connection_args (optional) -- _connection_user: zabbix user (can also be set in opts or pillar, see module's docstring) _connection_password: zabbix password (can also be set in opts or pillar, see module's docstring) _connection_url: url of zabbix frontend (can also be set in opts or pillar, see module's docstring)
Returns Array with usermacro details, False if no usermacro found or on failure.
salt '*' zabbix.usermacro_get macro='{$SNMP_COMMUNITY}'
salt.modules.zabbix.usermacro_update(hostmacroid, value, **connection_args) Update existing host usermacro.
• hostmacroid -- id of the host usermacro
• value -- new value of the host usermacro
return: ID of the update host usermacro.
salt '*' zabbix.usermacro_update 1 'public'
salt.modules.zabbix.usermacro_updateglobal(globalmacroid, value, **connection_args) Update existing global usermacro.
• globalmacroid -- id of the host usermacro
return: ID of the update global usermacro.
salt '*' zabbix.usermacro_updateglobal 1 'public'
salt.modules.zcbuildout Management of zc.buildout
This module is inspired by minitage's buildout maker
NOTE: The zc.buildout integration is still in beta; the API is subject to change
General notes You have those following methods:
• upgrade_bootstrap
• bootstrap
• run_buildout
• buildout
salt.modules.zcbuildout.bootstrap(*a, **kw) Run the buildout bootstrap dance (python bootstrap.py).
directory directory to execute in
config alternative buildout configuration file to use
runas  User used to run buildout as
env    environment variables to set when running
buildout_ver force a specific buildout version (1 | 2)
test_release buildout accept test release
offline are we executing buildout in offline mode
distribute Forcing use of distribute
new_st Forcing use of setuptools >= 0.7
python path to a python executable to use in place of default (salt one)
onlyif Only execute cmd if statement on the host return 0
unless Do not execute cmd if statement on the host return 0
use_vt Use the new salt VT to stream output [experimental]
salt '*' buildout.bootstrap /srv/mybuildout
salt.modules.zcbuildout.buildout(*a, **kw) Run buildout in a directory.
config buildout config to use
parts  specific buildout parts to run
runas  user used to run buildout as
distribute use distribute over setuptools if possible
offline does buildout run offline
python python to use
debug  run buildout with -D debug flag
newest run buildout in newest mode
verbose run buildout in verbose mode (-vvvvv)
salt '*' buildout.buildout /srv/mybuildout
salt.modules.zcbuildout.run_buildout(*a, **kw) Run a buildout in a directory.
force  run buildout unconditionally
salt '*' buildout.run_buildout /srv/mybuildout
salt.modules.zcbuildout.upgrade_bootstrap(*a, **kw) Upgrade current bootstrap.py with the last released one.
Indeed, when we first run a buildout, a common source of problem is to have a locally stale bootstrap, we just try to grab a new copy
buildout_ver forcing to use a specific buildout version (1 | 2)
salt '*' buildout.upgrade_bootstrap /srv/mybuildout
salt.modules.zenoss Module for working with the Zenoss API
configuration This module requires a 'zenoss' entry in the master/minion config.
zenoss: hostname: https://zenoss.example.com username: admin password: admin123 verify_ssl: True ca_bundle: /etc/ssl/certs/ca-certificates.crt
salt.modules.zenoss.add_device(device=None, device_class=None, collector='localhost', prod_state=1000) A function to connect to a zenoss server and add a new device entry.
• device -- (Optional) Will use the grain 'fqdn' by default.
• device_class -- (Optional) The device class to use. If none, will determine based on kernel grain.
• collector -- (Optional) The collector to use for this device. Defaults to 'localhost'.
• prod_state -- (Optional) The prodState to set on the device. If none, defaults to 1000 ( production )
salt '*' zenoss.add_device
salt.modules.zenoss.device_exists(device=None) Check to see if a device already exists in Zenoss.
Parameters device -- (Optional) Will use the grain 'fqdn' by default
salt '*' zenoss.device_exists
salt.modules.zenoss.find_device(device=None) Find a device in Zenoss. If device not found, returns None.
salt '*' zenoss.find_device
salt.modules.zenoss.set_prod_state(prod_state, device=None) A function to set the prod_state in zenoss.
• prod_state -- (Required) Integer value of the state
salt zenoss.set_prod_state 1000 hostname
salt.modules.zfs Module for running ZFS command
codeauthor Nitin Madhok <nmadhok@g.clemson.edu>, Jorge Schrauwen <‐ sjorge@blackdot.be>
depends salt.utils.zfs
Changed in version 2018.3.1: Big refactor to remove duplicate code, better type conversions and improved consistency in output.
salt.modules.zfs.bookmark(snapshot, bookmark) Creates a bookmark of the given snapshot
NOTE: Bookmarks mark the point in time when the snapshot was created, and can be used as the incremental source for a zfs send command.
This feature must be enabled to be used. See zpool-features(5) for details on ZFS feature flags and the bookmarks feature.
snapshot string name of snapshot to bookmark
bookmark string name of bookmark
salt '*' zfs.bookmark myzpool/mydataset@yesterday myzpool/mydataset#complete
salt.modules.zfs.clone(name_a, name_b, **kwargs) Creates a clone of the given snapshot.
name_a string name of snapshot
name_b string name of filesystem or volume
create_parent boolean creates all the non-existing parent datasets. any property specified on the command line using the -o option is ignored.
properties dict additional zfs properties (-o)
NOTE: ZFS properties can be specified at the time of creation of the filesystem by passing an additional argument called "properties" and specifying the properties with their respective values in the form of a python dictionary:
properties="{'property1': 'value1', 'property2': 'value2'}"
salt '*' zfs.clone myzpool/mydataset@yesterday myzpool/mydataset_yesterday
salt.modules.zfs.create(name, **kwargs) Create a ZFS File System.
name   string name of dataset or volume
volume_size string if specified, a zvol will be created instead of a dataset
sparse boolean create sparse volume
salt '*' zfs.create myzpool/mydataset [create_parent=True|False] salt '*' zfs.create myzpool/mydataset properties="{'mountpoint': '/export/zfs', 'sharenfs': 'on'}" salt '*' zfs.create myzpool/volume volume_size=1G [sparse=True|False]` salt '*' zfs.create myzpool/volume volume_size=1G properties="{'volblocksize': '512'}" [sparse=True|False]
salt.modules.zfs.destroy(name, **kwargs) Destroy a ZFS File System.
name   string name of dataset, volume, or snapshot
force  boolean force an unmount of any file systems using the unmount -f command.
recursive boolean recursively destroy all children. (-r)
recursive_all boolean recursively destroy all dependents, including cloned file systems outside the target hierarchy. (-R)
WARNING: watch out when using recursive and recursive_all
salt '*' zfs.destroy myzpool/mydataset [force=True|False]
salt.modules.zfs.diff(name_a, name_b=None, **kwargs) Display the difference between a snapshot of a given filesystem and another snapshot of that filesystem from a later time or the current contents of the filesystem.
name_b string (optional) name of snapshot or filesystem
show_changetime boolean display the path's inode change time as the first column of output. (default = True)
show_indication boolean display an indication of the type of file. (default = True)
parsable boolean if true we don't parse the timestamp to a more readable date (default = True)
salt '*' zfs.diff myzpool/mydataset@yesterday myzpool/mydataset
salt.modules.zfs.exists(name, **kwargs) Check if a ZFS filesystem or volume or snapshot exists.
name   string name of dataset
type   string also check if dataset is of a certain type, valid choices are: filesystem, snapshot, volume, bookmark, or all.
salt '*' zfs.exists myzpool/mydataset salt '*' zfs.exists myzpool/myvolume type=volume
salt.modules.zfs.get(*dataset, **kwargs) Displays properties for the given datasets.
dataset string name of snapshot(s), filesystem(s), or volume(s)
properties string comma-separated list of properties to list, defaults to all
recursive boolean recursively list children
depth  int recursively list children to depth
fields string comma-separated list of fields to include, the name and property field will always be added
type   string comma-separated list of types to display, where type is one of filesystem, snapshot, volume, bookmark, or all.
Changed in version 3004.
type is ignored on Solaris 10 and 11 since not a valid parameter on those platforms
source string comma-separated list of sources to display. Must be one of the following: local, default, inherited, temporary, and none. The default value is all sources.
parsable boolean display numbers in parsable (exact) values (default = True) .. versionadded:: 2018.3.0
NOTE: If no datasets are specified, then the command displays properties for all datasets on the system.
salt '*' zfs.get salt '*' zfs.get myzpool/mydataset [recursive=True|False] salt '*' zfs.get myzpool/mydataset properties="sharenfs,mountpoint" [recursive=True|False] salt '*' zfs.get myzpool/mydataset myzpool/myotherdataset properties=available fields=value depth=1
salt.modules.zfs.hold(tag, *snapshot, **kwargs) Adds a single reference, named with the tag argument, to the specified snapshot or snapshots.
NOTE: Each snapshot has its own tag namespace, and tags must be unique within that space.
If a hold exists on a snapshot, attempts to destroy that snapshot by using the zfs destroy command return EBUSY.
tag    string name of tag
snapshot string name of snapshot(s)
recursive boolean specifies that a hold with the given tag is applied recursively to the snapshots of all descendent file systems.
Changed in version 2018.3.1.
WARNING: As of 2018.3.1 the tag parameter no longer accepts a comma-separated value.  It's is now possible to create a tag that contains a comma, this was impossible before.
salt '*' zfs.hold mytag myzpool/mydataset@mysnapshot [recursive=True] salt '*' zfs.hold mytag myzpool/mydataset@mysnapshot myzpool/mydataset@myothersnapshot
salt.modules.zfs.holds(snapshot, **kwargs) Lists all existing user references for the given snapshot or snapshots.
snapshot string name of snapshot
recursive boolean lists the holds that are set on the named descendent snapshots also.
salt '*' zfs.holds myzpool/mydataset@baseline
salt.modules.zfs.inherit(prop, name, **kwargs) Clears the specified property
name   string name of the filesystem, volume, or snapshot
recursive boolean recursively inherit the given property for all children.
revert boolean revert the property to the received value if one exists; otherwise operate as if the -S option was not specified.
salt '*' zfs.inherit canmount myzpool/mydataset [recursive=True|False]
salt.modules.zfs.list_(name=None, **kwargs) Return a list of all datasets or a specified dataset on the system and the values of their used, available, referenced, and mountpoint properties.
depth  int limit recursion to depth
properties string comma-separated list of properties to list, the name property will always be added
sort   string property to sort on (default = name)
order  string [ascending|descending] sort order (default = ascending)
parsable boolean display numbers in parsable (exact) values .. versionadded:: 2018.3.0
salt '*' zfs.list salt '*' zfs.list myzpool/mydataset [recursive=True|False] salt '*' zfs.list myzpool/mydataset properties="sharenfs,mountpoint"
salt.modules.zfs.list_mount() List mounted zfs filesystems
salt '*' zfs.list_mount
salt.modules.zfs.mount(name=None, **kwargs) Mounts ZFS file systems
name   string name of the filesystem, having this set to None will mount all filesystems. (this is the default)
overlay boolean perform an overlay mount.
options string optional comma-separated list of mount options to use temporarily for the duration of the mount.
WARNING: Passing '-a' as name is deprecated and will be removed in 3001.
salt '*' zfs.mount salt '*' zfs.mount myzpool/mydataset salt '*' zfs.mount myzpool/mydataset options=ro
salt.modules.zfs.promote(name) Promotes a clone file system to no longer be dependent on its "origin" snapshot.
NOTE: This makes it possible to destroy the file system that the clone was created from. The clone parent-child dependency relationship is reversed, so that the origin file system becomes a clone of the specified file system.
The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the origin file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed by this operation, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The rename subcommand can be used to rename any conflicting snapshots.
name   string name of clone-filesystem
salt '*' zfs.promote myzpool/myclone
salt.modules.zfs.release(tag, *snapshot, **kwargs) Removes a single reference, named with the tag argument, from the specified snapshot or snapshots.
NOTE: The tag must already exist for each snapshot.  If a hold exists on a snapshot, attempts to destroy that snapshot by using the zfs destroy command return EBUSY.
recursive boolean recursively releases a hold with the given tag on the snapshots of all descendent file systems.
salt '*' zfs.release mytag myzpool/mydataset@mysnapshot [recursive=True] salt '*' zfs.release mytag myzpool/mydataset@mysnapshot myzpool/mydataset@myothersnapshot
salt.modules.zfs.rename(name, new_name, **kwargs) Rename or Relocate a ZFS File System.
new_name string new name of dataset, volume, or snapshot
force  boolean force unmount any filesystems that need to be unmounted in the process.
create_parent boolean creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the mountpoint property inherited from their parent.
recursive boolean recursively rename the snapshots of all descendent datasets.  snapshots are the only dataset that can be renamed recursively.
salt '*' zfs.rename myzpool/mydataset myzpool/renameddataset
salt.modules.zfs.rollback(name, **kwargs) Roll back the given dataset to a previous snapshot.
name   string name of snapshot
recursive boolean destroy any snapshots and bookmarks more recent than the one specified.
recursive_all boolean destroy any more recent snapshots and bookmarks, as well as any clones of those snapshots.
force  boolean used with the -R option to force an unmount of any clone file systems that are to be destroyed.
WARNING: When a dataset is rolled back, all data that has changed since the snapshot is discarded, and the dataset reverts to the state at the time of the snapshot. By default, the command refuses to roll back to a snapshot other than the most recent one.
In order to do so, all intermediate snapshots and bookmarks must be destroyed by specifying the -r option.
salt '*' zfs.rollback myzpool/mydataset@yesterday
salt.modules.zfs.set(*dataset, **kwargs) Sets the property or list of properties to the given value(s) for each dataset.
properties string additional zfs properties pairs
NOTE: properties are passed as key-value pairs. e.g. compression=off
NOTE: Only some properties can be edited.
See the Properties section for more information on what properties can be set and acceptable values.
Numeric values can be specified as exact values, or in a human-readable form with a suffix of B, K, M, G, T, P, E (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, or exabytes respectively).
salt '*' zfs.set myzpool/mydataset compression=off salt '*' zfs.set myzpool/mydataset myzpool/myotherdataset compression=off salt '*' zfs.set myzpool/mydataset myzpool/myotherdataset compression=lz4 canmount=off
salt.modules.zfs.snapshot(*snapshot, **kwargs) Creates snapshots with the given names.
recursive boolean recursively create snapshots of all descendent datasets.
salt '*' zfs.snapshot myzpool/mydataset@yesterday [recursive=True] salt '*' zfs.snapshot myzpool/mydataset@yesterday myzpool/myotherdataset@yesterday [recursive=True]
salt.modules.zfs.unmount(name, **kwargs) Unmounts ZFS file systems
name   string name of the filesystem, you can use None to unmount all mounted filesystems.
force  boolean forcefully unmount the file system, even if it is currently in use.
WARNING: Using -a for the name parameter will probably break your system, unless your rootfs is not on zfs.
salt '*' zfs.unmount myzpool/mydataset [force=True|False]
salt.modules.zk_concurrency Concurrency controls in zookeeper depends kazoo
configuration See salt.modules.zookeeper for setup instructions.
This module allows you to acquire and release a slot. This is primarily useful for ensureing that no more than N hosts take a specific action at once. This can also be used to coordinate between masters.
salt.modules.zk_concurrency.lock(path, zk_hosts=None, identifier=None, max_concurrency=1, timeout=None, ephemeral_lease=False, force=False, profile=None, scheme=None, username=None, password=None, default_acl=None) Get lock (with optional timeout)
path   The path in zookeeper where the lock is
zk_hosts zookeeper connect string
identifier Name to identify this minion, if unspecified defaults to the hostname
max_concurrency Maximum number of lock holders
timeout timeout to wait for the lock. A None timeout will block forever
ephemeral_lease Whether the locks in zookeper should be ephemeral
force  Forcibly acquire the lock regardless of available slots
salt minion zk_concurrency.lock /lock/path host1:1234,host2:1234
salt.modules.zk_concurrency.lock_holders(path, zk_hosts=None, identifier=None, max_concurrency=1, timeout=None, ephemeral_lease=False, profile=None, scheme=None, username=None, password=None, default_acl=None) Return an un-ordered list of lock holders
identifier Name to identify this minion, if unspecified defaults to hostname
salt minion zk_concurrency.lock_holders /lock/path host1:1234,host2:1234
salt.modules.zk_concurrency.party_members(path, zk_hosts=None, min_nodes=1, blocking=False, profile=None, scheme=None, username=None, password=None, default_acl=None) Get the List of identifiers in a particular party, optionally waiting for the specified minimum number of nodes (min_nodes) to appear
min_nodes The minimum number of nodes expected to be present in the party
blocking The boolean indicating if we need to block until min_nodes are available
salt minion zk_concurrency.party_members /lock/path host1:1234,host2:1234 salt minion zk_concurrency.party_members /lock/path host1:1234,host2:1234 min_nodes=3 blocking=True
salt.modules.zk_concurrency.unlock(path, zk_hosts=None, identifier=None, max_concurrency=1, ephemeral_lease=False, scheme=None, profile=None, username=None, password=None, default_acl=None) Remove lease from semaphore
salt minion zk_concurrency.unlock /lock/path host1:1234,host2:1234
salt.modules.znc znc - An advanced IRC bouncer
Provides an interface to basic ZNC functionality
salt.modules.znc.buildmod(*modules) Build module using znc-buildmod
salt '*' znc.buildmod module.cpp [...]
salt.modules.znc.dumpconf() Write the active configuration state to config file
salt '*' znc.dumpconf
salt.modules.znc.rehashconf() Rehash the active configuration state from config file
salt '*' znc.rehashconf
salt.modules.znc.version() Return server version from znc --version
salt '*' znc.version
salt.modules.zoneadm Module for Solaris 10's zoneadm
platform OmniOS,OpenIndiana,SmartOS,OpenSolaris,Solaris 10
WARNING: Oracle Solaris 11's zoneadm is not supported by this module!
salt.modules.zoneadm.attach(zone, force=False, brand_opts=None) Attach the specified zone.
zone   string name of the zone
force  boolean force the zone into the "installed" state with no validation
brand_opts string brand specific options to pass
salt '*' zoneadm.attach lawrence salt '*' zoneadm.attach lawrence True
salt.modules.zoneadm.boot(zone, single=False, altinit=None, smf_options=None) Boot (or activate) the specified zone.
zone   string name or uuid of the zone
single boolean boots only to milestone svc:/milestone/single-user:default.
altinit string valid path to an alternative executable to be the primordial process.
smf_options string include two categories of options to control booting behavior of the service management facility: recovery options and messages options.
salt '*' zoneadm.boot clementine salt '*' zoneadm.boot maeve single=True salt '*' zoneadm.boot teddy single=True smf_options=verbose
salt.modules.zoneadm.clone(zone, source, snapshot=None) Install a zone by copying an existing installed zone.
source string zone to clone from
snapshot string optional name of snapshot to use as source
salt '*' zoneadm.clone clementine dolores
salt.modules.zoneadm.detach(zone) Detach the specified zone.
salt '*' zoneadm.detach kissy
salt.modules.zoneadm.halt(zone) Halt the specified zone.
NOTE: To cleanly shutdown the zone use the shutdown function.
salt '*' zoneadm.halt hector
salt.modules.zoneadm.install(zone, nodataset=False, brand_opts=None) Install the specified zone from the system.
nodataset boolean do not create a ZFS file system
salt '*' zoneadm.install dolores salt '*' zoneadm.install teddy True
salt.modules.zoneadm.list_zones(verbose=True, installed=False, configured=False, hide_global=True) List all zones
verbose boolean display additional zone information
installed boolean include installed zones in output
configured boolean include configured zones in output
hide_global boolean do not include global zone
salt '*' zoneadm.list
salt.modules.zoneadm.move(zone, zonepath) Move zone to new zonepath.
zonepath string new zonepath
salt '*' zoneadm.move meave /sweetwater/meave
salt.modules.zoneadm.ready(zone) Prepares a zone for running applications.
salt '*' zoneadm.ready clementine
salt.modules.zoneadm.reboot(zone, single=False, altinit=None, smf_options=None) Restart the zone. This is equivalent to a halt boot sequence.
salt '*' zoneadm.reboot dolores salt '*' zoneadm.reboot teddy single=True
salt.modules.zoneadm.shutdown(zone, reboot=False, single=False, altinit=None, smf_options=None) Gracefully shutdown the specified zone.
reboot boolean reboot zone after shutdown (equivalent of shutdown -i6 -g0 -y)
salt '*' zoneadm.shutdown peter salt '*' zoneadm.shutdown armistice reboot=True
salt.modules.zoneadm.uninstall(zone) Uninstall the specified zone from the system.
WARNING: The -F flag is always used to avoid the prompts when uninstalling.
salt '*' zoneadm.uninstall teddy
salt.modules.zoneadm.verify(zone) Check to make sure the configuration of the specified zone can safely be installed on the machine.
salt '*' zoneadm.verify dolores
salt.modules.zonecfg Module for Solaris 10's zonecfg
depend salt.modules.file
WARNING: Oracle Solaris 11's zonecfg is not supported by this module!
salt.modules.zonecfg.add_resource(zone, resource_type, **kwargs) Add a resource
zone   string name of zone
resource_type string type of resource
kwargs string|int|...  resource properties
salt '*' zonecfg.add_resource tallgeese rctl name=zone.max-locked-memory value='(priv=privileged,limit=33554432,action=deny)'
salt.modules.zonecfg.clear_property(zone, key) Clear a property
key    string name of property
salt '*' zonecfg.clear_property deathscythe cpu-shares
salt.modules.zonecfg.create(zone, brand, zonepath, force=False) Create an in-memory configuration for the specified zone.
brand  string brand name
zonepath string path of zone
force  boolean overwrite configuration
salt '*' zonecfg.create deathscythe ipkg /zones/deathscythe
salt.modules.zonecfg.create_from_template(zone, template) Create an in-memory configuration from a template for the specified zone.
template string name of template
WARNING: existing config will be overwritten!
salt '*' zonecfg.create_from_template leo tallgeese
salt.modules.zonecfg.delete(zone) Delete the specified configuration from memory and stable storage.
salt '*' zonecfg.delete epyon
salt.modules.zonecfg.export(zone, path=None) Export the configuration from memory to stable storage.
path   string path of file to export to
salt '*' zonecfg.export epyon salt '*' zonecfg.export epyon /zones/epyon.cfg
salt.modules.zonecfg.import_(zone, path) Import the configuration to memory from stable storage.
salt '*' zonecfg.import epyon /zones/epyon.cfg
salt.modules.zonecfg.info(zone, show_all=False) Display the configuration from memory
show_all boolean also include calculated values like capped-cpu, cpu-shares, ...
salt '*' zonecfg.info tallgeese
salt.modules.zonecfg.remove_resource(zone, resource_type, resource_key, resource_value) Remove a resource
resource_key string key for resource selection
resource_value string value for resource selection
NOTE: Set resource_selector to None for resource that do not require one.
salt '*' zonecfg.remove_resource tallgeese rctl name zone.max-locked-memory
salt.modules.zonecfg.set_property(zone, key, value) Set a property
value  string value of property
salt '*' zonecfg.set_property deathscythe cpu-shares 100
salt.modules.zonecfg.update_resource(zone, resource_type, resource_selector, **kwargs) Add a resource
resource_selector string unique resource identifier
salt '*' zonecfg.update_resource tallgeese rctl name name=zone.max-locked-memory value='(priv=privileged,limit=33554432,action=deny)'
salt.modules.zookeeper Zookeeper Module maintainer SaltStack
depends kazoo
Configuration configuration This module is not usable until the following are specified either in a pillar or in the minion's config file:
zookeeper: hosts: zoo1,zoo2,zoo3 default_acl: - username: daniel password: test read: true write: true create: true delete: true admin: true username: daniel password: test
If configuration for multiple zookeeper environments is required, they can be set up as different configuration profiles. For example:
zookeeper: prod: hosts: zoo1,zoo2,zoo3 default_acl: - username: daniel password: test read: true write: true create: true delete: true admin: true username: daniel password: test dev: hosts: - dev1 - dev2 - dev3 default_acl: - username: daniel password: test read: true write: true create: true delete: true admin: true username: daniel password: test
salt.modules.zookeeper.create(path, value='', acls=None, ephemeral=False, sequence=False, makepath=False, profile=None, hosts=None, scheme=None, username=None, password=None, default_acl=None) Create Znode
path   path of znode to create
value  value to assign to znode (Default: '')
acls   list of acl dictionaries to be assigned (Default: None)
ephemeral indicate node is ephemeral (Default: False)
sequence indicate node is suffixed with a unique index (Default: False)
makepath Create parent paths if they do not exist (Default: False)
profile Configured Zookeeper profile to authenticate with (Default: None)
hosts  Lists of Zookeeper Hosts (Default: '127.0.0.1:2181)
scheme Scheme to authenticate with (Default: 'digest')
username Username to authenticate (Default: None)
password Password to authenticate (Default: None)