neulab/tldr huggingface dataset:
coretemp-isa-0000 Adapter: ISA adapter Physical id 0:  +56.0°C (high = +87.0°C, crit = +105.0°C) Core 0:         +52.0°C  (high = +87.0°C, crit = +105.0°C) Core 1:         +50.0°C  (high = +87.0°C, crit = +105.0°C) Core 2:         +56.0°C  (high = +87.0°C, crit = +105.0°C) Core 3:         +53.0°C  (high = +87.0°C, crit = +105.0°C)
Given the above, the chip is 'coretemp-isa-0000'.
salt.modules.serverdensity_device Wrapper around Server Density API New in version 2014.7.0.
salt.modules.serverdensity_device.create(name, **params) Function to create device in Server Density. For more info, see the API docs.
salt '*' serverdensity_device.create lama salt '*' serverdensity_device.create rich_lama group=lama_band installedRAM=32768
salt.modules.serverdensity_device.delete(device_id) Delete a device from Server Density. For more information, see the API docs.
salt '*' serverdensity_device.delete 51f7eafcdba4bb235e000ae4
salt.modules.serverdensity_device.get_sd_auth(val, sd_auth_pillar_name='serverdensity') Returns requested Server Density authentication value from pillar.
salt '*' serverdensity_device.get_sd_auth <val>
salt.modules.serverdensity_device.install_agent(agent_key, agent_version=1) Function downloads Server Density installation agent, and installs sd-agent with agent_key. Optionally the agent_version would select the series to use (defaults on the v1 one).
salt '*' serverdensity_device.install_agent c2bbdd6689ff46282bdaa07555641498 salt '*' serverdensity_device.install_agent c2bbdd6689ff46282bdaa07555641498 2
salt.modules.serverdensity_device.ls(**params) List devices in Server Density
Results will be filtered by any params passed to this function. For more information, see the API docs on listing and searching.
salt '*' serverdensity_device.ls salt '*' serverdensity_device.ls name=lama salt '*' serverdensity_device.ls name=lama group=lama_band installedRAM=32768
salt.modules.serverdensity_device.update(device_id, **params) Updates device information in Server Density. For more information see the API docs.
salt '*' serverdensity_device.update 51f7eafcdba4bb235e000ae4 name=lama group=lama_band salt '*' serverdensity_device.update 51f7eafcdba4bb235e000ae4 name=better_lama group=rock_lamas swapSpace=512
salt.modules.servicenow Module for execution of ServiceNow CI (configuration items)
depends servicenow_rest python module
configuration Configure this module by specifying the name of a configuration profile in the minion config, minion pillar, or master config. The module will use the 'servicenow' key by default, if defined.
servicenow: instance_name: '' username: '' password: ''
salt.modules.servicenow.delete_record(table, sys_id) Delete an existing record
• table (str) -- The table name, e.g. sys_user
• sys_id (str) -- The unique ID of the record
salt myminion servicenow.delete_record sys_computer 2134566
salt.modules.servicenow.non_structured_query(table, query=None, **kwargs) Run a non-structed (not a dict) query on a servicenow table.  See http://wiki.servicenow.com/index.php?title=Encoded_Query_Strings#gsc.tab=0 for help on constructing a non-structured query string.
• query (str) -- The query to run (or use keyword arguments to filter data)
salt myminion servicenow.non_structured_query sys_computer 'role=web' salt myminion servicenow.non_structured_query sys_computer role=web type=computer
salt.modules.servicenow.set_change_request_state(change_id, state='approved') Set the approval state of a change request/record
• change_id (str) -- The ID of the change request, e.g. CHG123545
• state (str) -- The target state, e.g. approved
salt myminion servicenow.set_change_request_state CHG000123 declined salt myminion servicenow.set_change_request_state CHG000123 approved
salt.modules.servicenow.update_record_field(table, sys_id, field, value) Update the value of a record's field in a servicenow table
• field (str) -- The new value
• value (str) -- The new value
salt myminion servicenow.update_record_field sys_user 2348234 first_name jimmy
salt.modules.slack_notify Module for sending messages to Slack
slack: api_key: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.modules.slack_notify.call_hook(message, attachment=None, color='good', short=False, identifier=None, channel=None, username=None, icon_emoji=None) Send message to Slack incoming webhook.
• message -- The topic of message.
• attachment -- The message to send to the Slack WebHook.
• color -- The color of border of left side
• short -- An optional flag indicating whether the value is short enough to be displayed side-by-side with other values.
• identifier -- The identifier of WebHook.
• channel -- The channel to use instead of the WebHook default.
• username -- Username to use instead of WebHook default.
• icon_emoji -- Icon to use instead of WebHook default.
salt '*' slack.call_hook message='Hello, from SaltStack'
salt.modules.slack_notify.find_room(name, api_key=None) Find a room by name and return it.
• name -- The room name.
• api_key -- The Slack admin api key.
Returns The room object.
salt '*' slack.find_room name="random"
salt '*' slack.find_room name="random" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.modules.slack_notify.find_user(name, api_key=None) Find a user by name and return it.
• name -- The user name.
Returns The user object.
salt '*' slack.find_user name="ThomasHatch"
salt '*' slack.find_user name="ThomasHatch" api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.modules.slack_notify.list_rooms(api_key=None) List all Slack rooms.
Parameters api_key -- The Slack admin api key.
Returns The room list.
salt '*' slack.list_rooms
salt '*' slack.list_rooms api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.modules.slack_notify.list_users(api_key=None) List all Slack users.
salt '*' slack.list_users
salt '*' slack.list_users api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.modules.slack_notify.post_message(channel, message, from_name, api_key=None, icon=None, attachments=None, blocks=None) Send a message to a Slack channel.
Changed in version 3003: Added attachments and blocks kwargs
• message -- The message to send to the Slack channel.
• from_name -- Specify who the message is from.
• api_key -- The Slack api key, if not specified in the configuration.
• icon -- URL to an image to use as the icon for this message
• attachments -- Any attachments to be sent with the message.
• blocks -- Any blocks to be sent with the message.
salt '*' slack.post_message channel="Development Room" message="Build is done" from_name="Build Server"
salt.modules.slackware_service The service module for Slackware
salt.modules.slackware_service.available(name) Returns True if the specified service is available, otherwise returns False.
salt.modules.slackware_service.disable(name, **kwargs) Disable the named service to start at boot
salt.modules.slackware_service.disabled(name) Return True if the named service is enabled, false otherwise
salt.modules.slackware_service.enable(name, **kwargs) Enable the named service to start at boot
salt.modules.slackware_service.enabled(name, **kwargs) Return True if the named service is enabled, false otherwise
salt.modules.slackware_service.force_reload(name) Force-reload the named service
salt.modules.slackware_service.get_all() Return all available boot services
salt.modules.slackware_service.get_disabled() Return a set of services that are installed but disabled
salt.modules.slackware_service.get_enabled() Return a list of service that are enabled on boot
salt.modules.slackware_service.missing(name) The inverse of service.available.  Returns True if the specified service is not available, otherwise returns False.
salt.modules.slackware_service.reload_(name) Reload the named service
salt.modules.slackware_service.restart(name) Restart the named service
salt.modules.slackware_service.start(name) Start the specified service
salt.modules.slackware_service.status(name, sig=None) Return the status for a service.  If the name contains globbing, a dict mapping service name to True/False values is returned.
salt.modules.slackware_service.stop(name) Stop the specified service
salt.modules.slsutil Utility functions for use with or in SLS files
salt.modules.slsutil.banner(width=72, commentchar='#', borderchar='#', blockstart=None, blockend=None, title=None, text=None, newline=False) Create a standardized comment block to include in a templated file.
A common technique in configuration management is to include a comment block in managed files, warning users not to modify the file. This function simplifies and standardizes those comment blocks.
• width -- The width, in characters, of the banner. Default is 72.
• commentchar -- The character to be used in the starting position of each line. This value should be set to a valid line comment character for the syntax of the file in which the banner is being inserted.  Multiple character sequences, like '//' are supported.  If the file's syntax does not support line comments (such as XML), use the blockstart and blockend options.
• borderchar -- The character to use in the top and bottom border of the comment box. Must be a single character.
• blockstart -- The character sequence to use at the beginning of a block comment. Should be used in conjunction with blockend
• blockend -- The character sequence to use at the end of a block comment. Should be used in conjunction with blockstart
• title -- The first field of the comment block. This field appears centered at the top of the box.
• text -- The second filed of the comment block. This field appears left-justified at the bottom of the box.
• newline -- Boolean value to indicate whether the comment block should end with a newline. Default is False.
Example 1 - the default banner:
{{ salt['slsutil.banner']() }}
######################################################################## #                                                                      # #              THIS FILE IS MANAGED BY SALT - DO NOT EDIT              # #                                                                      # # The contents of this file are managed by Salt. Any changes to this   # # file may be overwritten automatically and without warning.           # ########################################################################
Example 2 - a Javadoc-style banner:
{{ salt['slsutil.banner'](commentchar=' *', borderchar='*', blockstart='/**', blockend=' */') }}
/** *********************************************************************** *                                                                     * *              THIS FILE IS MANAGED BY SALT - DO NOT EDIT             * *                                                                     * * The contents of this file are managed by Salt. Any changes to this  * * file may be overwritten automatically and without warning.          * *********************************************************************** */
Example 3 - custom text:
{{ set copyright='This file may not be copied or distributed without permission of SaltStack, Inc.' }} {{ salt['slsutil.banner'](title='Copyright 2019 SaltStack, Inc.', text=copyright, width=60) }}
############################################################ #                                                          # #              Copyright 2019 SaltStack, Inc.              # #                                                          # # This file may not be copied or distributed without       # # permission of SaltStack, Inc.                            # ############################################################
salt.modules.slsutil.boolstr(value, true='true', false='false') Convert a boolean value into a string. This function is intended to be used from within file templates to provide an easy way to take boolean values stored in Pillars or Grains, and write them out in the appropriate syntax for a particular file template.
• value -- The boolean value to be converted
• true -- The value to return if value is True
• false -- The value to return if value is False
In this example, a pillar named smtp:encrypted stores a boolean value, but the template that uses that value needs yes or no to be written, based on the boolean value.
Note: this is written on two lines for clarity. The same result could be achieved in one line.
{% set encrypted = salt[pillar.get]('smtp:encrypted', false) %} use_tls: {{ salt['slsutil.boolstr'](encrypted, 'yes', 'no') }}
Result (assuming the value is True):
use_tls: yes
salt.modules.slsutil.deserialize(serializer, stream_or_string, **mod_kwargs) Deserialize a Python object using one of the available all-salt.serializers.
salt '*' slsutil.deserialize 'json' '{"foo": "Foo!"}' salt '*' --no-parse=stream_or_string slsutil.deserialize 'json' \ stream_or_string='{"foo": "Foo!"}'
Jinja Example:
{% set python_object = salt.slsutil.deserialize('json', '{"foo": "Foo!"}') %}
salt.modules.slsutil.dir_exists(path, saltenv='base') Return True if a directory exists in the state tree, False otherwise.
• path (str) -- The fully qualified path to a directory in the state tree.
• saltenv (str) -- The fileserver environment to search. Default: base
salt '*' slsutil.dir_exists nginx/files
salt.modules.slsutil.file_exists(path, saltenv='base') Return True if a file exists in the state tree, False otherwise.
• path (str) -- The fully qualified path to a file in the state tree.
salt '*' slsutil.file_exists nginx/defaults.yaml
salt.modules.slsutil.findup(startpath, filenames, saltenv='base') Find the first path matching a filename or list of filenames in a specified directory or the nearest ancestor directory. Returns the full path to the first file found.
• startpath (str) -- The fileserver path from which to begin the search.  An empty string refers to the state tree root.
• filenames -- A filename or list of filenames to search for. Searching for directory names is also supported.
Example: return the path to defaults.yaml, walking up the tree from the state file currently being processed.
{{ salt["slsutil.findup"](tplfile, "defaults.yaml") }}
salt '*' slsutil.findup formulas/shared/nginx map.jinja
salt.modules.slsutil.merge(obj_a, obj_b, strategy='smart', renderer='yaml', merge_lists=False) Merge a data structure into another by choosing a merge strategy
Strategies:
• aggregate
• overwrite
• recurse
• smart
salt '*' slsutil.merge '{foo: Foo}' '{bar: Bar}'
salt.modules.slsutil.merge_all(lst, strategy='smart', renderer='yaml', merge_lists=False) New in version 2019.2.0.
Merge a list of objects into each other in order
• lst (Iterable) -- List of objects to be merged.
• strategy (String) -- Merge strategy. See utils.dictupdate.
• renderer (String) -- Renderer type. Used to determine strategy when strategy is 'smart'.
• merge_lists (Bool) -- Defines whether to merge embedded object lists.
$ salt-call --output=txt slsutil.merge_all '[{foo: Foo}, {foo: Bar}]' local: {u'foo': u'Bar'}
salt.modules.slsutil.path_exists(path, saltenv='base') Return True if a path exists in the state tree, False otherwise. The path could refer to a file or directory.
• path (str) -- The fully qualified path to a file or directory in the state tree.
salt '*' slsutil.path_exists nginx/defaults.yaml
salt.modules.slsutil.renderer(path=None, string=None, default_renderer='jinja|yaml', **kwargs) Parse a string or file through Salt's renderer system
Changed in version 2018.3.0: Add support for Salt fileserver URIs.
This is an open-ended function and can be used for a variety of tasks. It makes use of Salt's "renderer pipes" system to run a string or file through a pipe of any of the loaded renderer modules.
• path -- The path to a file on Salt's fileserver (any URIs supported by cp.get_url) or on the local file system.
• string -- An inline string to be used as the file to send through the renderer system. Note, not all renderer modules can work with strings; the 'py' renderer requires a file, for example.
• default_renderer -- The renderer pipe to send the file through; this is overridden by a "she-bang" at the top of the file.
• kwargs -- Keyword args to pass to Salt's compile_template() function.
Keep in mind the goal of each renderer when choosing a render-pipe; for example, the Jinja renderer processes a text file and produces a string, however the YAML renderer processes a text file and produces a data structure.
One possible use is to allow writing "map files", as are commonly seen in Salt formulas, but without tying the renderer of the map file to the renderer used in the other sls files. In other words, a map file could use the Python renderer and still be included and used by an sls file that uses the default 'jinja|yaml' renderer.
For example, the two following map files produce identical results but one is written using the normal 'jinja|yaml' and the other is using 'py':
#!jinja|yaml {% set apache = salt.grains.filter_by({ ...normal jinja map file here... }, merge=salt.pillar.get('apache:lookup')) %} {{ apache | yaml() }}
#!py def run(): apache = __salt__.grains.filter_by({ ...normal map here but as a python dict... }, merge=__salt__.pillar.get('apache:lookup')) return apache
Regardless of which of the above map files is used, it can be accessed from any other sls file by calling this function. The following is a usage example in Jinja:
{% set apache = salt.slsutil.renderer('map.sls') %}
salt '*' slsutil.renderer salt://path/to/file salt '*' slsutil.renderer /path/to/file salt '*' slsutil.renderer /path/to/file.jinja default_renderer='jinja' salt '*' slsutil.renderer /path/to/file.sls default_renderer='jinja|yaml' salt '*' slsutil.renderer string='Inline template! {{ saltenv }}' salt '*' slsutil.renderer string='Hello, {{ name }}.' name='world'
salt.modules.slsutil.serialize(serializer, obj, **mod_kwargs) Serialize a Python object using one of the available all-salt.serializers.
salt '*' --no-parse=obj slsutil.serialize 'json' obj="{'foo': 'Foo!'}
{% set json_string = salt.slsutil.serialize('json', {'foo': 'Foo!'}) %}
salt.modules.slsutil.update(dest, upd, recursive_update=True, merge_lists=False) Merge upd recursively into dest
If merge_lists=True, will aggregate list object types instead of replacing. This behavior is only activated when recursive_update=True.
salt '*' slsutil.update '{foo: Foo}' '{bar: Bar}'
salt.modules.smartos_imgadm Module for running imgadm command on SmartOS
salt.modules.smartos_imgadm.avail(search=None, verbose=False) Return a list of available images
search string search keyword
verbose boolean (False) toggle verbose output
salt '*' imgadm.avail [percona] salt '*' imgadm.avail verbose=True
salt.modules.smartos_imgadm.delete(uuid) Remove an installed image
uuid   string Specifies uuid to import
salt '*' imgadm.delete e42f8c84-bbea-11e2-b920-078fab2aab1f
salt.modules.smartos_imgadm.docker_to_uuid(uuid) Get the image uuid from an imported docker image
salt.modules.smartos_imgadm.get(uuid) Return info on an installed image
uuid   string uuid of image
salt '*' imgadm.get e42f8c84-bbea-11e2-b920-078fab2aab1f salt '*' imgadm.get plexinc/pms-docker:plexpass
salt.modules.smartos_imgadm.import_image(uuid, verbose=False) Import an image from the repository
uuid   string uuid to import
salt '*' imgadm.import e42f8c84-bbea-11e2-b920-078fab2aab1f [verbose=True]
salt.modules.smartos_imgadm.list_installed(verbose=False) Return a list of installed images
Changed in version 2019.2.0: Docker images are now also listed
salt '*' imgadm.list salt '*' imgadm.list docker=True salt '*' imgadm.list verbose=True
salt.modules.smartos_imgadm.show(uuid) Show manifest of a given image
salt '*' imgadm.show e42f8c84-bbea-11e2-b920-078fab2aab1f salt '*' imgadm.show plexinc/pms-docker:plexpass
salt.modules.smartos_imgadm.source_add(source, source_type='imgapi') Add a new source
source string source url to add
source_trype string (imgapi) source type, either imgapi or docker
salt '*' imgadm.source_add https://updates.joyent.com salt '*' imgadm.source_add https://docker.io docker
salt.modules.smartos_imgadm.source_delete(source) Delete a source
source string source url to delete
salt '*' imgadm.source_delete https://updates.joyent.com
salt.modules.smartos_imgadm.sources(verbose=False) Return a list of available sources
salt '*' imgadm.sources
salt.modules.smartos_imgadm.update_installed(uuid='') Gather info on unknown image(s) (locally installed)
uuid   string optional uuid of image
salt '*' imgadm.update [uuid]
salt.modules.smartos_imgadm.vacuum(verbose=False) Remove unused images
salt '*' imgadm.vacuum [verbose=True]
salt.modules.smartos_imgadm.version() Return imgadm version
salt '*' imgadm.version
salt.modules.smartos_nictagadm Module for running nictagadm command on SmartOS :maintainer:    Jorge Schrauwen <sjorge@blackdot.be> :maturity:      new :depends: nictagadm binary, dladm binary :platform:      smartos
salt.modules.smartos_nictagadm.add(name, mac, mtu=1500) Add a new nictag
name   string name of new nictag
mac    string mac of parent interface or 'etherstub' to create a ether stub
mtu    int MTU (ignored for etherstubs)
salt '*' nictagadm.add storage0 etherstub salt '*' nictagadm.add trunk0 'DE:AD:OO:OO:BE:EF' 9000
salt.modules.smartos_nictagadm.delete(name, force=False) Delete nictag
name   string nictag to delete
force  boolean force delete even if vms attached
salt '*' nictagadm.exists admin
salt.modules.smartos_nictagadm.exists(*nictag, **kwargs) Check if nictags exists
nictag string one or more nictags to check
verbose boolean return list of nictags
salt.modules.smartos_nictagadm.list_nictags(include_etherstubs=True) List all nictags
include_etherstubs boolean toggle include of etherstubs
salt '*' nictagadm.list
salt.modules.smartos_nictagadm.update(name, mac=None, mtu=None) Update a nictag
name   string name of nictag
mac    string optional new mac for nictag
mtu    int optional new MTU for nictag
salt '*' nictagadm.update trunk mtu=9000
salt.modules.smartos_nictagadm.vms(nictag) List all vms connect to nictag
nictag string name of nictag
salt '*' nictagadm.vms admin
salt.modules.smartos_virt virst compatibility module for managing VMs on SmartOS
salt.modules.smartos_virt.get_macs(domain) Return a list off MAC addresses from the named VM
salt '*' virt.get_macs <domain>
salt.modules.smartos_virt.init(**kwargs) Initialize a new VM
salt '*' virt.init image_uuid='...' alias='...' [...]
salt.modules.smartos_virt.list_active_vms() Return a list of uuids for active virtual machine on the minion
salt '*' virt.list_active_vms
salt.modules.smartos_virt.list_domains() Return a list of virtual machine names on the minion
salt '*' virt.list_domains
salt.modules.smartos_virt.list_inactive_vms() Return a list of uuids for inactive virtual machine on the minion
salt '*' virt.list_inactive_vms
salt.modules.smartos_virt.reboot(domain) Reboot a domain via ACPI request
salt '*' virt.reboot <domain>
salt.modules.smartos_virt.setmem(domain, memory) Change the amount of memory allocated to VM.  <memory> is to be specified in MB.
Note for KVM : this would require a restart of the VM.
salt '*' virt.setmem <domain> 512
salt.modules.smartos_virt.shutdown(domain) Send a soft shutdown signal to the named vm
salt '*' virt.shutdown <domain>
salt.modules.smartos_virt.start(domain) Start a defined domain
salt '*' virt.start <domain>
salt.modules.smartos_virt.stop(domain) Hard power down the virtual machine, this is equivalent to powering off the hardware.
salt '*' virt.destroy <domain>
salt.modules.smartos_virt.vm_info(domain) Return a dict with information about the specified VM on this CN
salt '*' virt.vm_info <domain>
salt.modules.smartos_virt.vm_virt_type(domain) Return VM virtualization type : OS or KVM
salt '*' virt.vm_virt_type <domain>
salt.modules.smartos_vmadm Module for running vmadm command on SmartOS
salt.modules.smartos_vmadm.create(from_file=None, **kwargs) Create a new vm
from_file string json file to create the vm from -- if present, all other options will be ignored
kwargs string|int|...  options to set for the vm
salt '*' vmadm.create from_file=/tmp/new_vm.json salt '*' vmadm.create image_uuid='...' alias='...' nics='[{ "nic_tag": "admin", "ip": "198.51.100.123", ...}, {...}]' [...]
salt.modules.smartos_vmadm.create_snapshot(vm, name, key='uuid') Create snapshot of a vm
vm     string vm to be targeted
name   string.INDENT 7.0
snapshot name The snapname must be 64 characters or less and must only contain alphanumeric characters and characters in the set [-_.:%] to comply with ZFS restrictions.
key    string [uuid|alias|hostname] value type of 'vm' parameter
salt '*' vmadm.create_snapshot 186da9ab-7392-4f55-91a5-b8f1fe770543 baseline salt '*' vmadm.create_snapshot nacl baseline key=alias
salt.modules.smartos_vmadm.delete(vm, key='uuid') Delete a vm
vm     string vm to be deleted
salt '*' vmadm.delete 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.delete nacl key=alias
salt.modules.smartos_vmadm.delete_snapshot(vm, name, key='uuid') Delete snapshot of a vm
salt '*' vmadm.delete_snapshot 186da9ab-7392-4f55-91a5-b8f1fe770543 baseline salt '*' vmadm.delete_snapshot nacl baseline key=alias
salt.modules.smartos_vmadm.get(vm, key='uuid') Output the JSON object describing a VM
salt '*' vmadm.get 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.get nacl key=alias
salt.modules.smartos_vmadm.info(vm, info_type='all', key='uuid') Lookup info on running kvm
info_type string [all|block|blockstats|chardev|cpus|kvm|pci|spice|version|vnc] info type to return
salt '*' vmadm.info 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.info 186da9ab-7392-4f55-91a5-b8f1fe770543 vnc salt '*' vmadm.info nacl key=alias salt '*' vmadm.info nacl vnc key=alias
salt.modules.smartos_vmadm.list_vms(search=None, sort=None, order='uuid,type,ram,state,alias', keyed=True) Return a list of VMs
search string vmadm filter property
sort   string vmadm sort (-s) property
order  string vmadm order (-o) property -- Default: uuid,type,ram,state,alias
keyed  boolean.INDENT 7.0
specified if the output should be an array (False) or dict (True) For a dict the key is the first item from the order parameter.  Note: If key is not unique last vm wins.
salt '*' vmadm.list salt '*' vmadm.list order=alias,ram,cpu_cap sort=-ram,-cpu_cap salt '*' vmadm.list search='type=KVM'
salt.modules.smartos_vmadm.lookup(search=None, order=None, one=False) Return a list of VMs using lookup
one    boolean return only one result (vmadm's -1)
salt '*' vmadm.lookup search='state=running' salt '*' vmadm.lookup search='state=running' order=uuid,alias,hostname salt '*' vmadm.lookup search='alias=nacl' one=True
salt.modules.smartos_vmadm.reboot(vm, force=False, key='uuid') Reboot a vm
vm     string vm to be rebooted
force  boolean force reboot of vm if true
salt '*' vmadm.reboot 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.reboot 186da9ab-7392-4f55-91a5-b8f1fe770543 True salt '*' vmadm.reboot vm=nacl key=alias salt '*' vmadm.reboot vm=nina.example.org key=hostname
salt.modules.smartos_vmadm.receive(uuid, source) Receive a vm from a directory
uuid   string uuid of vm to be received
source string source directory
salt '*' vmadm.receive 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups
salt.modules.smartos_vmadm.reprovision(vm, image, key='uuid') Reprovision a vm
vm     string vm to be reprovisioned
image  string uuid of new image
salt '*' vmadm.reprovision 186da9ab-7392-4f55-91a5-b8f1fe770543 c02a2044-c1bd-11e4-bd8c-dfc1db8b0182 salt '*' vmadm.reprovision nacl c02a2044-c1bd-11e4-bd8c-dfc1db8b0182 key=alias
salt.modules.smartos_vmadm.rollback_snapshot(vm, name, key='uuid') Rollback snapshot of a vm
salt '*' vmadm.rollback_snapshot 186da9ab-7392-4f55-91a5-b8f1fe770543 baseline salt '*' vmadm.rollback_snapshot nacl baseline key=alias
salt.modules.smartos_vmadm.send(vm, target, key='uuid') Send a vm to a directory
vm     string vm to be sent
target string target directory
salt '*' vmadm.send 186da9ab-7392-4f55-91a5-b8f1fe770543 /opt/backups salt '*' vmadm.send vm=nacl target=/opt/backups key=alias
salt.modules.smartos_vmadm.start(vm, options=None, key='uuid') Start a vm
vm     string vm to be started
options string optional additional options
salt '*' vmadm.start 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.start 186da9ab-7392-4f55-91a5-b8f1fe770543 'order=c,once=d cdrom=/path/to/image.iso,ide' salt '*' vmadm.start vm=nacl key=alias salt '*' vmadm.start vm=nina.example.org key=hostname
salt.modules.smartos_vmadm.stop(vm, force=False, key='uuid') Stop a vm
vm     string vm to be stopped
force  boolean force stop of vm if true
salt '*' vmadm.stop 186da9ab-7392-4f55-91a5-b8f1fe770543 salt '*' vmadm.stop 186da9ab-7392-4f55-91a5-b8f1fe770543 True salt '*' vmadm.stop vm=nacl key=alias salt '*' vmadm.stop vm=nina.example.org key=hostname
salt.modules.smartos_vmadm.sysrq(vm, action='nmi', key='uuid') Send non-maskable interrupt to vm or capture a screenshot
action string nmi or screenshot -- Default: nmi
salt '*' vmadm.sysrq 186da9ab-7392-4f55-91a5-b8f1fe770543 nmi salt '*' vmadm.sysrq 186da9ab-7392-4f55-91a5-b8f1fe770543 screenshot salt '*' vmadm.sysrq nacl nmi key=alias
salt.modules.smartos_vmadm.update(vm, from_file=None, key='uuid', **kwargs) Update a new vm
vm     string vm to be updated
from_file string json file to update the vm with -- if present, all other options will be ignored
kwargs string|int|...  options to update for the vm
salt '*' vmadm.update vm=186da9ab-7392-4f55-91a5-b8f1fe770543 from_file=/tmp/new_vm.json salt '*' vmadm.update vm=nacl key=alias from_file=/tmp/new_vm.json salt '*' vmadm.update vm=186da9ab-7392-4f55-91a5-b8f1fe770543 max_physical_memory=1024
salt.modules.smbios Interface to SMBIOS/DMI
(Parsing through dmidecode)
External References Desktop Management Interface (DMI) System Management BIOS DMIdecode
salt.modules.smbios.get(string, clean=True) Get an individual DMI string from SMBIOS info
The string to fetch. DMIdecode supports:
• bios-vendor
• bios-version
• bios-release-date
• system-manufacturer
• system-product-name
• system-version
• system-serial-number
• system-uuid
• baseboard-manufacturer
• baseboard-product-name
• baseboard-version
• baseboard-serial-number
• baseboard-asset-tag
• chassis-manufacturer
• chassis-type
• chassis-version
• chassis-serial-number
• chassis-asset-tag
• processor-family
• processor-manufacturer
• processor-version
• processor-frequency
clean Don't return well-known false information (invalid UUID's, serial 000000000's, etcetera) Defaults to True
salt '*' smbios.get system-uuid clean=False
salt.modules.smbios.records(rec_type=None, fields=None, clean=True) Return DMI records from SMBIOS
type   Return only records of type(s) The SMBIOS specification defines the following DMI types:
salt '*' smbios.records clean=False salt '*' smbios.records 14 salt '*' smbios.records 4 core_count,thread_count,current_speed
salt.modules.smf_service Service support for Solaris 10 and 11, should work with other systems that use SMF also. (e.g. SmartOS)
salt.modules.smf_service.available(name) Returns True if the specified service is available, otherwise returns False.
We look up the name with the svcs command to get back the FMRI This allows users to use simpler service names
salt '*' service.available net-snmp
salt.modules.smf_service.disable(name, **kwargs) Disable the named service to start at boot
salt.modules.smf_service.disabled(name) Check to see if the named service is disabled to start on boot
salt.modules.smf_service.enable(name, **kwargs) Enable the named service to start at boot
salt.modules.smf_service.enabled(name, **kwargs) Check to see if the named service is enabled to start on boot
salt.modules.smf_service.get_all() Return all installed services
salt.modules.smf_service.get_disabled() Return the disabled services
salt.modules.smf_service.get_enabled() Return the enabled services
salt.modules.smf_service.get_running() Return the running services
salt '*' service.get_running
salt.modules.smf_service.get_stopped() Return the stopped services
salt '*' service.get_stopped
salt.modules.smf_service.missing(name) The inverse of service.available.  Returns True if the specified service is not available, otherwise returns False.
salt '*' service.missing net-snmp
salt.modules.smf_service.reload_(name) Reload the named service
salt.modules.smf_service.restart(name) Restart the named service
salt.modules.smf_service.start(name) Start the specified service
salt.modules.smf_service.status(name, sig=None) Return the status for a service.  If the name contains globbing, a dict mapping service name to True/False values is returned.
salt.modules.smf_service.stop(name) Stop the specified service
salt.modules.smtp Module for Sending Messages via SMTP
• smtplib python module
configuration This module can be used by either passing a jid and password directly to send_message, or by specifying the name of a configuration profile in the minion config, minion pillar, or master config.
my-smtp-login: smtp.server: smtp.domain.com smtp.tls: True smtp.sender: admin@domain.com smtp.username: myuser smtp.password: verybadpass
The resourcename refers to the resource that is using this account. It is user-definable, and optional. The following configurations are both valid:
another-smtp-login: smtp.server: smtp.domain.com smtp.tls: True smtp.sender: admin@domain.com smtp.username: myuser smtp.password: verybadpass
salt.modules.smtp.send_msg(recipient, message, subject='Message from Salt', sender=None, server=None, use_ssl='True', username=None, password=None, profile=None, attachments=None) Send a message to an SMTP recipient. To send a message to multiple recipients, the recipients should be in a comma-seperated Python string.     Designed for use in states.
salt '*' smtp.send_msg 'admin@example.com' 'This is a salt module test' profile='my-smtp-account' salt '*' smtp.send_msg 'admin@example.com,admin2@example.com' 'This is a salt module test for multiple recipients' profile='my-smtp-account' salt '*' smtp.send_msg 'admin@example.com' 'This is a salt module test' username='myuser' password='verybadpass' sender='admin@example.com' server='smtp.domain.com' salt '*' smtp.send_msg 'admin@example.com' 'This is a salt module test' username='myuser' password='verybadpass' sender='admin@example.com' server='smtp.domain.com' attachments="['/var/log/messages']"
salt.modules.snapper Module to manage filesystem snapshots with snapper
codeauthor Duncan Mac-Vicar P. <dmacvicar@suse.de>
codeauthor Pablo Suárez Hernández <psuarezhernandez@suse.de>
depends dbus Python module.
depends snapper http://snapper.io, available in most distros
salt.modules.snapper.changed_files(config='root', num_pre=None, num_post=None) Returns the files changed between two snapshots
config Configuration name.
num_pre first snapshot ID to compare. Default is last snapshot
num_post last snapshot ID to compare. Default is 0 (current state)
salt '*' snapper.changed_files salt '*' snapper.changed_files num_pre=19 num_post=20
salt.modules.snapper.create_baseline(tag='baseline', config='root') Creates a snapshot marked as baseline
tag    Tag name for the baseline
salt '*' snapper.create_baseline salt '*' snapper.create_baseline my_custom_baseline
salt.modules.snapper.create_config(name=None, subvolume=None, fstype=None, template=None, extra_opts=None) Creates a new Snapper configuration
name   Name of the new Snapper configuration.
subvolume Path to the related subvolume.
fstype Filesystem type of the subvolume.
template Configuration template to use. (Default: default)
extra_opts Extra Snapper configuration opts dictionary. It will override the values provided by the given template (if any).
salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs template="default" salt '*' snapper.create_config name=myconfig subvolume=/foo/bar/ fstype=btrfs extra_opts='{"NUMBER_CLEANUP": False}'
salt.modules.snapper.create_snapshot(config='root', snapshot_type='single', pre_number=None, description=None, cleanup_algorithm='number', userdata=None, **kwargs) Creates an snapshot
snapshot_type Specifies the type of the new snapshot. Possible values are single, pre and post.
pre_number For post snapshots the number of the pre snapshot must be provided.
description Description for the snapshot. If not given, the salt job will be used.
cleanup_algorithm Set the cleanup algorithm for the snapshot.
userdata Set userdata for the snapshot (key-value pairs).
Returns the number of the created snapshot.
salt '*' snapper.create_snapshot
salt.modules.snapper.delete_snapshot(snapshots_ids=None, config='root') Deletes an snapshot
config Configuration name. (Default: root)
snapshots_ids List of the snapshots IDs to be deleted.
salt '*' snapper.delete_snapshot 54 salt '*' snapper.delete_snapshot config=root 54 salt '*' snapper.delete_snapshot config=root snapshots_ids=[54,55,56]
salt.modules.snapper.diff(config='root', filename=None, num_pre=None, num_post=None) Returns the differences between two snapshots
filename if not provided the showing differences between snapshots for all "text" files
salt '*' snapper.diff salt '*' snapper.diff filename=/var/log/snapper.log num_pre=19 num_post=20
salt.modules.snapper.diff_jid(jid, config='root') Returns the changes applied by a jid
jid    The job id to lookup
salt '*' snapper.diff_jid jid=20160607130930720112
salt.modules.snapper.get_config(name='root') Retrieves all values from a given configuration
salt '*' snapper.get_config
salt.modules.snapper.get_snapshot(number=0, config='root') Get detailed information about a given snapshot
salt '*' snapper.get_snapshot 1
salt.modules.snapper.list_configs() List all available configs
salt '*' snapper.list_configs
salt.modules.snapper.list_snapshots(config='root') List available snapshots
salt '*' snapper.list_snapshots config=myconfig
salt.modules.snapper.modify_snapshot(snapshot_id=None, description=None, userdata=None, cleanup=None, config='root') Modify attributes of an existing snapshot.
snapshot_id ID of the snapshot to be modified.
cleanup Change the cleanup method of the snapshot. (str)
description Change the description of the snapshot. (str)
userdata Change the userdata dictionary of the snapshot. (dict)
salt '*' snapper.modify_snapshot 54 description="my snapshot description" salt '*' snapper.modify_snapshot 54 description="my snapshot description" salt '*' snapper.modify_snapshot 54 userdata='{"foo": "bar"}' salt '*' snapper.modify_snapshot snapshot_id=54 cleanup="number"
salt.modules.snapper.run(function, *args, **kwargs) Runs a function from an execution module creating pre and post snapshots and associating the salt job id with those snapshots for easy undo and cleanup.
function Salt function to call.
config Configuration name. (default: "root")
description A description for the snapshots. (default: None)
userdata Data to include in the snapshot metadata. (default: None)
cleanup_algorithm Snapper cleanup algorithm. (default: "number")
*args  args for the function to call. (default: None)
**kwargs kwargs for the function to call (default: None)
This  would run append text to /etc/motd using the file.append module, and will create two snapshots, pre and post with the associated metadata. The jid will be available as salt_jid in the userdata of the snapshot.
You can immediately see the changes
salt '*' snapper.run file.append args='["/etc/motd", "some text"]'
salt.modules.snapper.set_config(name='root', **kwargs) Set configuration values
salt '*' snapper.set_config SYNC_ACL=True
Keys are case insensitive as they will be always uppercased to snapper convention. The above example is equivalent to:
salt '*' snapper.set_config sync_acl=True
salt.modules.snapper.status(config='root', num_pre=None, num_post=None) Returns a comparison between two snapshots
salt '*' snapper.status salt '*' snapper.status num_pre=19 num_post=20
salt.modules.snapper.status_to_string(dbus_status) Converts a numeric dbus snapper status into a string
salt '*' snapper.status_to_string <dbus_status>
salt.modules.snapper.undo(config='root', files=None, num_pre=None, num_post=None) Undo all file changes that happened between num_pre and num_post, leaving the files into the state of num_pre.
WARNING: If one of the files has changes after num_post, they will be overwritten The snapshots are used to determine the file list, but the current version of the files will be overwritten by the versions in num_pre.
You to undo changes between num_pre and the current version of the files use num_post=0.
salt '*' snapper.undo
salt.modules.snapper.undo_jid(jid, config='root') Undo the changes applied by a salt job
salt '*' snapper.undo_jid jid=20160607130930720112
salt.modules.solaris_fmadm Module for running fmadm and fmdump on Solaris
platform solaris,illumos
salt.modules.solaris_fmadm.acquit(fmri) Acquit resource or acquit case
fmri: string fmri or uuid
salt '*' fmadm.acquit fmri | uuid
salt.modules.solaris_fmadm.config() Display fault manager configuration
salt '*' fmadm.config
salt.modules.solaris_fmadm.faulty() Display list of faulty resources
salt '*' fmadm.faulty
salt.modules.solaris_fmadm.flush(fmri) Flush cached state for resource
fmri: string fmri
salt '*' fmadm.flush fmri
salt.modules.solaris_fmadm.healthy() Return whether fmadm is reporting faults
salt '*' fmadm.healthy
salt.modules.solaris_fmadm.list_records(after=None, before=None) Display fault management logs
after  string filter events after time, see man fmdump for format
before string filter events before time, see man fmdump for format
salt '*' fmadm.list
salt.modules.solaris_fmadm.load(path) Load specified fault manager module
path: string path of fault manager module
salt '*' fmadm.load /module/path
salt.modules.solaris_fmadm.repaired(fmri) Notify fault manager that resource has been repaired
salt '*' fmadm.repaired fmri
salt.modules.solaris_fmadm.replaced(fmri) Notify fault manager that resource has been replaced
salt.modules.solaris_fmadm.reset(module, serd=None) Reset module or sub-component
module: string module to unload
serd   string serd sub module
salt '*' fmadm.reset software-response
salt.modules.solaris_fmadm.show(uuid) Display log details
uuid: string uuid of fault
salt '*' fmadm.show 11b4070f-4358-62fa-9e1e-998f485977e1
salt.modules.solaris_fmadm.unload(module) Unload specified fault manager module
salt '*' fmadm.unload software-response
salt.modules.solaris_group Manage groups on Solaris
salt.modules.solaris_group.add(name, gid=None, **kwargs) Add the specified group
salt.modules.solaris_group.chgid(name, gid) Change the gid for a named group
salt.modules.solaris_group.delete(name) Remove the named group
salt.modules.solaris_group.getent(refresh=False) Return info on all groups
salt.modules.solaris_group.info(name) Return information about a group
salt.modules.solaris_shadow Manage the password database on Solaris systems
salt.modules.solaris_shadow.default_hash() Returns the default hash used for unset passwords
salt.modules.solaris_shadow.del_password(name) New in version 2015.8.8.
salt.modules.solaris_shadow.gen_password(password, crypt_salt=None, algorithm='sha512') New in version 2015.8.8.
salt.modules.solaris_shadow.info(name) Return information for the specified user
salt.modules.solaris_shadow.set_maxdays(name, maxdays) Set the maximum number of days during which a password is valid. See man passwd.
salt.modules.solaris_shadow.set_mindays(name, mindays) Set the minimum number of days between password changes. See man passwd.
salt.modules.solaris_shadow.set_password(name, password) Set the password for a named user. The password must be a properly defined hash, the password hash can be generated with this command: openssl passwd -1 <plaintext password>
salt '*' shadow.set_password root $1$UYCIxa628.9qXjpQCjM4a..
salt.modules.solaris_shadow.set_warndays(name, warndays) Set the number of days of warning before a password change is required.  See man passwd.
salt.modules.solaris_system Support for reboot, shutdown, etc
This module is assumes we are using solaris-like shutdown
salt.modules.solaris_system.halt() Halt a running system
salt '*' system.halt
salt.modules.solaris_system.init(state) Change the system runlevel on sysV compatible systems
state  string Init state
salt '*' system.init 3
salt.modules.solaris_system.poweroff() Poweroff a running system
salt '*' system.poweroff
salt.modules.solaris_system.reboot(delay=0, message=None) Reboot the system
delay  int Optional wait time in seconds before the system will be rebooted.
message string Optional message to broadcast before rebooting.
salt '*' system.reboot salt '*' system.reboot 60 "=== system upgraded ==="
salt.modules.solaris_system.shutdown(delay=0, message=None) Shutdown a running system
delay  int Optional wait time in seconds before the system will be shutdown.
salt '*' system.shutdown salt '*' system.shutdown 60 "=== disk replacement ==="
salt.modules.solaris_user Manage users with the useradd command
salt.modules.solaris_user.add(name, uid=None, gid=None, groups=None, home=None, shell=None, unique=True, fullname='', roomnumber='', workphone='', homephone='', createhome=True, **kwargs) Add a user to the minion
salt.modules.solaris_user.chfullname(name, fullname) Change the user's Full Name
salt.modules.solaris_user.chgid(name, gid) Change the default group of the user
salt.modules.solaris_user.chgroups(name, groups, append=False) Change the groups to which a user belongs
salt.modules.solaris_user.chhome(name, home, persist=False) Set a new home directory for an existing user
salt.modules.solaris_user.chhomephone(name, homephone) Change the user's Home Phone
salt.modules.solaris_user.chroomnumber(name, roomnumber) Change the user's Room Number
salt.modules.solaris_user.chshell(name, shell) Change the default shell of the user
salt.modules.solaris_user.chuid(name, uid) Change the uid for a named user
salt.modules.solaris_user.chworkphone(name, workphone) Change the user's Work Phone
salt.modules.solaris_user.delete(name, remove=False, force=False) Remove a user from the minion
salt.modules.solaris_user.getent(refresh=False) Return the list of all info for all users
salt.modules.solaris_user.info(name) Return user information
salt.modules.solaris_user.list_groups(name) Return a list of groups the named user belongs to
salt.modules.solaris_user.list_users() Return a list of all users
salt.modules.solaris_user.rename(name, new_name) Change the username for a named user
salt.modules.solarisipspkg IPS pkg support for Solaris
This module provides support for Solaris 11 new package management - IPS (Image Packaging System).  This is the default pkg module for Solaris 11 (and later).
If you want to use also other packaging module (e.g. pkgutil) together with IPS, you need to override the pkg provider in sls for each package:
mypackage: pkg.installed: - provider: pkgutil
Or you can override it globally by setting the providers parameter in your Minion config file like this:
providers: pkg: pkgutil
salt.modules.solarisipspkg.available_version(*names, **kwargs) This function is an alias of latest_version. The available version of packages in the repository.  Accepts full or partial FMRI. Partial FMRI is returned if the full FMRI could not be resolved.
Please use pkg.latest_version as pkg.available_version is being deprecated.
Changed in version 2019.2.0: Support for multiple package names added.
salt '*' pkg.latest_version bash salt '*' pkg.latest_version pkg://solaris/entire salt '*' pkg.latest_version postfix sendmail
salt.modules.solarisipspkg.get_fmri(name, **kwargs) Returns FMRI from partial name. Returns empty string ('') if not found.  In case of multiple match, the function returns list of all matched packages.
salt '*' pkg.get_fmri bash
salt.modules.solarisipspkg.install(name=None, refresh=False, pkgs=None, version=None, test=False, **kwargs) Install the named package using the IPS pkg command.  Accepts full or partial FMRI.
pkgs   A list of packages to install. Must be passed as a python list.
salt '*' pkg.install vim salt '*' pkg.install pkg://solaris/editor/vim salt '*' pkg.install pkg://solaris/editor/vim refresh=True salt '*' pkg.install pkgs='["foo", "bar"]'
salt.modules.solarisipspkg.is_installed(name, **kwargs) Returns True if the package is installed. Otherwise returns False. Name can be full or partial FMRI.  In case of multiple match from partial FMRI name, it returns True.
salt '*' pkg.is_installed bash
salt.modules.solarisipspkg.latest_version(*names, **kwargs) The available version of packages in the repository.  Accepts full or partial FMRI. Partial FMRI is returned if the full FMRI could not be resolved.
salt.modules.solarisipspkg.list_pkgs(versions_as_list=False, **kwargs) List the currently installed packages as a dict:
salt.modules.solarisipspkg.list_upgrades(refresh=True, **kwargs) Lists all packages available for update.
When run in global zone, it reports only upgradable packages for the global zone.