neulab/tldr huggingface dataset:
salt.modules.capirca_acl.get_term_pillar(filter_name, term_name, pillar_key='acl', pillarenv=None, saltenv=None) Helper that can be used inside a state SLS, in order to get the term configuration given its name, under a certain filter uniquely identified by its name.
pillar_key: acl The root key of the whole policy config. Default: acl.
salt.modules.cassandra_cql Cassandra Database Module
This module works with Cassandra v2 and v3 and hence generates queries based on the internal schema of said version.
referenced by Salt's cassandra_cql returner
configuration The Cassandra cluster members and connection port can either be specified in the master or minion config, the minion's pillar or be passed to the module.
Example configuration in the config for a single node:
cassandra: cluster: 192.168.50.10 port: 9000
Example configuration in the config for a cluster:
cassandra: cluster: - 192.168.50.10 - 192.168.50.11 - 192.168.50.12 port: 9000 username: cas_admin
Added support for ssl_options and protocol_version.
Example configuration with ssl options:
If ssl_options are present in cassandra config the cassandra_cql returner will use SSL. SSL isn't used if ssl_options isn't specified.
ssl_options: ca_certs: /etc/ssl/certs/ca-bundle.trust.crt
# SSL version should be one from the ssl module # This is an optional parameter ssl_version: PROTOCOL_TLSv1
Additionally you can also specify the protocol_version to use.
# defaults to 4, if not set protocol_version: 3
salt.modules.cassandra_cql.cql_query(query, contact_points=None, port=None, cql_user=None, cql_pass=None) Run a query on a Cassandra cluster and return a dictionary.
• query (str) -- The query to execute.
• contact_points (str | list[str]) -- The Cassandra cluster addresses, can either be a string or a list of IPs.
• cql_user (str) -- The Cassandra user if authentication is turned on.
• cql_pass (str) -- The Cassandra user password if authentication is turned on.
• port (int) -- The Cassandra cluster port, defaults to None.
• params (str) -- The parameters for the query, optional.
Returns A dictionary from the return values of the query
Return type list[dict]
salt 'cassandra-server' cassandra_cql.cql_query "SELECT * FROM users_by_name WHERE first_name = 'jane'"
salt.modules.cassandra_cql.cql_query_with_prepare(query, statement_name, statement_arguments, asynchronous=False, callback_errors=None, contact_points=None, port=None, cql_user=None, cql_pass=None, **kwargs) Run a query on a Cassandra cluster and return a dictionary.
This function should not be used asynchronously for SELECTs -- it will not return anything and we don't currently have a mechanism for handling a future that will return results.
• statement_name (str) -- Name to assign the prepared statement in the __context__ dictionary
• statement_arguments (list[str]) -- Bind parameters for the SQL statement
• asynchronous (bool) -- Run this query in asynchronous mode
• async (bool) -- Run this query in asynchronous mode (an alias to 'asynchronous') NOTE: currently it overrides 'asynchronous' and it will be dropped in version 3001!
• callback_errors (Function callable) -- Function to call after query runs if there is an error
# Insert data asynchronously salt this-node cassandra_cql.cql_query_with_prepare "name_insert" "INSERT INTO USERS (first_name, last_name) VALUES (?, ?)"             statement_arguments=['John','Doe'], asynchronous=True
# Select data, should not be asynchronous because there is not currently a facility to return data from a future salt this-node cassandra_cql.cql_query_with_prepare "name_select" "SELECT * FROM USERS WHERE first_name=?"             statement_arguments=['John']
salt.modules.cassandra_cql.create_keyspace(keyspace, replication_strategy='SimpleStrategy', replication_factor=1, replication_datacenters=None, contact_points=None, port=None, cql_user=None, cql_pass=None) Create a new keyspace in Cassandra.
• keyspace (str) -- The keyspace name
• replication_strategy (str) -- either SimpleStrategy or NetworkTopologyStrategy
• replication_factor (int) -- number of replicas of data on multiple nodes. not used if using NetworkTopologyStrategy
• replication_datacenters (str | dict[str, int]) -- string or dict of datacenter names to replication factors, required if using NetworkTopologyStrategy (will be a dict if coming from state file).
Returns The info for the keyspace or False if it does not exist.
# CLI Example: salt 'minion1' cassandra_cql.create_keyspace keyspace=newkeyspace
salt 'minion1' cassandra_cql.create_keyspace keyspace=newkeyspace replication_strategy=NetworkTopologyStrategy         replication_datacenters='{"datacenter_1": 3, "datacenter_2": 2}'
salt.modules.cassandra_cql.create_user(username, password, superuser=False, contact_points=None, port=None, cql_user=None, cql_pass=None) Create a new cassandra user with credentials and superuser status.
• username (str) -- The name of the new user.
• password (str) -- The password of the new user.
• superuser (bool) -- Is the new user going to be a superuser? default: False
salt 'minion1' cassandra_cql.create_user username=joe password=secret
salt 'minion1' cassandra_cql.create_user username=joe password=secret superuser=True
salt 'minion1' cassandra_cql.create_user username=joe password=secret superuser=True contact_points=minion1
salt.modules.cassandra_cql.drop_keyspace(keyspace, contact_points=None, port=None, cql_user=None, cql_pass=None) Drop a keyspace if it exists in a Cassandra cluster.
• keyspace (str) -- The keyspace to drop.
salt 'minion1' cassandra_cql.drop_keyspace keyspace=test
salt 'minion1' cassandra_cql.drop_keyspace keyspace=test contact_points=minion1
salt.modules.cassandra_cql.grant_permission(username, resource=None, resource_type='keyspace', permission=None, contact_points=None, port=None, cql_user=None, cql_pass=None) Grant permissions to a user.
• username (str) -- The name of the user to grant permissions to.
• resource (str) -- The resource (keyspace or table), if None, permissions for all resources are granted.
• resource_type (str) -- The resource_type (keyspace or table), defaults to 'keyspace'.
• permission (str) -- A permission name (e.g. select), if None, all permissions are granted.
salt 'minion1' cassandra_cql.grant_permission
salt 'minion1' cassandra_cql.grant_permission username=joe resource=test_keyspace permission=select
salt 'minion1' cassandra_cql.grant_permission username=joe resource=test_table resource_type=table         permission=select contact_points=minion1
salt.modules.cassandra_cql.info(contact_points=None, port=None, cql_user=None, cql_pass=None) Show the Cassandra information for this cluster.
Returns The information for this Cassandra cluster.
salt 'minion1' cassandra_cql.info
salt 'minion1' cassandra_cql.info contact_points=minion1
salt.modules.cassandra_cql.keyspace_exists(keyspace, contact_points=None, port=None, cql_user=None, cql_pass=None) Check if a keyspace exists in a Cassandra cluster.
:param keyspace        The keyspace name to check for.  :type keyspace:       str :param contact_points: The Cassandra cluster addresses, can either be a string or a list of IPs.  :type contact_points: str | list[str] :param cql_user:       The Cassandra user if authentication is turned on.  :type  cql_user: str :param cql_pass:       The Cassandra user password if authentication is turned on.  :type  cql_pass:       str :param port:           The Cassandra cluster port, defaults to None. :type  port:           int :return:               The info for the keyspace or False if it does not exist.  :rtype: dict
salt 'minion1' cassandra_cql.keyspace_exists keyspace=system
salt.modules.cassandra_cql.list_column_families(keyspace=None, contact_points=None, port=None, cql_user=None, cql_pass=None) List column families in a Cassandra cluster for all keyspaces or just the provided one.
• keyspace (str) -- The keyspace to provide the column families for, optional.
Returns The column families in this Cassandra cluster.
salt 'minion1' cassandra_cql.list_column_families
salt 'minion1' cassandra_cql.list_column_families contact_points=minion1
salt 'minion1' cassandra_cql.list_column_families keyspace=system
salt.modules.cassandra_cql.list_keyspaces(contact_points=None, port=None, cql_user=None, cql_pass=None) List keyspaces in a Cassandra cluster.
Returns The keyspaces in this Cassandra cluster.
salt 'minion1' cassandra_cql.list_keyspaces
salt 'minion1' cassandra_cql.list_keyspaces contact_points=minion1 port=9000
salt.modules.cassandra_cql.list_permissions(username=None, resource=None, resource_type='keyspace', permission=None, contact_points=None, port=None, cql_user=None, cql_pass=None) List permissions.
• username (str) -- The name of the user to list permissions for.
• resource (str) -- The resource (keyspace or table), if None, permissions for all resources are listed.
• permission (str) -- A permission name (e.g. select), if None, all permissions are listed.
Returns Dictionary of permissions.
salt 'minion1' cassandra_cql.list_permissions
salt 'minion1' cassandra_cql.list_permissions username=joe resource=test_keyspace permission=select
salt 'minion1' cassandra_cql.list_permissions username=joe resource=test_table resource_type=table           permission=select contact_points=minion1
salt.modules.cassandra_cql.list_users(contact_points=None, port=None, cql_user=None, cql_pass=None) List existing users in this Cassandra cluster.
Returns The list of existing users.
salt 'minion1' cassandra_cql.list_users
salt 'minion1' cassandra_cql.list_users contact_points=minion1
salt.modules.cassandra_cql.version(contact_points=None, port=None, cql_user=None, cql_pass=None) Show the Cassandra version.
Returns The version for this Cassandra cluster.
salt 'minion1' cassandra_cql.version
salt 'minion1' cassandra_cql.version contact_points=minion1
salt.modules.cassandra_mod Cassandra NoSQL Database Module
• pycassa Cassandra Python adapter
configuration The location of the 'nodetool' command, host, and thrift port needs to be specified via pillar:
cassandra.nodetool: /usr/local/bin/nodetool cassandra.host: localhost cassandra.thrift_port: 9160
salt.modules.cassandra_mod.column_families(keyspace=None) Return existing column families for all keyspaces or just the provided one.
salt '*' cassandra.column_families salt '*' cassandra.column_families <keyspace>
salt.modules.cassandra_mod.column_family_definition(keyspace, column_family) Return a dictionary of column family definitions for the given keyspace/column_family
salt '*' cassandra.column_family_definition <keyspace> <column_family>
salt.modules.cassandra_mod.compactionstats() Return compactionstats info
salt '*' cassandra.compactionstats
salt.modules.cassandra_mod.info() Return cassandra node info
salt '*' cassandra.info
salt.modules.cassandra_mod.keyspaces() Return existing keyspaces
salt '*' cassandra.keyspaces
salt.modules.cassandra_mod.netstats() Return netstats info
salt '*' cassandra.netstats
salt.modules.cassandra_mod.ring() Return cassandra ring info
salt '*' cassandra.ring
salt.modules.cassandra_mod.tpstats() Return tpstats info
salt '*' cassandra.tpstats
salt.modules.cassandra_mod.version() Return the cassandra version
salt '*' cassandra.version
salt.modules.celery Support for scheduling celery tasks. The worker is independent of salt and thus can run in a different virtualenv or on a different python version, as long as broker, backend and serializer configurations match. Also note that celery and packages required by the celery broker, e.g. redis must be installed to load the salt celery execution module.
NOTE: A new app (and thus new connections) is created for each task execution
salt.modules.celery.run_task(task_name, args=None, kwargs=None, broker=None, backend=None, wait_for_result=False, timeout=None, propagate=True, interval=0.5, no_ack=True, raise_timeout=True, config=None) Execute celery tasks. For celery specific parameters see celery documentation.
salt '*' celery.run_task tasks.sleep args=[4] broker=redis://localhost \ backend=redis://localhost wait_for_result=true
task_name The task name, e.g. tasks.sleep
args   Task arguments as a list
kwargs Task keyword arguments
broker Broker for celeryapp, see celery documentation
backend Result backend for celeryapp, see celery documentation
wait_for_result Wait until task result is read from result backend and return result, Default: False
timeout Timeout waiting for result from celery, see celery AsyncResult.get documentation
propagate Propagate exceptions from celery task, see celery AsyncResult.get documentation, Default: True
interval Interval to check for task result, see celery AsyncResult.get documentation, Default: 0.5
no_ack see celery AsyncResult.get documentation. Default: True
raise_timeout Raise timeout exception if waiting for task result times out. Default: False
config Config dict for celery app, See celery documentation
salt.modules.ceph Module to provide ceph control with salt.
• ceph_cfg Python module
salt.modules.ceph.ceph_version() Get the version of ceph installed
salt '*' ceph.ceph_version
salt.modules.ceph.cluster_quorum(**kwargs) Get the cluster's quorum status
salt '*' ceph.cluster_quorum \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
cluster_uuid The cluster UUID. Defaults to value found in ceph config file.
cluster_name The cluster name. Defaults to ceph.
salt.modules.ceph.cluster_status(**kwargs) Get the cluster status, including health if in quorum
salt '*' ceph.cluster_status \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.keyring_auth_add(**kwargs) Add keyring to authorized list
salt '*' ceph.keyring_auth_add \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
keyring_type (required) One of admin, mon, osd, rgw, mds
salt.modules.ceph.keyring_auth_del(**kwargs) Remove keyring from authorised list
salt '*' ceph.keyring_osd_auth_del \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.keyring_auth_list(**kwargs) List all cephx authorization keys
salt '*' ceph.keyring_auth_list \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.keyring_create(**kwargs) Create keyring for cluster
salt '*' ceph.keyring_create \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.keyring_present(**kwargs) Returns True if the keyring is present on disk, otherwise False
salt '*' ceph.keyring_present \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.keyring_purge(**kwargs) Delete keyring for cluster
salt '*' ceph.keyring_purge \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
If no ceph config file is found, this command will fail.
salt.modules.ceph.keyring_save(**kwargs) Create save keyring locally
salt '*' ceph.keyring_save \ 'keyring_type'='admin' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mds_create(**kwargs) Create a mds
salt '*' ceph.mds_create \ 'name' = 'mds.name' \ 'port' = 1000, \ 'addr' = 'fqdn.example.org' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
name (required) The MDS name (must start with mds.)
port (required) Port to which the MDS will listen
addr (required) Address or IP address for the MDS to listen
salt.modules.ceph.mds_destroy(**kwargs) Remove a mds
salt '*' ceph.mds_destroy \ 'name' = 'mds.name' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mon_active(**kwargs) Returns True if the mon daemon is running, otherwise False
salt '*' ceph.mon_active \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mon_create(**kwargs) Create a mon node
salt '*' ceph.mon_create \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mon_is(**kwargs) Returns True if the target is a mon node, otherwise False
salt '*' ceph.mon_is \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mon_quorum(**kwargs) Returns True if the mon daemon is in the quorum, otherwise False
salt '*' ceph.mon_quorum \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.mon_status(**kwargs) Get status from mon daemon
salt '*' ceph.mon_status \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.osd_activate(**kwargs) Activate an OSD
salt '*' ceph.osd_activate 'osd_dev'='/dev/vdc'
salt.modules.ceph.osd_discover() List all OSD by cluster
salt '*' ceph.osd_discover
salt.modules.ceph.osd_prepare(**kwargs) Prepare an OSD
salt '*' ceph.osd_prepare 'osd_dev'='/dev/vdc' \ 'journal_dev'='device' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid' \ 'osd_fs_type'='xfs' \ 'osd_uuid'='2a143b73-6d85-4389-a9e9-b8a78d9e1e07' \ 'journal_uuid'='4562a5db-ff6f-4268-811d-12fd4a09ae98'
cluster_uuid The device to store the osd data on.
journal_dev The journal device. defaults to osd_dev.
cluster_uuid The cluster date will be added too. Defaults to the value found in local config.
osd_fs_type set the file system to store OSD data with. Defaults to "xfs".
osd_uuid set the OSD data UUID. If set will return if OSD with data UUID already exists.
journal_uuid set the OSD journal UUID. If set will return if OSD with journal UUID already exists.
salt.modules.ceph.partition_is(dev) Check whether a given device path is a partition or a full disk.
salt '*' ceph.partition_is /dev/sdc1
salt.modules.ceph.partition_list() List partitions by disk
salt '*' ceph.partition_list
salt.modules.ceph.partition_list_journal() List all OSD journal partitions by partition
salt '*' ceph.partition_list_journal
salt.modules.ceph.partition_list_osd() List all OSD data partitions by partition
salt '*' ceph.partition_list_osd
salt.modules.ceph.pool_add(pool_name, **kwargs) Create a pool
salt '*' ceph.pool_add pool_name \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
pg_num Default to 8
pgp_num Default to pg_num
pool_type can take values "replicated" or "erasure"
erasure_code_profile The "erasure_code_profile"
crush_ruleset The crush map rule set
salt.modules.ceph.pool_del(pool_name, **kwargs) Delete a pool
salt '*' ceph.pool_del pool_name \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.pool_list(**kwargs) List all pools
salt '*' ceph.pool_list \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.purge(**kwargs) purge ceph configuration on the node
salt '*' ceph.purge \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
salt.modules.ceph.rgw_create(**kwargs) Create a rgw
salt '*' ceph.rgw_create \ 'name' = 'rgw.name' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
name (required) The RGW client name. Must start with rgw.
salt.modules.ceph.rgw_destroy(**kwargs) Remove a rgw
salt '*' ceph.rgw_destroy \ 'name' = 'rgw.name' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
name (required) The RGW client name (must start with rgw.)
salt.modules.ceph.rgw_pools_create(**kwargs) Create pools for rgw
salt '*' ceph.rgw_pools_create
salt.modules.ceph.rgw_pools_missing(**kwargs) Show pools missing for rgw
salt '*' ceph.rgw_pools_missing
salt.modules.ceph.zap(target=None, **kwargs) Destroy the partition table and content of a given disk.
salt '*' ceph.osd_prepare 'dev'='/dev/vdc' \ 'cluster_name'='ceph' \ 'cluster_uuid'='cluster_uuid'
dev    The block device to format.
salt.modules.chassis Glue execution module to link to the fx2 proxymodule.
Depends: iDRAC Remote execution module (salt.modules.dracr)
For documentation on commands that you can direct to a Dell chassis via proxy, look in the documentation for salt.modules.dracr.
This execution module calls through to a function in the fx2 proxy module called chconfig.  That function looks up the function passed in the cmd parameter in salt.modules.dracr and calls it.
salt.modules.chassis.chassis_credentials()
salt.modules.chassis.cmd(cmd, *args, **kwargs)
salt.modules.chef Execute chef in server or solo mode
salt.modules.chef.client(whyrun=False, localmode=False, logfile=None, **kwargs) Execute a chef client run and return a dict with the stderr, stdout, return code, and pid.
salt '*' chef.client server=https://localhost
server The chef server URL
client_key Set the client key file location
config The configuration file to use
config-file-jail Directory under which config files are allowed to be loaded (no client.rb or knife.rb outside this path will be loaded).
environment Set the Chef Environment on the node
group  Group to set privilege to
json-attributes Load attributes from a JSON file or URL
localmode Point chef-client at local repository if True
log_level Set the log level (debug, info, warn, error, fatal)
logfile Set the log file location
node-name The node name for this client
override-runlist Replace current run list with specified items for a single run
pid    Set the PID file location, defaults to /tmp/chef-client.pid
run-lock-timeout Set maximum duration to wait for another client run to finish, default is indefinitely.
runlist Permanently replace current run list with specified items
user   User to set privilege to
validation_key Set the validation key file location, used for registering new clients
whyrun Enable whyrun mode when set to True
salt.modules.chef.solo(whyrun=False, logfile=None, **kwargs) Execute a chef solo run and return a dict with the stderr, stdout, return code, and pid.
salt '*' chef.solo override-runlist=test
recipe-url Pull down a remote gzipped tarball of recipes and untar it to the cookbook cache
salt.modules.chocolatey A dead simple module wrapping calls to the Chocolatey package manager (‐ http://chocolatey.org)
salt.modules.chocolatey.add_source(name, source_location, username=None, password=None) Instructs Chocolatey to add a source.
name   The name of the source to be added as a chocolatey repository.
source Location of the source you want to work with.
username Provide username for chocolatey sources that need authentication credentials.
password Provide password for chocolatey sources that need authentication credentials.
salt '*' chocolatey.add_source <source name> <source_location> salt '*' chocolatey.add_source <source name> <source_location> user=<user> password=<password>
salt.modules.chocolatey.bootstrap(force=False, source=None) Download and install the latest version of the Chocolatey package manager via the official bootstrap.
Chocolatey requires Windows PowerShell and the .NET v4.0 runtime. Depending on the host's version of Windows, chocolatey.bootstrap will attempt to ensure these prerequisites are met by downloading and executing the appropriate installers from Microsoft.
NOTE: If PowerShell is installed, you may have to restart the host machine for Chocolatey to work.
NOTE: If you're installing offline using the source parameter, the PowerShell and .NET requirements must already be met on the target. This shouldn't be a problem on Windows versions 2012/8 and later
• force (bool) -- Run the bootstrap process even if Chocolatey is found in the path.
• source (str) --
The location of the .nupkg file or .ps1 file to run from an alternate location. This can be one of the following types of URLs:
• salt://
• http(s)://
• file:// - A local file on the system
Returns The stdout of the Chocolatey installation script
# To bootstrap Chocolatey salt '*' chocolatey.bootstrap salt '*' chocolatey.bootstrap force=True
# To bootstrap Chocolatey offline from a file on the salt master salt '*' chocolatey.bootstrap source=salt://files/chocolatey.nupkg
# To bootstrap Chocolatey from a file on C:\Temp salt '*' chocolatey.bootstrap source=C:\Temp\chocolatey.nupkg
salt.modules.chocolatey.chocolatey_version() Returns the version of Chocolatey installed on the minion.
salt '*' chocolatey.chocolatey_version
salt.modules.chocolatey.disable_source(name) Instructs Chocolatey to disable a source.
name   Name of the source repository to disable.
salt '*' chocolatey.disable_source <name>
salt.modules.chocolatey.enable_source(name) Instructs Chocolatey to enable a source.
name   Name of the source repository to enable.
salt '*' chocolatey.enable_source <name>
salt.modules.chocolatey.install(name, version=None, source=None, force=False, pre_versions=False, install_args=None, override_args=False, force_x86=False, package_args=None, allow_multiple=False, execution_timeout=None) Instructs Chocolatey to install a package.
• name (str) -- The name of the package to be installed. Only accepts a single argument. Required.
• version (str) -- Install a specific version of the package. Defaults to latest version. Default is None.
Chocolatey repository (directory, share or remote URL feed) the package comes from. Defaults to the official Chocolatey feed.  Default is None.
Alternate Sources:
• cygwin
• python
• ruby
• webpi
• windowsfeatures
• force (bool) -- Reinstall the current version of an existing package. Do not use with allow_multiple. Default is False.
• pre_versions (bool) -- Include pre-release packages. Default is False.
• install_args (str) -- A list of install arguments you want to pass to the installation process i.e product key or feature list. Default is None.
• override_args (bool) -- Set to true if you want to override the original install arguments (for the native installer) in the package and use your own. When this is set to False install_args will be appended to the end of the default arguments. Default is None.
• force_x86 (bool) -- Force x86 (32bit) installation on 64 bit systems. Default is False.
• package_args (str) -- Arguments you want to pass to the package. Default is None.
• allow_multiple (bool) --
Allow multiple versions of the package to be installed. Do not use with force. Does not work with all packages. Default is False.
• execution_timeout (str) --
Chocolatey execution timeout value you want to pass to the installation process. Default is None.
Returns The output of the chocolatey command
salt '*' chocolatey.install <package name> salt '*' chocolatey.install <package name> version=<package version> salt '*' chocolatey.install <package name> install_args=<args> override_args=True
salt.modules.chocolatey.install_cygwin(name, install_args=None, override_args=False) Instructs Chocolatey to install a package via Cygwin.
name   The name of the package to be installed. Only accepts a single argument.
install_args A list of install arguments you want to pass to the installation process i.e product key or feature list
override_args Set to true if you want to override the original install arguments (for the native installer) in the package and use your own. When this is set to False install_args will be appended to the end of the default arguments
salt '*' chocolatey.install_cygwin <package name> salt '*' chocolatey.install_cygwin <package name> install_args=<args> override_args=True
salt.modules.chocolatey.install_gem(name, version=None, install_args=None, override_args=False) Instructs Chocolatey to install a package via Ruby's Gems.
version Install a specific version of the package. Defaults to latest version available.
salt '*' chocolatey.install_gem <package name> salt '*' chocolatey.install_gem <package name> version=<package version> salt '*' chocolatey.install_gem <package name> install_args=<args> override_args=True
salt.modules.chocolatey.install_missing(name, version=None, source=None) Instructs Chocolatey to install a package if it doesn't already exist.
Changed in version 2014.7.0: If the minion has Chocolatey >= 0.9.8.24 installed, this function calls chocolatey.install instead, as installmissing is deprecated as of that version and will be removed in Chocolatey 1.0.
source Chocolatey repository (directory, share or remote URL feed) the package comes from. Defaults to the official Chocolatey feed.
salt '*' chocolatey.install_missing <package name> salt '*' chocolatey.install_missing <package name> version=<package version>
salt.modules.chocolatey.install_python(name, version=None, install_args=None, override_args=False) Instructs Chocolatey to install a package via Python's easy_install.
salt '*' chocolatey.install_python <package name> salt '*' chocolatey.install_python <package name> version=<package version> salt '*' chocolatey.install_python <package name> install_args=<args> override_args=True
salt.modules.chocolatey.install_webpi(name, install_args=None, override_args=False) Instructs Chocolatey to install a package via the Microsoft Web PI service.
salt '*' chocolatey.install_webpi <package name> salt '*' chocolatey.install_webpi <package name> install_args=<args> override_args=True
salt.modules.chocolatey.install_windowsfeatures(name) Instructs Chocolatey to install a Windows Feature via the Deployment Image Servicing and Management tool.
name   The name of the feature to be installed. Only accepts a single argument.
salt '*' chocolatey.install_windowsfeatures <package name>
salt.modules.chocolatey.list_(narrow=None, all_versions=False, pre_versions=False, source=None, local_only=False, exact=False) Instructs Chocolatey to pull a vague package list from the repository.
• narrow (str) -- Term used to narrow down results. Searches against name/description/tag. Default is None.
• all_versions (bool) -- Display all available package versions in results. Default is False.
• pre_versions (bool) -- Display pre-release packages in results. Default is False.
• source (str) -- Chocolatey repository (directory, share or remote URL feed) the package comes from. Defaults to the official Chocolatey feed if None is passed. Default is None.
• local_only (bool) -- Display packages only installed locally. Default is False.
• exact (bool) --
Display only packages that match narrow exactly. Default is False.
Returns A dictionary of results.
salt '*' chocolatey.list <narrow> salt '*' chocolatey.list <narrow> all_versions=True
salt.modules.chocolatey.list_sources() Returns the list of installed sources.
salt '*' chocolatey.list_sources
salt.modules.chocolatey.list_webpi() Instructs Chocolatey to pull a full package list from the Microsoft Web PI repository.
Returns List of webpi packages
salt '*' chocolatey.list_webpi
salt.modules.chocolatey.list_windowsfeatures() Instructs Chocolatey to pull a full package list from the Windows Features list, via the Deployment Image Servicing and Management tool.
Returns List of Windows Features
salt '*' chocolatey.list_windowsfeatures
salt.modules.chocolatey.unbootstrap() Uninstall chocolatey from the system by doing the following:
• Delete the Chocolatey Directory
• Remove Chocolatey from the path
• Remove Chocolatey environment variables
Returns A list of items that were removed, otherwise an empty list
salt * chocolatey.unbootstrap
salt.modules.chocolatey.uninstall(name, version=None, uninstall_args=None, override_args=False) Instructs Chocolatey to uninstall a package.
name   The name of the package to be uninstalled. Only accepts a single argument.
version Uninstalls a specific version of the package. Defaults to latest version installed.
uninstall_args A list of uninstall arguments you want to pass to the uninstallation process i.e product key or feature list
override_args Set to true if you want to override the original uninstall arguments (for the native uninstaller) in the package and use your own. When this is set to False uninstall_args will be appended to the end of the default arguments
salt '*' chocolatey.uninstall <package name> salt '*' chocolatey.uninstall <package name> version=<package version> salt '*' chocolatey.uninstall <package name> version=<package version> uninstall_args=<args> override_args=True
salt.modules.chocolatey.update(name, source=None, pre_versions=False) Instructs Chocolatey to update packages on the system.
name   The name of the package to update, or "all" to update everything installed on the system.
pre_versions Include pre-release packages in comparison. Defaults to False.
salt "*" chocolatey.update all salt "*" chocolatey.update <package name> pre_versions=True
salt.modules.chocolatey.upgrade(name, version=None, source=None, force=False, pre_versions=False, install_args=None, override_args=False, force_x86=False, package_args=None) New in version 2016.3.4.
Instructs Chocolatey to upgrade packages on the system. (update is being deprecated). This command will install the package if not installed.
• name (str) -- The name of the package to update, or "all" to update everything installed on the system.
• version (str) -- Install a specific version of the package. Defaults to latest version.
• source (str) -- Chocolatey repository (directory, share or remote URL feed) the package comes from. Defaults to the official Chocolatey feed.
• force (bool) -- Reinstall the same version already installed
• pre_versions (bool) -- Include pre-release packages in comparison. Defaults to False.
• install_args (str) -- A list of install arguments you want to pass to the installation process i.e product key or feature list
• override_args (str) -- Set to true if you want to override the original install arguments (for the native installer) in the package and use your own. When this is set to False install_args will be appended to the end of the default arguments
• force_x86 -- Force x86 (32bit) installation on 64 bit systems. Defaults to false.
• package_args -- A list of arguments you want to pass to the package
Returns Results of the chocolatey command
salt "*" chocolatey.upgrade all salt "*" chocolatey.upgrade <package name> pre_versions=True
salt.modules.chocolatey.version(name, check_remote=False, source=None, pre_versions=False) Instructs Chocolatey to check an installed package version, and optionally compare it to one available from a remote feed.
• name (str) -- The name of the package to check. Required.
• check_remote (bool) -- Get the version number of the latest package from the remote feed.  Default is False.
• source (str) -- Chocolatey repository (directory, share or remote URL feed) the package comes from. Defaults to the official Chocolatey feed.  Default is None.
• pre_versions (bool) -- Include pre-release packages in comparison. Default is False.
Returns A dictionary of currently installed software and versions
salt "*" chocolatey.version <package name> salt "*" chocolatey.version <package name> check_remote=True
salt.modules.chronos Module providing a simple management interface to a chronos cluster.
Currently this only works when run through a proxy minion.
salt.modules.chronos.has_job(name) Return whether the given job is currently configured.
salt chronos-minion-id chronos.has_job my-job
salt.modules.chronos.job(name) Return the current server configuration for the specified job.
salt chronos-minion-id chronos.job my-job
salt.modules.chronos.jobs() Return a list of the currently installed job names.
salt chronos-minion-id chronos.jobs
salt.modules.chronos.rm_job(name) Remove the specified job from the server.
salt chronos-minion-id chronos.rm_job my-job
salt.modules.chronos.update_job(name, config) Update the specified job with the given configuration.
salt chronos-minion-id chronos.update_job my-job '<config yaml>'
salt.modules.chroot maintainer Alberto Planas <aplanas@suse.com>
salt.modules.chroot.apply_(root, mods=None, **kwargs) Apply an state inside a chroot.
This function will call chroot.highstate or chroot.sls based on the arguments passed to this function. It exists as a more intuitive way of applying states.
root   Path to the chroot environment
For a formal description of the possible parameters accepted in this function, check state.apply_ documentation.
salt myminion chroot.apply /chroot salt myminion chroot.apply /chroot stuff salt myminion chroot.apply /chroot stuff pillar='{"foo": "bar"}'
salt.modules.chroot.call(root, function, *args, **kwargs) Executes a Salt function inside a chroot environment.
The chroot does not need to have Salt installed, but Python is required.
function Salt execution module function
salt myminion chroot.call /chroot test.ping salt myminion chroot.call /chroot ssh.set_auth_key user key=mykey
salt.modules.chroot.create(root) Create a basic chroot environment.
Note that this environment is not functional. The caller needs to install the minimal required binaries, including Python if chroot.call is called.
salt myminion chroot.create /chroot
salt.modules.chroot.exist(root) Return True if the chroot environment is present.
salt myminion chroot.exist /chroot
salt.modules.chroot.highstate(root, **kwargs) Retrieve the state data from the salt master for this minion and execute it inside the chroot.
For a formal description of the possible parameters accepted in this function, check state.highstate documentation.
salt myminion chroot.highstate /chroot salt myminion chroot.highstate /chroot pillar='{"foo": "bar"}'
salt.modules.chroot.in_chroot() Return True if the process is inside a chroot jail
salt myminion chroot.in_chroot
salt.modules.chroot.sls(root, mods, saltenv='base', test=None, exclude=None, **kwargs) Execute the states in one or more SLS files inside the chroot.
saltenv Specify a salt fileserver environment to be used when applying states
mods   List of states to execute
test   Run states in test-only (dry-run) mode
exclude Exclude specific states from execution. Accepts a list of sls names, a comma-separated string of sls names, or a list of dictionaries containing sls or id keys. Glob-patterns may be used to match multiple states.
For a formal description of the possible parameters accepted in this function, check state.sls documentation.
salt '*' chroot.sls /chroot stuff pillar='{"foo": "bar"}'
salt.modules.cimc Module to provide Cisco UCS compatibility to Salt
codeauthor Spencer Ervin <spencer_ervin@hotmail.com>
Configuration This module accepts connection configuration details either as parameters, or as configuration settings in pillar as a Salt proxy. Options passed into opts will be ignored if options are passed into pillar.
SEE ALSO: Cisco UCS Proxy Module
About This execution module was designed to handle connections to a Cisco UCS server.  This module adds support to send connections directly to the device through the rest API.
salt.modules.cimc.activate_backup_image(reset=False) Activates the firmware backup image.
Parameters reset (bool) -- Reset the CIMC device on activate.
salt '*' cimc.activate_backup_image salt '*' cimc.activate_backup_image reset=True
salt.modules.cimc.create_user(uid=None, username=None, password=None, priv=None) Create a CIMC user with username and password.
• uid (int) -- The user ID slot to create the user account in.
• username (str) -- The name of the user.
• password (str) -- The clear text password of the user.
• priv (str) -- The privilege level of the user.
salt '*' cimc.create_user 11 username=admin password=foobar priv=admin
salt.modules.cimc.get_bios_defaults() Get the default values of BIOS tokens.
salt '*' cimc.get_bios_defaults
salt.modules.cimc.get_bios_settings() Get the C240 server BIOS token values.
salt '*' cimc.get_bios_settings
salt.modules.cimc.get_boot_order() Retrieves the configured boot order table.
salt '*' cimc.get_boot_order
salt.modules.cimc.get_cpu_details() Get the CPU product ID details.
salt '*' cimc.get_cpu_details
salt.modules.cimc.get_disks() Get the HDD product ID details.
salt '*' cimc.get_disks
salt.modules.cimc.get_ethernet_interfaces() Get the adapter Ethernet interface details.
salt '*' cimc.get_ethernet_interfaces
salt.modules.cimc.get_fibre_channel_interfaces() Get the adapter fibre channel interface details.
salt '*' cimc.get_fibre_channel_interfaces
salt.modules.cimc.get_firmware() Retrieves the current running firmware versions of server components.
salt '*' cimc.get_firmware
salt.modules.cimc.get_hostname() Retrieves the hostname from the device.
salt '*' cimc.get_hostname
salt.modules.cimc.get_ldap() Retrieves LDAP server details.
salt '*' cimc.get_ldap
salt.modules.cimc.get_management_interface() Retrieve the management interface details.
salt '*' cimc.get_management_interface
salt.modules.cimc.get_memory_token() Get the memory RAS BIOS token.
salt '*' cimc.get_memory_token
salt.modules.cimc.get_memory_unit() Get the IMM/Memory unit product ID details.
salt '*' cimc.get_memory_unit
salt.modules.cimc.get_network_adapters() Get the list of network adapters and configuration details.
salt '*' cimc.get_network_adapters
salt.modules.cimc.get_ntp() Retrieves the current running NTP configuration.
salt '*' cimc.get_ntp
salt.modules.cimc.get_pci_adapters() Get the PCI adapter product ID details.
salt.modules.cimc.get_power_configuration() Get the configuration of the power settings from the device. This is only available on some C-Series servers.
salt '*' cimc.get_power_configuration
salt.modules.cimc.get_power_supplies() Retrieves the power supply unit details.
salt '*' cimc.get_power_supplies
salt.modules.cimc.get_snmp_config() Get the snmp configuration details.
salt '*' cimc.get_snmp_config
salt.modules.cimc.get_syslog() Get the Syslog client-server details.
salt '*' cimc.get_syslog
salt.modules.cimc.get_syslog_settings() Get the Syslog configuration settings from the system.
salt '*' cimc.get_syslog_settings
salt.modules.cimc.get_system_info() Get the system information.
salt '*' cimc.get_system_info
salt.modules.cimc.get_users() Get the CIMC users.
salt '*' cimc.get_users
salt.modules.cimc.get_vic_adapters() Get the VIC adapter general profile details.
salt '*' cimc.get_vic_adapters
salt.modules.cimc.get_vic_uplinks() Get the VIC adapter uplink port details.
salt '*' cimc.get_vic_uplinks
salt.modules.cimc.mount_share(name=None, remote_share=None, remote_file=None, mount_type='nfs', username=None, password=None) Mounts a remote file through a remote share. Currently, this feature is supported in version 1.5 or greater.  The remote share can be either NFS, CIFS, or WWW.
Some of the advantages of CIMC Mounted vMedia include: Communication between mounted media and target stays local (inside datacenter) Media mounts can be scripted/automated No vKVM requirements for media connection Multiple share types supported Connections supported through all CIMC interfaces
Note: CIMC Mounted vMedia is enabled through BIOS configuration.
• name (str) -- The name of the volume on the CIMC device.
• remote_share (str) -- The file share link that will be used to mount the share. This can be NFS, CIFS, or WWW. This
• be the directory path and not the full path to the remote file. (must) --
• remote_file (str) -- The name of the remote file to mount. It must reside within remote_share.
• mount_type (str) -- The type of share to mount. Valid options are nfs, cifs, and www.
• username (str) -- An optional requirement to pass credentials to the remote share. If not provided, an
• connection attempt will be made. (unauthenticated) --
• password (str) -- An optional requirement to pass a password to the remote share. If not provided, an
• connection attempt will be made. --
salt '*' cimc.mount_share name=WIN7 remote_share=10.xxx.27.xxx:/nfs remote_file=sl1huu.iso
salt '*' cimc.mount_share name=WIN7 remote_share=10.xxx.27.xxx:/nfs remote_file=sl1huu.iso username=bob password=badpassword
salt.modules.cimc.reboot() Power cycling the server.
salt '*' cimc.reboot
salt.modules.cimc.set_hostname(hostname=None) Sets the hostname on the server.
Parameters hostname (str) -- The new hostname to set.
salt '*' cimc.set_hostname foobar
salt.modules.cimc.set_logging_levels(remote=None, local=None) Sets the logging levels of the CIMC devices. The logging levels must match the following options: emergency, alert, critical, error, warning, notice, informational, debug.
• remote (str) -- The logging level for SYSLOG logs.
• local (str) -- The logging level for the local device.
salt '*' cimc.set_logging_levels remote=error local=notice
salt.modules.cimc.set_ntp_server(server1='', server2='', server3='', server4='') Sets the NTP servers configuration. This will also enable the client NTP service.
• server1 (str) -- The first IP address or FQDN of the NTP servers.
• server2 (str) -- The second IP address or FQDN of the NTP servers.
• server3 (str) -- The third IP address or FQDN of the NTP servers.
• server4 (str) -- The fourth IP address or FQDN of the NTP servers.
salt '*' cimc.set_ntp_server 10.10.10.1
salt '*' cimc.set_ntp_server 10.10.10.1 foo.bar.com
salt.modules.cimc.set_power_configuration(policy=None, delayType=None, delayValue=None) Sets the power configuration on the device. This is only available for some C-Series servers.
• policy (str) -- The action to be taken when chassis power is restored after
• unexpected power loss. This can be one of the following (an) --
reset: The server is allowed to boot up normally when power is restored. The server can restart immediately or, optionally, after a fixed or random delay.
stay-off: The server remains off until it is manually restarted.
last-state: The server restarts and the system attempts to restore any processes that were running before power was lost.
• delayType (str) -- If the selected policy is reset, the restart can be
• with this option. This can be one of the following (delayed) --
fixed: The server restarts after a fixed delay.
random: The server restarts after a random delay.
• delayValue (int) -- If a fixed delay is selected, once chassis power is
• and the Cisco IMC has finished rebooting (restored) --
• system waits for (the) --
• specified number of seconds before restarting the server. Enter an (the) --
• between 0 and 240. (integer) --
salt '*' cimc.set_power_configuration stay-off
salt '*' cimc.set_power_configuration reset fixed 0
salt.modules.cimc.set_syslog_server(server=None, type='primary') Set the SYSLOG server on the host.
• server (str) -- The hostname or IP address of the SYSLOG server.
• type (str) -- Specifies the type of SYSLOG server. This can either be primary (default) or secondary.
salt '*' cimc.set_syslog_server foo.bar.com
salt '*' cimc.set_syslog_server foo.bar.com primary
salt '*' cimc.set_syslog_server foo.bar.com secondary
salt.modules.cimc.set_user(uid=None, username=None, password=None, priv=None, status=None) Sets a CIMC user with specified configurations.
• status (str) -- The account status of the user.
salt '*' cimc.set_user 11 username=admin password=foobar priv=admin active
salt.modules.cimc.tftp_update_bios(server=None, path=None) Update the BIOS firmware through TFTP.
• server (str) -- The IP address or hostname of the TFTP server.
• path (str) -- The TFTP path and filename for the BIOS image.
salt '*' cimc.tftp_update_bios foo.bar.com HP-SL2.cap
salt.modules.cimc.tftp_update_cimc(server=None, path=None) Update the CIMC firmware through TFTP.
• path (str) -- The TFTP path and filename for the CIMC image.
salt '*' cimc.tftp_update_cimc foo.bar.com HP-SL2.bin
salt.modules.ciscoconfparse_mod Execution module for ciscoconfparse
This module can be used for basic configuration parsing, audit or validation for a variety of network platforms having Cisco IOS style configuration (one space indentation), including: Cisco IOS, Cisco Nexus, Cisco IOS-XR, Cisco IOS-XR, Cisco ASA, Arista EOS, Brocade, HP Switches, Dell PowerConnect Switches, or Extreme Networks devices. In newer versions, ciscoconfparse provides support for brace-delimited configuration style as well, for platforms such as: Juniper Junos, Palo Alto, or F5 Networks.
See http://www.pennington.net/py/ciscoconfparse/index.html for further details.
depends ciscoconfparse
This module depends on the Python library with the same name, ciscoconfparse - to install execute: pip install ciscoconfparse.
salt.modules.ciscoconfparse_mod.filter_lines(config=None, config_path=None, parent_regex=None, child_regex=None, saltenv='base') Return a list of detailed matches, for the configuration blocks (parent-child relationship) whose parent respects the regular expressions configured via the parent_regex argument, and the child matches the child_regex regular expression. The result is a list of dictionaries with the following keys:
• match: a boolean value that tells whether child_regex matched any children lines.
• parent: the parent line (as text).
• child: the child line (as text). If no child line matched, this field will be None.
Note that the return list contains the elements that matched the parent condition, the parent_regex regular expression. Therefore, the parent field will always have a valid value, while match and child may default to False and None respectively when there is not child match.
salt '*' ciscoconfparse.filter_lines config_path=https://bit.ly/2mAdq7z parent_regex='Gigabit' child_regex='shutdown'
Example output (for the example above):
[ { 'parent': 'interface GigabitEthernet1', 'match': False, 'child': None }, { 'parent': 'interface GigabitEthernet2', 'match': True, 'child': ' shutdown' }, { 'parent': 'interface GigabitEthernet3', 'match': True, 'child': ' shutdown' } ]
salt.modules.ciscoconfparse_mod.find_lines(config=None, config_path=None, regex=None, saltenv='base') Return all the lines (as text) that match the expression in the regex argument.