neulab/tldr huggingface dataset:
WARNING: Any build options not passed here assume the default values for the port, and are not just differences from the existing cached options from a previous make config.
security/nmap: ports.installed: - options: - IPV6: off
salt.states.postgres_cluster Management of PostgreSQL clusters The postgres_cluster state module is used to manage PostgreSQL clusters. Clusters can be set as either absent or present
create cluster 9.3 main: postgres_cluster.present: - name: 'main' - version: '9.3'
salt.states.postgres_cluster.absent(version, name) Ensure that the named cluster is absent
version Version of the postgresql server of the cluster to remove
name   The name of the cluster to remove
salt.states.postgres_cluster.present(version, name, port=None, encoding=None, locale=None, datadir=None, allow_group_access=None, data_checksums=None, wal_segsize=None) Ensure that the named cluster is present with the specified properties.  For more information about all of these options see man pg_createcluster(1)
version Version of the postgresql cluster
name   The name of the cluster
port   Cluster port
encoding The character encoding scheme to be used in this database
locale Locale with which to create cluster
datadir Where the cluster is stored
allow_group_access Allows users in the same group as the cluster owner to read all cluster files created by initdb
data_checksums Use checksums on data pages
wal_segsize Set the WAL segment size, in megabytes
salt.states.postgres_database Management of PostgreSQL databases The postgres_database module is used to create and manage Postgres databases.  Databases can be set as either absent or present
frank: postgres_database.present
salt.states.postgres_database.absent(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named database is absent
salt.states.postgres_database.present(name, tablespace=None, encoding=None, lc_collate=None, lc_ctype=None, owner=None, owner_recurse=False, template=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named database is present with the specified properties.  For more information about all of these options see man createdb(1)
tablespace Default tablespace for the database
lc_collate The LC_COLLATE setting to be used in this database
lc_ctype The LC_CTYPE setting to be used in this database
owner  The username of the database owner
owner_recurse Recurse owner change to all relations in the database
template The template database from which to build this database
salt.states.postgres_extension Management of PostgreSQL extensions A module used to install and manage PostgreSQL extensions.
adminpack: postgres_extension.present
salt.states.postgres_extension.absent(name, if_exists=None, restrict=None, cascade=None, user=None, maintenance_db=None, db_user=None, db_password=None, db_host=None, db_port=None) Ensure that the named extension is absent.
name   Extension name of the extension to remove
if_exists Add if exist slug
restrict Add restrict slug
cascade Drop on cascade
maintenance_db Database to act on
db_user Database username if different from config or default
db_password User password if any password for a specified user
salt.states.postgres_extension.present(name, if_not_exists=None, schema=None, ext_version=None, from_version=None, user=None, maintenance_db=None, db_user=None, db_password=None, db_host=None, db_port=None) Ensure that the named extension is present.
NOTE: Before you can use the state to load an extension into a database, the extension's supporting files must be already installed.
For more information about all of these options see CREATE EXTENSION SQL command reference in the PostgreSQL documentation.
name   The name of the extension to be installed
if_not_exists Add an IF NOT EXISTS parameter to the DDL statement
schema Schema to install the extension into
ext_version Version to install
from_version Old extension version if already installed
salt.states.postgres_group Management of PostgreSQL groups (roles) The postgres_group module is used to create and manage Postgres groups.
frank: postgres_group.present
salt.states.postgres_group.absent(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named group is absent
name   The groupname of the group to remove
salt.states.postgres_group.present(name, createdb=None, createroles=None, encrypted=None, superuser=None, inherit=None, login=None, replication=None, password=None, refresh_password=None, groups=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named group is present with the specified privileges Please note that the user/group notion in postgresql is just abstract, we have roles, where users can be seen as roles with the LOGIN privilege and groups the others.
name   The name of the group to manage
createdb Is the group allowed to create databases?
createroles Is the group allowed to create other roles/users
encrypted How the password should be stored.
If encrypted is None, True, or md5, it will use PostgreSQL's MD5 algorithm.
If encrypted is False, it will be stored in plaintext.
If encrypted is scram-sha-256, it will use the algorithm described in RFC 7677.
Changed in version 3003: Prior versions only supported True and False
login  Should the group have login perm
inherit Should the group inherit permissions
superuser Should the new group be a "superuser"
replication Should the new group be allowed to initiate streaming replication
password The group's password.  It can be either a plain string or a pre-hashed password:
'md5{MD5OF({password}{role}}' 'SCRAM-SHA-256${iterations}:{salt}${stored_key}:{server_key}'
If encrypted is not False, then the password will be converted to the appropriate format above, if not already. As a consequence, passwords that start with "md5" or "SCRAM-SHA-256" cannot be used.
refresh_password Password refresh flag
Boolean attribute to specify whether to password comparison check should be performed.
If refresh_password is True, the password will be automatically updated without extra password change check.
This behaviour makes it possible to execute in environments without superuser access available, e.g. Amazon RDS for PostgreSQL
groups A string of comma separated groups the group should be in
salt.states.postgres_initdb Initialization of PostgreSQL data directory The postgres_initdb module is used to initialize the postgresql data directory.
pgsql-data-dir: postgres_initdb.present: - name: /var/lib/pgsql/data - auth: password - user: postgres - password: strong_password - encoding: UTF8 - locale: C - runas: postgres - checksums: True - waldir: /var/postgresql/wal
salt.states.postgres_initdb.present(name, user=None, password=None, auth='password', encoding='UTF8', locale=None, runas=None, waldir=None, checksums=False) Initialize the PostgreSQL data directory
salt.states.postgres_language Management of PostgreSQL languages The postgres_language module is used to create and manage Postgres languages.  Languages can be set as either absent or present
plpgsql: postgres_language.present: - maintenance_db: testdb
plpgsql: postgres_language.absent: - maintenance_db: testdb
salt.states.postgres_language.absent(name, maintenance_db, user=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that a named language is absent in the specified database.
name   The name of the language to remove
maintenance_db The name of the database in which the language is to be installed
salt.states.postgres_language.present(name, maintenance_db, user=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that a named language is present in the specified database.
name   The name of the language to install
salt.states.postgres_privileges Management of PostgreSQL Privileges The postgres_privileges module is used to manage Postgres privileges. Privileges can be set as either absent or present.
Privileges can be set on the following database object types:
Setting the grant option is supported as well.
baruwa: postgres_privileges.present: - object_name: awl - object_type: table - privileges: - SELECT - INSERT - DELETE - grant_option: False - prepend: public - maintenance_db: testdb
andrew: postgres_privileges.present: - object_name: admins - object_type: group - grant_option: False - maintenance_db: testdb
baruwa: postgres_privileges.absent: - object_name: awl - object_type: table - privileges: - SELECT - INSERT - DELETE - prepend: public - maintenance_db: testdb
andrew: postgres_privileges.absent: - object_name: admins - object_type: group - maintenance_db: testdb
salt.states.postgres_privileges.absent(name, object_name, object_type, privileges=None, prepend='public', maintenance_db=None, user=None, db_password=None, db_host=None, db_port=None, db_user=None) Revoke the requested privilege(s) on the specificed object(s)
View permissions should specify object_type: table.
note   privileges should not be set when revoking group membership
salt.states.postgres_privileges.present(name, object_name, object_type, privileges=None, grant_option=None, prepend='public', maintenance_db=None, user=None, db_password=None, db_host=None, db_port=None, db_user=None) Grant the requested privilege(s) on the specified object to a role
object_name Name of the object on which the grant is to be performed. 'ALL' may be used for objects of type 'table' or 'sequence'.
privileges List of privileges to grant, from the list below:
note   privileges should not be set when granting group membership
salt.states.postgres_schema Management of PostgreSQL schemas The postgres_schemas module is used to create and manage Postgres schemas.
public: postgres_schema.present 'dbname' 'name'
salt.states.postgres_schema.absent(dbname, name, user=None, db_user=None, db_password=None, db_host=None, db_port=None) Ensure that the named schema is absent.
dbname The database's name will work on
name   The name of the schema to remove
user   system user all operations should be performed on behalf of
salt.states.postgres_schema.present(dbname, name, owner=None, user=None, db_user=None, db_password=None, db_host=None, db_port=None) Ensure that the named schema is present in the database.
name   The name of the schema to manage
salt.states.postgres_tablespace Management of PostgreSQL tablespace A module used to create and manage PostgreSQL tablespaces.
ssd-tablespace: postgres_tablespace.present: - name: indexes - directory: /mnt/ssd-data
salt.states.postgres_tablespace.absent(name, user=None, maintenance_db=None, db_user=None, db_password=None, db_host=None, db_port=None) Ensure that the named tablespace is absent.
name   The name of the tablespace to remove
salt.states.postgres_tablespace.present(name, directory, options=None, owner=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named tablespace is present with the specified properties.  For more information about all of these options run man 7 create_tablespace.
name   The name of the tablespace to create/manage.
directory The directory where the tablespace will be located, must already exist
options A dictionary of options to specify for the tablespace. Currently, the only tablespace options supported are seq_page_cost and random_page_cost. Default values are shown in the example below:
my_space: postgres_tablespace.present: - directory: /srv/my_tablespace - options: seq_page_cost: 1.0 random_page_cost: 4.0
owner  The database user that will be the owner of the tablespace. Defaults to the user executing the command (i.e. the user option)
salt.states.postgres_user Management of PostgreSQL users (roles) The postgres_users module is used to create and manage Postgres users.
frank: postgres_user.present
salt.states.postgres_user.absent(name, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named user is absent
salt.states.postgres_user.present(name, createdb=None, createroles=None, encrypted=None, superuser=None, replication=None, inherit=None, login=None, password=None, default_password=None, refresh_password=None, valid_until=None, groups=None, user=None, maintenance_db=None, db_password=None, db_host=None, db_port=None, db_user=None) Ensure that the named user is present with the specified privileges Please note that the user/group notion in postgresql is just abstract, we have roles, where users can be seen as roles with the LOGIN privilege and groups the others.
name   The name of the system user to manage.
createdb Is the user allowed to create databases?
createroles Is the user allowed to create other users?
superuser Should the new user be a "superuser"
replication Should the new user be allowed to initiate streaming replication
password The user's password.  It can be either a plain string or a pre-hashed password:
default_password The password used only when creating the user, unless password is set.
valid_until A date and time after which the role's password is no longer valid.
groups A string of comma separated groups the user should be in
db_user Postgres database username, if different from config or default.
db_password Postgres user's password, if any password, for a specified db_user.
db_host Postgres database host, if different from config or default.
db_port Postgres database port, if different from config or default.
salt.states.powerpath Powerpath configuration support Allows configuration of EMC Powerpath.  Currently only addition/deletion of licenses is supported.
key: powerpath.license_present: []
salt.states.powerpath.license_absent(name) Ensures that the specified PowerPath license key is absent on the host.
name   The license key to ensure is absent
salt.states.powerpath.license_present(name) Ensures that the specified PowerPath license key is present on the host.
name   The license key to ensure is present
salt.states.probes Network Probes Configure RPM (JunOS)/SLA (Cisco) probes on the device via NAPALM proxy.
Dependencies • napalm probes management module
salt.states.probes.managed(name, probes, defaults=None) Ensure the networks device is configured as specified in the state SLS file.  Probes not specified will be removed, while probes not confiured as expected will trigger config updates.
• probes -- Defines the probes as expected to be configured on the device.  In order to ease the configuration and avoid repeating the same parameters for each probe, the next parameter (defaults) can be used, providing common characteristics.
• defaults -- Specifies common parameters for the probes.
rpmprobes: probes.managed: - probes: probe_name1: probe1_test1: source: 192.168.0.2 target: 192.168.0.1 probe1_test2: target: 172.17.17.1 probe1_test3: target: 8.8.8.8 probe_type: http-ping probe_name2: probe2_test1: test_interval: 100 - defaults: target: 10.10.10.10 probe_count: 15 test_interval: 3 probe_type: icmp-ping
In the probes configuration, the only mandatory attribute is target (specified either in probes configuration, either in the defaults dictionary).  All the other parameters will use the operating system defaults, if not provided:
• source - Specifies the source IP Address to be used during the tests.  If not specified will use the IP Address of the logical interface loopback0.
• target - Destination IP Address.
• probe_count - Total number of probes per test (1..15). System defaults: 1 on both JunOS & Cisco.
• probe_interval - Delay between tests (0..86400 seconds). System defaults: 3 on JunOS, 5 on Cisco.
• probe_type - Probe request type. Available options:
• icmp-ping
• tcp-ping
• udp-ping
Using the example configuration above, after running the state, on the device will be configured 4 probes, with the following properties:
probe_name1: probe1_test1: source: 192.168.0.2 target: 192.168.0.1 probe_count: 15 test_interval: 3 probe_type: icmp-ping probe1_test2: target: 172.17.17.1 probe_count: 15 test_interval: 3 probe_type: icmp-ping probe1_test3: target: 8.8.8.8 probe_count: 15 test_interval: 3 probe_type: http-ping probe_name2: probe2_test1: target: 10.10.10.10 probe_count: 15 test_interval: 3 probe_type: icmp-ping
salt.states.process Process Management Ensure a process matching a given pattern is absent.
httpd-absent: process.absent: - name: apache2
salt.states.process.absent(name, user=None, signal=None) Ensures that the named command is not running.
name   The pattern to match.
user   The user to which the process belongs
signal Signal to send to the process(es).
salt.states.proxy Allows you to manage proxy settings on minions Setup proxy settings on minions
192.168.1.4: proxy.managed: - port: 3128 - bypass_domains: - localhost - 127.0.0.1
salt.states.proxy.managed(name, port, services=None, user=None, password=None, bypass_domains=None, network_service='Ethernet') Manages proxy settings for this mininon
name   The proxy server to use
services A list of the services that should use the given proxy settings, valid services include http, https and ftp.  If no service is given all of the valid services will be used.
password The password to use for the proxy server if required
bypass_domains An array of the domains that should bypass the proxy
salt.states.pushover Send a message to PushOver This state is useful for sending messages to PushOver during state runs.
pushover-message: pushover.post_message: - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - title: Salt Returner - device: phone - priority: -1 - expire: 3600 - retry: 5 - message: 'This state was executed successfully.'
pushover: token: peWcBiMOS9HrZG15peWcBiMOS9HrZG15
salt.states.pushover.post_message(name, user=None, device=None, message=None, title=None, priority=None, expire=None, retry=None, sound=None, api_version=1, token=None) Send a message to a PushOver channel.
pushover-message: pushover.post_message: - user: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx - title: Salt Returner - device: phone - priority: -1 - expire: 3600 - retry: 5
user   The user or group of users to send the message to. Must be ID of user, not name or email address.
message The message that is to be sent to the PushOver channel.
title  The title to use for the message.
device The device for the user to send the message to.
priority The priority for the message.
expire The message should expire after specified amount of seconds.
retry  The message should be resent this many times.
token  The token for PushOver to use for authentication, if not specified in the configuration options of master or minion.
salt.states.pyenv Managing python installations with pyenv This module is used to install and manage python installations with pyenv.  Different versions of python can be installed, and uninstalled. pyenv will be installed automatically the first time it is needed and can be updated later. This module will not automatically install packages which pyenv will need to compile the versions of python.
If pyenv is run as the root user then it will be installed to /usr/local/pyenv, otherwise it will be installed to the users ~/.pyenv directory. To make pyenv available in the shell you may need to add the pyenv/shims and pyenv/bin directories to the users PATH. If you are installing as root and want other users to be able to access pyenv then you will need to add pyenv_ROOT to their environment.
This is how a state configuration could look like:
pyenv-deps: pkg.installed: - pkgs: - make - build-essential - libssl-dev - zlib1g-dev - libbz2-dev - libreadline-dev - libsqlite3-dev - wget - curl - llvm python-2.6: pyenv.absent: - require: - pkg: pyenv-deps
python-2.7.6: pyenv.installed: - default: True - require: - pkg: pyenv-deps
salt.states.pyenv.absent(name, user=None) Verify that the specified python is not installed with pyenv. pyenv is installed if necessary.
name   The version of python to uninstall
user: None The user to run pyenv as.
salt.states.pyenv.install_pyenv(name, user=None) Install pyenv if not installed. Allows you to require pyenv be installed prior to installing the plugins. Useful if you want to install pyenv plugins via the git or file modules and need them installed before installing any rubies.
Use the pyenv.root configuration option to set the path for pyenv if you want a system wide install that is not in a user home dir.
salt.states.pyenv.installed(name, default=False, user=None) Verify that the specified python is installed with pyenv. pyenv is installed if necessary.
name   The version of python to install
default False Whether to make this python the default.
salt.states.pyrax_queues Manage Rackspace Queues New in version 2015.5.0.
Create and destroy Rackspace queues. Be aware that this interacts with Rackspace's services, and so may incur charges.
This module uses pyrax, which can be installed via package, or pip.  This module is greatly inspired by boto_* modules from SaltStack code source.
myqueue: pyrax_queues.present: - provider: my-pyrax
myqueue: pyrax_queues.absent: - provider: my-pyrax
salt.states.pyrax_queues.absent(name, provider) Ensure the named Rackspace queue is deleted.
name   Name of the Rackspace queue.
provider Salt Cloud provider
salt.states.pyrax_queues.present(name, provider) Ensure the RackSpace queue exists.
provider Salt Cloud Provider
salt.states.quota Management of POSIX Quotas The quota can be managed for the system:
/: quota.mode: mode: off quotatype: user
salt.states.quota.mode(name, mode, quotatype) Set the quota for the system
name   The filesystem to set the quota mode on
mode   Whether the quota system is on or off
quotatype Must be user or group
salt.states.rabbitmq_cluster Manage RabbitMQ Clusters Example:
rabbit@rabbit.example.com: rabbitmq_cluster.join: - user: rabbit - host: rabbit.example.com
salt.states.rabbitmq_cluster.join(name, host, user='rabbit', ram_node=None, runas='root') This function is an alias of joined. Ensure the current node joined to a cluster with node user@host
name   Irrelevant, not used (recommended: user@host)
user   The user of node to join to (default: rabbit)
host   The host of node to join to
ram_node Join node as a RAM node
runas  The user to run the rabbitmq command as
salt.states.rabbitmq_cluster.joined(name, host, user='rabbit', ram_node=None, runas='root') Ensure the current node joined to a cluster with node user@host
salt.states.rabbitmq_plugin Manage RabbitMQ Plugins New in version 2014.1.0.
some_plugin: rabbitmq_plugin.enabled: []
salt.states.rabbitmq_plugin.disabled(name, runas=None) Ensure the RabbitMQ plugin is disabled.
name   The name of the plugin
runas  The user to run the rabbitmq-plugin command as
salt.states.rabbitmq_plugin.enabled(name, runas=None) Ensure the RabbitMQ plugin is enabled.
salt.states.rabbitmq_policy Manage RabbitMQ Policies maintainer Benn Eichhorn <benn@getlocalmeasure.com>
rabbit_policy: rabbitmq_policy.present: - name: HA - pattern: '.*' - definition: '{"ha-mode": "all"}'
salt.states.rabbitmq_policy.absent(name, vhost='/', runas=None) Ensure the named policy is absent
name   The name of the policy to remove
runas  Name of the user to run the command as
salt.states.rabbitmq_policy.present(name, pattern, definition, priority=0, vhost='/', runas=None, apply_to=None) Ensure the RabbitMQ policy exists.
name   Policy name
pattern A regex of queues to apply the policy to
definition A json dict describing the policy
priority Priority (defaults to 0)
vhost  Virtual host to apply to (defaults to '/')
apply_to Apply policy to 'queues', 'exchanges' or 'all' (default to 'all')
salt.states.rabbitmq_upstream Manage RabbitMQ Upstreams Example:
rabbit_upstream: rabbitmq_upstream.present: - name: upstream_1 - uri: amqp://my_user:my_password@rabbitmq_host - trust_user_id: True - ack_mode: on-confirm - max_hops: 1
salt.states.rabbitmq_upstream.absent(name, runas=None) Ensure the named upstream is absent.
• name (str) -- The name of the upstream to remove
• runas (str) -- User to run the command
salt.states.rabbitmq_upstream.present(name, uri, prefetch_count=None, reconnect_delay=None, ack_mode=None, trust_user_id=None, exchange=None, max_hops=None, expires=None, message_ttl=None, ha_policy=None, queue=None, runas=None) Ensure the RabbitMQ upstream exists.
• name (str) -- The name of the upstream connection
• uri (str) -- The URI to connect to. If upstream is a cluster and can have several URIs, you can enter them here separated by spaces.  Examples: - amqp://user:password@server_name - amqp://user:password@server_name/vhost When connecting with SSL, several URI-parameters need also be specified: - cacertfile = /path/to/cacert.pem - certfile = /path/to/cert.pem - keyfile = /part/to/key.pem - verity = verify_peer - fail_if_no_peer_cert = true | false - auth_mechanism = external Example: - amqp://user:password@server_name?cacertfile=/path/to/cacert.pem& certfile=/path/to/cert.pem&keyfile=/path/to/key.pem&verify=verify_peer - amqp://server-name?cacertfile=/path/to/cacert.pem&certfile=/path/to/cert.pem& keyfile=/path/to/key.pem&verify=verify_peer&fail_if_no_peer_cert=true&auth_mechanism=external
• prefetch_count (int) -- Maximum number of unacknowledged messages that may be in flight over a federation link at one time. Default: 1000
• reconnect_delay (int) -- Time in seconds to wait after a network link goes down before attempting reconnection. Default: 5
• ack_mode (str) -- The following values are allowed: on-confirm: Messages are acknowledged to the upstream broker after they have been confirmed downstream. Handles network errors and broker failures without losing messages. The slowest option, and the default. on-publish: Messages are acknowledged to the upstream broker after they have been published downstream. Handles network errors without losing messages, but may lose messages in the event of broker failures.  no-ack: Message acknowledgements are not used. The fastest option, but you may lose messages in the event of network or broker failures.
• trust_user_id (bool) -- Set True to preserve the "user-id" field across a federation link, even if the user-id does not match that used to republish the message. Set to False to clear the "user-id" field when messages are federated. Only set this to True if you trust the upstream broker not to forge user-ids.
• max_hops (int) -- Maximum number of federation links that messages can traverse before being dropped. Defaults to 1 if not set.
• expires (int) -- Time in milliseconds that the upstream should remember about this node for. After this time all upstream state will be removed.  Set to None (Default) to mean "forever".
• message_ttl (int) -- Time in milliseconds that undelivered messages should be held upstream when there is a network outage or backlog.  Set to None (default) to mean "forever".
• ha_policy (str) -- Determines the "x-ha-policy"-argument for the upstream queue for a federated exchange. Default is "none" meaning the queue is not HA.
salt.states.rabbitmq_user Manage RabbitMQ Users Example:
rabbit_user: rabbitmq_user.present: - password: password - force: True - tags: - monitoring - user - perms: - '/': - '.*' - '.*' - '.*' - runas: rabbitmq
salt.states.rabbitmq_user.absent(name, runas=None) Ensure the named user is absent
runas  User to run the command
salt.states.rabbitmq_user.present(name, password=None, force=False, tags=None, perms=(), runas=None) Ensure the RabbitMQ user exists.
password User's password, if one needs to be set
force  If user exists, forcibly change the password
tags   Optional list of tags for the user
perms  A list of dicts with vhost keys and 3-tuple values
runas  Name of the user to run the command
salt.states.rabbitmq_vhost Manage RabbitMQ Virtual Hosts Example:
virtual_host: rabbitmq_vhost.present: - user: rabbit_user - conf: .* - write: .* - read: .*
salt.states.rabbitmq_vhost.absent(name) Ensure the RabbitMQ Virtual Host is absent
name   Name of the Virtual Host to remove
salt.states.rabbitmq_vhost.present(name) Ensure the RabbitMQ VHost exists.
name   VHost name
user   Initial user permission to set on the VHost, if present
owner  Initial owner permission to set on the VHost, if present
conf   Initial conf string to apply to the VHost and user. Defaults to .*
write  Initial write permissions to apply to the VHost and user. Defaults to .*
read   Initial read permissions to apply to the VHost and user. Defaults to .*
salt.states.rbac_solaris Management of Solaris RBAC
depends rbac_solaris,solaris_user
sjorge: rbac.managed: - roles: - netcfg - profiles: - System Power - authorizations: - solaris.audit.*
salt.states.rbac_solaris.managed(name, roles=None, profiles=None, authorizations=None) Manage RBAC properties for user
roles  list list of roles for user
profiles list list of profiles for user
authorizations list list of authorizations for user
WARNING: All existing roles, profiles and authorizations will be replaced!  An empty list will remove everything.
Set the property to None to not manage it.
salt.states.rbenv Managing Ruby installations with rbenv This module is used to install and manage ruby installations with rbenv and the ruby-build plugin. Different versions of ruby can be installed, and uninstalled.  Rbenv will be installed automatically the first time it is needed and can be updated later. This module will not automatically install packages which rbenv will need to compile the versions of ruby. If your version of ruby fails to install, refer to the ruby-build documentation to verify you are not missing any dependencies: https://github.com/rbenv/ruby-build/wiki
If rbenv is run as the root user then it will be installed to /usr/local/rbenv, otherwise it will be installed to the users ~/.rbenv directory. To make rbenv available in the shell you may need to add the rbenv/shims and rbenv/bin directories to the users PATH. If you are installing as root and want other users to be able to access rbenv then you will need to add RBENV_ROOT to their environment.
The following state configuration demonstrates how to install Ruby 1.9.x and 2.x using rbenv on Ubuntu/Debian:
rbenv-deps: pkg.installed: - names: - bash - git - openssl - libssl-dev - make - curl - autoconf - bison - build-essential - libffi-dev - libyaml-dev - libreadline6-dev - zlib1g-dev - libncurses5-dev
ruby-1.9.3-p429: rbenv.absent: - require: - pkg: rbenv-deps
ruby-2.0.0-p598: rbenv.installed: - default: True - require: - pkg: rbenv-deps
salt.states.rbenv.absent(name, user=None) Verify that the specified ruby is not installed with rbenv. Rbenv is installed if necessary.
name   The version of ruby to uninstall
user: None The user to run rbenv as.
salt.states.rbenv.install_rbenv(name, user=None) Install rbenv if not installed. Allows you to require rbenv be installed prior to installing the plugins. Useful if you want to install rbenv plugins via the git or file modules and need them installed before installing any rubies.
Use the rbenv.root configuration option to set the path for rbenv if you want a system wide install that is not in a user home dir.
salt.states.rbenv.installed(name, default=False, user=None) Verify that the specified ruby is installed with rbenv. Rbenv is installed if necessary.
name   The version of ruby to install
default False Whether to make this ruby the default.
salt.states.rdp Manage RDP Service on Windows servers
salt.states.rdp.disabled(name) Disable the RDP service
salt.states.rdp.enabled(name) Enable the RDP service and make sure access to the RDP port is allowed in the firewall configuration
salt.states.redismod Management of Redis server New in version 2014.7.0.
• redis Python module
configuration See salt.modules.redis for setup instructions.
key_in_redis: redis.string: - value: string data
The redis server information specified in the minion config file can be overridden in states using the following arguments: host, post, db, password.
key_in_redis: redis.string: - value: string data - host: localhost - port: 6379 - db: 0 - password: somuchkittycat
salt.states.redismod.absent(name, keys=None, **connection_args) Ensure key absent from redis
name   Key to ensure absent from redis
keys   list of keys to ensure absent, name will be ignored if this is used
salt.states.redismod.slaveof(name, sentinel_host=None, sentinel_port=None, sentinel_password=None, **connection_args) Set this redis instance as a slave.
name   Master to make this a slave of
sentinel_host Ip of the sentinel to check for the master
sentinel_port Port of the sentinel to check for the master
salt.states.redismod.string(name, value, expire=None, expireat=None, **connection_args) Ensure that the key exists in redis with the value specified
name   Redis key to manage
value  Data to persist in key
expire Sets time to live for key in seconds
expireat Sets expiration time for key via UNIX timestamp, overrides expire
salt.states.reg Manage the Windows registry Many python developers think of registry keys as if they were python keys in a dictionary which is not the case. The windows registry is broken down into the following components:
Hives This is the top level of the registry. They all begin with HKEY.
• HKEY_CLASSES_ROOT (HKCR)
• HKEY_CURRENT_USER(HKCU)
• HKEY_LOCAL MACHINE (HKLM)
• HKEY_USER (HKU)
• HKEY_CURRENT_CONFIG
Keys Hives contain keys. These are basically the folders beneath the hives. They can contain any number of subkeys.
When passing the hivekey values they must be quoted correctly depending on the backslashes being used (\ vs \\). The way backslashes are handled in the state file is different from the way they are handled when working on the CLI. The following are valid methods of passing the hivekey:
Using single backslashes: HKLMSOFTWAREPython 'HKLMSOFTWAREPython'
Using double backslashes: "HKLM\SOFTWARE\Python"
The following example is taken from the windows startup portion of the registry:
• There are 3 value names: RTHDVCPL, NvBackend, and BTMTrayAgent
salt.states.reg.absent(name, vname=None, use_32bit_registry=False) Ensure a registry value is removed. To remove a key use key_absent.
A string value representing the full path of the key to include the HIVE, Key, and all Subkeys. For example:
HKEY_LOCAL_MACHINE\\SOFTWARE\\Salt
Valid hive values include:
• HKEY_USERS or HKU
• vname (str) -- The name of the value you'd like to create beneath the Key. If this parameter is not passed it will assume you want to set the (Default) value
• use_32bit_registry (bool) -- Use the 32bit portion of the registry. Applies only to 64bit windows. 32bit Windows will ignore this parameter. Default is False.
Returns A dictionary showing the results of the registry operation.
'HKEY_CURRENT_USER\\SOFTWARE\\Salt': reg.absent - vname: version
In the above example the value named version will be removed from the SOFTWARE\Salt key in the HKEY_CURRENT_USER hive. If vname was not passed, the (Default) value would be deleted.
salt.states.reg.key_absent(name, use_32bit_registry=False) New in version 2015.5.4.
Ensure a registry key is removed. This will remove the key, subkeys, and all value entries.
A string representing the full path to the key to be removed to include the hive and the keypath. The hive can be any of the following:
CLI Example: The following example will delete the SOFTWARE\DeleteMe key in the HKEY_LOCAL_MACHINE hive including all its subkeys and value pairs.
remove_key_demo: reg.key_absent: - name: HKEY_CURRENT_USER\SOFTWARE\DeleteMe
In the above example the path is interpreted as follows:
• HKEY_CURRENT_USER is the hive
• SOFTWARE\DeleteMe is the key
salt.states.reg.present(name, vname=None, vdata=None, vtype='REG_SZ', use_32bit_registry=False, win_owner=None, win_perms=None, win_deny_perms=None, win_inheritance=True, win_perms_reset=False) Ensure a registry key or value is present.
NOTE: When setting REG_BINARY, string data will be converted to binary automatically. To pass binary data, use the built-in yaml tag !!binary to denote the actual binary characters. For example, the following lines will both set the same data in the registry:
• vdata: Salty Test
• vdata: !!binary U2FsdHkgVGVzdA==\n
For more information about the !!binary tag see here
NOTE: The type for the (Default) value is always REG_SZ and cannot be changed. This parameter is optional. If not passed, the Key will be created with no associated item/value pairs.
• vtype (str) --
The value type for the data you wish to store in the registry. Valid values are:
• REG_BINARY
• REG_DWORD
• REG_EXPAND_SZ
• REG_MULTI_SZ
• REG_QWORD
• REG_SZ (Default)
• win_owner (str) --
The owner of the registry key. If this is not passed, the account under which Salt is running will be used.
NOTE: Owner is set for the key that contains the value/data pair. You cannot set ownership on value/data pairs themselves.
• win_perms (dict) --
A dictionary containing permissions to grant and their propagation.  If not passed the 'Grant` permissions will not be modified.
NOTE: Permissions are set for the key that contains the value/data pair. You cannot set permissions on value/data pairs themselves.
For each user specify the account name, with a sub dict for the permissions to grant and the 'Applies to' setting. For example: {'Administrators': {'perms': 'full_control', 'applies_to': 'this_key_subkeys'}}. perms must be specified.
Registry permissions are specified using the perms key. You can specify a single basic permission or a list of advanced perms. The following are valid perms:
Basic (passed as a string):
• full_control
• read
• write
Advanced (passed as a list):
• query_value
• set_value
• create_subkey
• enum_subkeys
• notify
• create_link
• read_control
• write_dac
• write_owner
The 'Applies to' setting is optional. It is specified using the applies_to key. If not specified this_key_subkeys is used.  Valid options are:
Applies to settings:
• this_key_only
• this_key_subkeys
• subkeys_only
• win_deny_perms (dict) --
A dictionary containing permissions to deny and their propagation.  If not passed the Deny permissions will not be modified.
Valid options are the same as those specified in win_perms
'Deny' permissions always take precedence over 'grant' permissions.
• win_inheritance (bool) --
True to inherit permissions from the parent key. False to disable inheritance. Default is True.
NOTE: Inheritance is set for the key that contains the value/data pair. You cannot set inheritance on value/data pairs themselves.
• win_perms_reset (bool) --
If True the existing DACL will be cleared and replaced with the settings defined in this function. If False, new entries will be appended to the existing DACL. Default is False
NOTE: Perms are reset for the key that contains the value/data pair.  You cannot set permissions on value/data pairs themselves.
The following example will set the (Default) value for the SOFTWARE\\Salt key in the HKEY_CURRENT_USER hive to 2016.3.1:
HKEY_CURRENT_USER\\SOFTWARE\\Salt: reg.present: - vdata: 2016.3.1
The following example will set the value for the version entry under the SOFTWARE\\Salt key in the HKEY_CURRENT_USER hive to 2016.3.1. The value will be reflected in Wow6432Node:
HKEY_CURRENT_USER\\SOFTWARE\\Salt: reg.present: - vname: version - vdata: 2016.3.1
• SOFTWARE\\Salt is the key
• vname is the value name ('version') that will be created under the key
• vdata is the data that will be assigned to 'version'
Binary data can be set in two ways. The following two examples will set a binary value of Salty Test
no_conversion: reg.present: - name: HKLM\SOFTWARE\SaltTesting - vname: test_reg_binary_state - vdata: Salty Test - vtype: REG_BINARY
conversion: reg.present: - name: HKLM\SOFTWARE\SaltTesting - vname: test_reg_binary_state_with_tag - vdata: !!binary U2FsdHkgVGVzdA==\n - vtype: REG_BINARY
To set a REG_MULTI_SZ value:
reg_multi_sz: reg.present: - name: HKLM\SOFTWARE\Salt - vname: reg_multi_sz - vdata: - list item 1 - list item 2
To ensure a key is present and has permissions:
set_key_permissions: reg.present: - name: HKLM\SOFTWARE\Salt - vname: version - vdata: 2016.3.1 - win_owner: Administrators - win_perms: jsnuffy: perms: full_control sjones: perms: - read_control - enum_subkeys - query_value applies_to: - this_key_only - win_deny_perms: bsimpson: perms: full_control applies_to: this_key_subkeys - win_inheritance: True - win_perms_reset: True
salt.states.rsync State to synchronize files and directories with rsync.
/opt/user-backups: rsync.synchronized: - source: /home - force: True
salt.states.rsync.synchronized(name, source, delete=False, force=False, update=False, passwordfile=None, exclude=None, excludefrom=None, prepare=False, dryrun=False, additional_opts=None) Guarantees that the source directory is always copied to the target.
name   Name of the target directory.
source Source directory.
prepare Create destination directory if it does not exists.
delete Delete extraneous files from the destination dirs (True or False)
force  Force deletion of dirs even if not empty
update Skip files that are newer on the receiver (True or False)
passwordfile Read daemon-access password from the file (path)
exclude Exclude files, that matches pattern.
excludefrom Read exclude patterns from the file (path)
dryrun Perform a trial run with no changes made. Is the same as doing test=True
additional_opts Pass additional options to rsync, should be included as a list.
salt.states.rvm Managing Ruby installations and gemsets with Ruby Version Manager (RVM) This module is used to install and manage ruby installations and gemsets with RVM, the Ruby Version Manager. Different versions of ruby can be installed and gemsets created. RVM itself will be installed automatically if it's not present. This module will not automatically install packages that RVM depends on or ones that are needed to build ruby. If you want to run RVM as an unprivileged user (recommended) you will have to create this user yourself. This is how a state configuration could look like:
rvm: group.present: [] user.present: - gid: rvm - home: /home/rvm - require: - group: rvm
rvm-deps: pkg.installed: - pkgs: - bash - coreutils - gzip - bzip2 - gawk - sed - curl - git-core - subversion
mri-deps: pkg.installed: - pkgs: - build-essential - openssl - libreadline6 - libreadline6-dev - curl - git-core - zlib1g - zlib1g-dev - libssl-dev - libyaml-dev - libsqlite3-0 - libsqlite3-dev - sqlite3 - libxml2-dev - libxslt1-dev - autoconf - libc6-dev - libncurses5-dev - automake - libtool - bison - subversion - ruby
jruby-deps: pkg.installed: - pkgs: - curl - g++ - openjdk-6-jre-headless
ruby-1.9.2: rvm.installed: - default: True - user: rvm - require: - pkg: rvm-deps - pkg: mri-deps - user: rvm
jruby: rvm.installed: - user: rvm - require: - pkg: rvm-deps - pkg: jruby-deps - user: rvm
jgemset: rvm.gemset_present: - ruby: jruby - user: rvm - require: - rvm: jruby
mygemset: rvm.gemset_present: - ruby: ruby-1.9.2 - user: rvm - require: - rvm: ruby-1.9.2
salt.states.rvm.gemset_present(name, ruby='default', user=None) Verify that the gemset is present.
name   The name of the gemset.
ruby: default The ruby version this gemset belongs to.
user: None The user to run rvm as.
salt.states.rvm.installed(name, default=False, user=None, opts=None, env=None) Verify that the specified ruby is installed with RVM. RVM is installed when necessary.
env: None A list of environment variables to set (ie, RUBY_CONFIGURE_OPTS)
opts: None A list of option flags to pass to RVM (ie -C, --patch)
salt.states.salt_proxy Salt proxy state
State to deploy and run salt-proxy processes on a minion.
Set up pillar data for your proxies per the documentation.
Run the state as below
salt-proxy-configure: salt_proxy.configure_proxy: - proxyname: p8000 - start: True
This state will configure the salt proxy settings within /etc/salt/proxy (if /etc/salt/proxy doesn't exists) and start the salt-proxy process (default true), if it isn't already running.
salt.states.salt_proxy.configure_proxy(name, proxyname='p8000', start=True) Create the salt proxy file and start the proxy process if required
• name -- The name of this state
• start -- Boolean indicating if the process should be started
salt.states.saltmod Control the Salt command interface This state is intended for use from the Salt Master. It provides access to sending commands down to minions as well as access to executing master-side modules. These state functions wrap Salt's Python API. New in version 2016.11.0.
Support for masterless minions was added to the salt.state function, so they can run orchestration sls files. This is particularly useful when the rendering of a state is dependent on the execution of another state.  Orchestration will render and execute each orchestration block independently, while honoring requisites to ensure the states are applied in the correct order.
• The Orchestrate runner
salt.states.saltmod.function(name, tgt, ssh=False, tgt_type='glob', ret='', ret_config=None, ret_kwargs=None, expect_minions=False, fail_minions=None, fail_function=None, arg=None, kwarg=None, timeout=None, batch=None, subset=None, failhard=None, **kwargs) Execute a single module function on a remote minion via salt or salt-ssh
name   The name of the function to run, aka cmd.run or pkg.install
tgt    The target specification, aka '*' for all minions
tgt_type The target type, defaults to glob
arg    The list of arguments to pass into the function
kwarg  The dict (not a list) of keyword arguments to pass into the function
ret    Optionally set a single or a list of returners to use
ret_config Use an alternative returner configuration
ret_kwargs Override individual returner configuration items
expect_minions An optional boolean for failing if some minions do not respond
fail_minions An optional list of targeted minions where failure is an option
fail_function An optional string that points to a salt module that returns True or False based on the returned data dict for individual minions
ssh    Set to True to use the ssh client instead of the standard salt client
batch  Execute the command in batches. E.g.: 10%.
subset Number of minions from the targeted set to randomly use
failhard pass failhard down to the executing state
New in version 2019.2.2.
salt.states.saltmod.parallel_runners(name, runners, **kwargs) Executes multiple runner modules on the master in parallel.
A separate thread is spawned for each runner. This state is intended to be used with the orchestrate runner in place of the saltmod.runner state when different tasks should be run in parallel. In general, Salt states are not safe when used concurrently, so ensure that they are used in a safe way (e.g. by only targeting separate minions in parallel tasks).
name:  name identifying this state. The name is provided as part of the output, but not used for anything else.
runners: list of runners that should be run in parallel. Each element of the list has to be a dictionary. This dictionary's name entry stores the name of the runner function that shall be invoked. The optional kwarg entry stores a dictionary of named arguments that are passed to the runner function.
parallel-state: salt.parallel_runners: - runners: my_runner_1: - name: state.orchestrate - kwarg: mods: orchestrate_state_1 my_runner_2: - name: state.orchestrate - kwarg: mods: orchestrate_state_2
salt.states.saltmod.runner(name, **kwargs) Execute a runner module on the master
run-manage-up: salt.runner: - name: manage.up
salt.states.saltmod.state(name, tgt, ssh=False, tgt_type='glob', ret='', ret_config=None, ret_kwargs=None, highstate=None, sls=None, top=None, saltenv=None, test=None, pillar=None, pillarenv=None, expect_minions=True, exclude=None, fail_minions=None, allow_fail=0, concurrent=False, timeout=None, batch=None, queue=False, subset=None, orchestration_jid=None, failhard=None, **kwargs) Invoke a state run on a given target
name   An arbitrary name used to track the state execution
tgt    The target specification for the state run.
Masterless support: When running on a masterless minion, the tgt is ignored and will always be the local minion.
tgt_type The target type to resolve, defaults to glob
highstate Defaults to None, if set to True the target systems will ignore any sls references specified in the sls option and call state.highstate on the targeted minions
top    Should be the name of a top file. If set state.top is called with this top file instead of state.sls.
sls    A group of sls files to execute. This can be defined as a single string containing a single sls file, or a list of sls files
test   Pass test=true or test=false through to the state function. This can be used to override a test mode set in the minion's config file. If left as the default of None and the 'test' mode is supplied on the command line, that value is passed instead.
pillar Pass the pillar kwarg through to the state function
pillarenv The pillar environment to grab pillars from
roster In the event of using salt-ssh, a roster system can be set