neulab/tldr huggingface dataset:
target Name of the target directory where the checkout will put the working directory
rev    None The name revision number to checkout. Enable "force" if the directory already exists.
user   None Name of the user performing repository management operations
username None The user to access the name repository with. The svn default is the current user
password Connect to the Subversion server with this password
force  False Continue if conflicts are encountered
overwrite False Overwrite existing target
externals True Change to False to not checkout or update externals
trust  False Automatically trust the remote server. SVN's --trust-server-cert
trust_failures None Comma-separated list of certificate trust failures, that shall be ignored. This can be used if trust=True is not sufficient. The specified string is passed to SVN's --trust-server-cert-failures option as-is.
salt.states.svn.latest(name, target=None, rev=None, user=None, username=None, password=None, force=False, externals=True, trust=False, trust_failures=None) Checkout or update the working directory to the latest revision from the remote repository.
name   Address of the name repository as passed to "svn checkout"
salt.states.sysctl Configuration of the kernel using sysctl Control the kernel sysctl system.
vm.swappiness: sysctl.present: - value: 20
salt.states.sysctl.present(name, value, config=None) Ensure that the named sysctl value is set in memory and persisted to the named configuration file. The default sysctl configuration file is /etc/sysctl.conf
name   The name of the sysctl value to edit
value  The sysctl value to apply
config The location of the sysctl configuration file. If not specified, the proper location will be detected based on platform.
salt.states.syslog_ng State module for syslog_ng maintainer Tibor Benke <btibi@sch.bme.hu>
depends cmd, ps, syslog_ng
Users can generate syslog-ng configuration files from YAML format or use plain ones and reload, start, or stop their syslog-ng by using this module.
Details The service module is not available on all system, so this module includes syslog_ng.reloaded, syslog_ng.stopped, and syslog_ng.started functions.  If the service module is available on the computers, users should use that.
Users can generate syslog-ng configuration with syslog_ng.config function.  For more information see syslog-ng state usage.
Syslog-ng configuration file format The syntax of a configuration snippet in syslog-ng.conf: object_type object_id {<options>};
These constructions are also called statements. There are options inside of them: option(parameter1, parameter2); option2(parameter1, parameter2);
You can find more information about syslog-ng's configuration syntax in the Syslog-ng Admin guide: http://www.balabit.com/sites/default/files/documents/syslog-ng-ose-3.5-guides/en/syslog-ng-ose-v3.5-guide-admin/html-single/index.html#syslog-ng.conf.5
salt.states.syslog_ng.config(name, config, write=True) Builds syslog-ng configuration.
name : the id of the Salt document config : the parsed YAML code write : if True, it writes  the config into the configuration file, otherwise just returns it
salt.states.syslog_ng.reloaded(name) Reloads syslog-ng.
salt.states.syslog_ng.started(name=None, user=None, group=None, chroot=None, caps=None, no_caps=False, pidfile=None, enable_core=False, fd_limit=None, verbose=False, debug=False, trace=False, yydebug=False, persist_file=None, control=None, worker_threads=None, *args, **kwargs) Ensures, that syslog-ng is started via the given parameters.
Users shouldn't use this function, if the service module is available on their system.
salt.states.syslog_ng.stopped(name=None) Kills syslog-ng.
salt.states.sysrc State to work with sysrc
salt.states.sysrc.absent(name, **kwargs) Ensure a sysrc variable is absent.
name   The variable name to set
file   (optional) The rc file to add the variable to.
jail   (option) the name or JID of the jail to set the value in.
salt.states.sysrc.managed(name, value, **kwargs) Ensure a sysrc variable is set to a specific value.
value  Value to set the variable to
syslogd: sysrc.managed: - name: syslogd_flags - value: -ss
salt.states.telemetry_alert Manage Telemetry alert configurations New in version 2016.3.0.
Create, Update and destroy Mongo Telemetry alert configurations.
This module uses requests, which can be installed via package, or pip.
This module accepts explicit credential (telemetry api key) or can also read api key credentials from a pillar.  Example:
ensure telemetry alert X is defined on deployment Y: telemetry_alert.present: - deployment_id: "rs-XXXXXX" - metric_name: "testMetric" - alert_config: max: 1 filter:  SERVER_ROLE_MONGOD_PRIMARY escalate_to: "example@pagerduty.com" - name: "**MANAGED BY ORCA DO NOT EDIT BY HAND** manages alarm on testMetric"
salt.states.telemetry_alert.absent(name, deployment_id, metric_name, api_key=None, profile='telemetry') Ensure the telemetry alert config is deleted
name   An optional description of the alarms (not currently supported by telemetry API)
deployment_id Specifies the ID of the root deployment resource (replica set cluster or sharded cluster) to which this alert definition is attached
metric_name Specifies the unique ID of the metric to whose values these thresholds will be applied
api_key Telemetry api key for the user
profile A dict with telemetry config data. If present, will be used instead of api_key.
salt.states.telemetry_alert.present(name, deployment_id, metric_name, alert_config, api_key=None, profile='telemetry') Ensure the telemetry alert exists.
name   An optional description of the alarm (not currently supported by telemetry API)
alert_config: Is a list of dictionaries where each dict contains the following fields:
filter By default the alert will apply to the deployment and all its constituent resources.  If the alert only applies to a subset of those resources, a filter may be specified to narrow this scope.
min    the smallest "ok" value the metric may take on; if missing or null, no minimum is enforced.
max    the largest "ok" value the metric may take on; if missing or null, no maximum is enforced.
notify_all Used to indicate if you want to alert both onCallEngineer and apiNotifications
profile A dict of telemetry config information.  If present, will be used instead of api_key.
salt.states.test Test States Provide test case states that enable easy testing of things to do with state calls, e.g. running, calling, logging, output filtering etc.
always-passes-with-any-kwarg: test.nop: - name: foo - something: else - foo: bar
always-passes: test.succeed_without_changes: - name: foo
always-fails: test.fail_without_changes: - name: foo
always-changes-and-succeeds: test.succeed_with_changes: - name: foo
always-changes-and-fails: test.fail_with_changes: - name: foo
my-custom-combo: test.configurable_test_state: - name: foo - changes: True - result: False - comment: bar.baz - warnings: A warning
is-pillar-foo-present-and-bar-is-int: test.check_pillar: - present: - foo - integer: - bar
You may also use these states for controlled failure in state definitions, for example if certain conditions in pillar or grains do not apply. The following state definition will fail with a message "OS not supported!" when grains['os'] is neither Ubuntu nor CentOS:
{% if grains['os'] in ['Ubuntu', 'CentOS'] %}
# Your state definitions go here
{% else %} failure: test.fail_without_changes: - name: "OS not supported!" - failhard: True {% endif %}
salt.states.test.check_pillar(name, present=None, boolean=None, integer=None, string=None, listing=None, dictionary=None, verbose=False) Checks the presence and, optionally, the type of given keys in Pillar
Supported kwargs for types are: - boolean (bool) - integer (int) - string (str) - listing (list) - dictionary (dict)
Checking for None type pillars is not implemented yet.
salt.states.test.configurable_test_state(name, changes=True, result=True, comment='', warnings=None) New in version 2014.7.0.
A configurable test state which allows for more control over the return data
name   A unique string to serve as the state's ID
changes True Controls whether or not the state reports that there were changes.  There are three supported values for this argument:
• If True, the state will report changes
• If False, the state will report no changes
• If "Random", the state will randomly report either changes or no changes.
result True Controls the result for for the state. Like changes, there are three supported values for this argument:
• If True, the state will report a True result
• If False, the state will report a False result
• If "Random", the state will randomly report either True
NOTE: The result will be reported as None if all of the following are true:
1. The state is being run in test mode (i.e. test=True on the CLI)
2. result is True (either explicitly, or via being set to "Random")
3. changes is True (either explicitly, or via being set to "Random")
comment "" Comment field field for the state. By default, this is an empty string.
warnings A string (or a list of strings) to fill the warnings field with.  Default is None
salt.states.test.fail_with_changes(name, **kwargs) New in version 2014.7.0.
Returns False with an non-empty changes dictionary. Useful for testing requisites.
salt.states.test.fail_without_changes(name, **kwargs) New in version 2014.7.0.
Returns failure
salt.states.test.mod_watch(name, sfun=None, **kwargs) Call this function via a watch statement
Any parameters in the state return dictionary can be customized by adding the keywords result, comment, and changes.
this_state_will_return_changes: test.succeed_with_changes
this_state_will_NOT_return_changes: test.succeed_without_changes
this_state_is_watching_another_state: test.succeed_without_changes: - comment: 'This is a custom comment' - watch: - test: this_state_will_return_changes - test: this_state_will_NOT_return_changes
this_state_is_also_watching_another_state: test.succeed_without_changes: - watch: - test: this_state_will_NOT_return_changes
salt.states.test.nop(name, **kwargs) New in version 2015.8.1.
A no-op state that does nothing. Useful in conjunction with the use requisite, or in templates which could otherwise be empty due to jinja rendering.
salt.states.test.show_notification(name, text=None, **kwargs) New in version 2015.8.0.
Simple notification using text argument.
text   Text to return in the comment field
salt.states.test.succeed_with_changes(name, **kwargs) New in version 2014.7.0.
Returns True with an non-empty changes dictionary. Useful for testing requisites.
salt.states.test.succeed_without_changes(name, **kwargs) New in version 2014.7.0.
Returns successful
salt.states.testinframod salt.states.testinframod.camel_to_snake_case(camel_input) Converts camelCase (or CamelCase) to snake_case.  From https://codereview.stackexchange.com/questions/185966/functions-to-convert-camelcase-strings-to-snake-case
salt.states.timezone Management of timezones The timezone can be managed for the system:
America/Denver: timezone.system
The system and the hardware clock are not necessarily set to the same time.  By default, the hardware clock is set to localtime, meaning it is set to the same time as the system clock. If utc is set to True, then the hardware clock will be set to UTC, and the system clock will be an offset of that.
America/Denver: timezone.system: - utc: True
The Ubuntu community documentation contains an explanation of this setting, as it applies to systems that dual-boot with Windows. This is explained in greater detail here.
salt.states.timezone.system(name, utc=True) Set the timezone for the system.
name   The name of the timezone to use (e.g.: America/Denver)
utc    Whether or not to set the hardware clock to UTC (default is True)
salt.states.tls Enforce state for SSL/TLS salt.states.tls.valid_certificate(name, weeks=0, days=0, hours=0, minutes=0, seconds=0) Verify that a TLS certificate is valid now and (optionally) will be valid for the time specified through weeks, days, hours, minutes, and seconds.
salt.states.tomcat Manage Apache Tomcat web applications NOTE: This state requires the Tomcat Manager webapp to be installed and running.
The following grains/pillars must be set for communication with Tomcat Manager to work:
tomcat-manager: user: 'tomcat-manager' passwd: 'Passw0rd'
Configuring Tomcat Manager To manage webapps via the Tomcat Manager, you'll need to configure a valid user in the file conf/tomcat-users.xml.
conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="manager-script"/> <user username="tomcat-manager" password="Passw0rd" roles="manager-script"/> </tomcat-users>
• Using multiple versions (aka. parallel deployments) on the same context path is not supported.
• More information about the Tomcat Manager: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html
• If you use only this module for deployments you might want to restrict access to the manager so it's only accessible via localhost.  For more info: http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Configuring_Manager_Application_Access
Last tested on:
Tomcat Version: Apache Tomcat/7.0.54
JVM Vendor: Oracle Corporation
JVM Version: 1.8.0_101-b13
OS Version: 3.10.0-327.22.2.el7.x86_64
salt.states.tomcat.mod_watch(name, url='http://localhost:8080/manager', timeout=180) The tomcat watcher, called to invoke the watch command.  When called, it will reload the webapp in question
salt.states.tomcat.undeployed(name, url='http://localhost:8080/manager', timeout=180) Enforce that the WAR will be undeployed from the server
name   The context path to undeploy.
url    http://localhost:8080/manager The URL of the server with the Tomcat Manager webapp.
timeout 180 Timeout for HTTP request to the Tomcat Manager.
jenkins: tomcat.undeployed: - name: /ran - require: - service: application-service
salt.states.tomcat.wait(name, url='http://localhost:8080/manager', timeout=180) Wait for the Tomcat Manager to load.
Notice that if tomcat is not running we won't wait for it start and the state will fail. This state can be required in the tomcat.war_deployed state to make sure tomcat is running and that the manager is running as well and ready for deployment.
tomcat-service: service.running: - name: tomcat - enable: True
wait-for-tomcatmanager: tomcat.wait: - timeout: 300 - require: - service: tomcat-service
jenkins: tomcat.war_deployed: - name: /ran - war: salt://jenkins-1.2.4.war - require: - tomcat: wait-for-tomcatmanager
salt.states.tomcat.war_deployed(name, war, force=False, url='http://localhost:8080/manager', timeout=180, temp_war_location=None, version=True) Enforce that the WAR will be deployed and started in the context path, while making use of WAR versions in the filename.
NOTE: For more info about Tomcats file paths and context naming, please see http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Naming
name   The context path to deploy (incl. forward slash) the WAR to.
war    Absolute path to WAR file (should be accessible by the user running Tomcat) or a path supported by the salt.modules.cp.get_url function.
force  False Force deployment even if the version strings are the same.  Disabled by default.
url    http://localhost:8080/manager The URL of the Tomcat Web Application Manager.
timeout 180 Timeout for HTTP requests to the Tomcat Manager.
temp_war_location None Use another location to temporarily copy the WAR file to.  By default the system's temp directory is used.
version '' Specify the WAR version.  If this argument is provided, it overrides the version encoded in the WAR file name, if one is present.
Use False or blank value to prevent guessing the version and keeping it blank.
jenkins: tomcat.war_deployed: - name: /salt-powered-jenkins - war: salt://jenkins-1.2.4.war - require: - service: application-service
NOTE: Be aware that in the above example the WAR jenkins-1.2.4.war will be deployed to the context path salt-powered-jenkins##1.2.4. To avoid this either specify a version yourself, or set version to False.
salt.states.trafficserver Control Apache Traffic Server New in version 2015.8.0.
salt.states.trafficserver.bounce_cluster(name) Bounce all Traffic Server nodes in the cluster. Bouncing Traffic Server shuts down and immediately restarts Traffic Server, node-by-node.
bounce_ats_cluster: trafficserver.bounce_cluster
salt.states.trafficserver.bounce_local(name, drain=False) Bounce Traffic Server on the local node. Bouncing Traffic Server shuts down and immediately restarts the Traffic Server node.
This option modifies the behavior of traffic_line -b and traffic_line -L such that traffic_server is not shut down until the number of active client connections drops to the number given by the proxy.config.restart.active_client_threshold configuration variable.
bounce_ats_local: trafficserver.bounce_local
bounce_ats_local: trafficserver.bounce_local - drain: True
salt.states.trafficserver.clear_cluster(name) Clears accumulated statistics on all nodes in the cluster.
clear_ats_cluster: trafficserver.clear_cluster
salt.states.trafficserver.clear_node(name) Clears accumulated statistics on the local node.
clear_ats_node: trafficserver.clear_node
salt.states.trafficserver.config(name, value) Set Traffic Server configuration variable values.
proxy.config.proxy_name: trafficserver.config: - value: cdn.site.domain.tld
traffic_server_setting: trafficserver.config: - name: proxy.config.proxy_name - value: cdn.site.domain.tld
salt.states.trafficserver.offline(name, path) Mark a cache storage device as offline. The storage is identified by a path which must match exactly a path specified in storage.config. This removes the storage from the cache and redirects requests that would have used this storage to other storage. This has exactly the same effect as a disk failure for that storage. This does not persist across restarts of the traffic_server process.
offline_ats_path: trafficserver.offline: - path: /path/to/cache
salt.states.trafficserver.refresh(name) Initiate a Traffic Server configuration file reread. Use this command to update the running configuration after any configuration file modification.
refresh_ats: trafficserver.refresh
salt.states.trafficserver.restart_cluster(name) Restart the traffic_manager process and the traffic_server process on all the nodes in a cluster.
restart_ats_cluster: trafficserver.restart_cluster
salt.states.trafficserver.restart_local(name, drain=False) Restart the traffic_manager and traffic_server processes on the local node.
restart_ats_local: trafficserver.restart_local
restart_ats_local_drain: trafficserver.restart_local - drain: True
salt.states.trafficserver.shutdown(name) Shut down Traffic Server on the local node.
shutdown_ats: trafficserver.shutdown
salt.states.trafficserver.startup(name) Start Traffic Server on the local node.
startup_ats: trafficserver.startup
salt.states.trafficserver.zero_cluster(name) Reset performance statistics to zero across the cluster.
zero_ats_cluster: trafficserver.zero_cluster
salt.states.trafficserver.zero_node(name) Reset performance statistics to zero on the local node.
zero_ats_node: trafficserver.zero_node
salt.states.tuned Interface to Red Hat tuned-adm module
depends cmd.run
salt.states.tuned.off(name=None) Turns 'tuned' off.  Example tuned.sls file for turning tuned off:
tuned: tuned.off: []
To see a valid list of states call execution module: tuned.list
salt.states.tuned.profile(name) This state module allows you to modify system tuned parameters
Example tuned.sls file to set profile to virtual-guest
tuned:
• name: virtual-guest
name   tuned profile name to set the system to
salt.states.uptime Monitor Web Server with Uptime Uptime is an open source remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.
NOTE: This state module requires a pillar to specify the location of your uptime install
uptime: application_url: "http://uptime-url.example.org"
url: uptime.monitored url/sitemap.xml: uptime.monitored: - polling: 600 # every hour
salt.states.uptime.monitored(name, **params) Makes sure an URL is monitored by uptime. Checks if URL is already monitored, and if not, adds it.
salt.states.user Management of user accounts. The user module is used to create and manage user settings, users can be set as either absent or present
fred: user.present: - fullname: Fred Jones - shell: /bin/zsh - home: /home/fred - uid: 4000 - gid: 4000 - groups: - wheel - storage - games
testuser: user.absent
salt.states.user.absent(name, purge=False, force=False) Ensure that the named user is absent
purge  Set purge to True to delete all of the user's files as well as the user, Default is False.
force  If the user is logged in, the absent state will fail. Set the force option to True to remove the user even if they are logged in. Not supported in FreeBSD and Solaris, Default is False.
salt.states.user.present(name, uid=None, gid=None, usergroup=None, groups=None, optional_groups=None, remove_groups=True, home=None, createhome=True, password=None, hash_password=False, enforce_password=True, empty_password=False, shell=None, unique=True, system=False, fullname=None, roomnumber=None, workphone=None, homephone=None, other=None, loginclass=None, date=None, mindays=None, maxdays=None, inactdays=None, warndays=None, expire=None, win_homedrive=None, win_profile=None, win_logonscript=None, win_description=None, nologinit=False, allow_uid_change=False, allow_gid_change=False) Ensure that the named user is present with the specified properties
uid    The user id to assign. If not specified, and the user does not exist, then the next available uid will be assigned.
gid    The id of the default group to assign to the user. Either a group name or gid can be used. If not specified, and the user does not exist, then the next available gid will be assigned.
allow_uid_change False Set to True to allow the state to update the uid.
allow_gid_change False Set to True to allow the state to update the gid.
usergroup If True, a group with the same name as the user will be created. If False, a group with the same name as the user will not be created. The default is distribution-specific. See the USERGROUPS_ENAB section of the login.defs(5) man page.
NOTE: Only supported on GNU/Linux distributions
groups A list of groups to assign the user to, pass a list object. If a group specified here does not exist on the minion, the state will fail.  If set to the empty list, the user will be removed from all groups except the default group. If unset, salt will assume current groups are still wanted, and will make no changes to them.
optional_groups A list of groups to assign the user to, pass a list object. If a group specified here does not exist on the minion, the state will silently ignore it.
NOTE: If the same group is specified in both "groups" and "optional_groups", then it will be assumed to be required and not optional.
remove_groups Remove groups that the user is a member of that weren't specified in the state, Default is True.
home   The custom login directory of user. Uses default value of underlying system if not set. Notice that this directory does not have to exist.  This also the location of the home directory to create if createhome is set to True.
createhome True If set to False, the home directory will not be created if it doesn't already exist.
WARNING: Not supported on Windows or Mac OS.
Additionally, parent directories will not be created. The parent directory for home must already exist.
nologinit False If set to True, it will not add the user to lastlog and faillog databases.
NOTE: Not supported on Windows.
password A password hash to set for the user. This field is only supported on Linux, FreeBSD, NetBSD, OpenBSD, and Solaris. If the empty_password argument is set to True then password is ignored.  For Windows this is the plain text password. For Linux, the hash can be generated with mkpasswd -m sha-256.
Changed in version 0.16.0: BSD support added.
hash_password Set to True to hash the clear text password. Default is False.
enforce_password Set to False to keep the password from being changed if it has already been set and the password hash differs from what is specified in the "password" field. This option will be ignored if "password" is not specified, Default is True.
empty_password Set to True to enable password-less login for user, Default is False.
shell  The login shell, defaults to the system default shell
unique Require a unique UID, Default is True.
system Choose UID in the range of FIRST_SYSTEM_UID and LAST_SYSTEM_UID, Default is False.
loginclass The login class, defaults to empty (BSD only)
User comment field (GECOS) support (currently Linux, BSD, and MacOS only):
The below values should be specified as strings to avoid ambiguities when the values are loaded. (Especially the phone and room number fields which are likely to contain numeric data)
fullname The user's full name
roomnumber The user's room number (not supported in MacOS)
workphone The user's work phone number (not supported in MacOS)
homephone The user's home phone number (not supported in MacOS)
other  The user's other attribute (not supported in MacOS) If GECOS field contains more than 4 commas, this field will have the rest of 'em
Changed in version 2014.7.0: Shadow attribute support added.
Shadow attributes support (currently Linux only):
The below values should be specified as integers.
date   Date of last change of password, represented in days since epoch (January 1, 1970).
mindays The minimum number of days between password changes.
maxdays The maximum number of days between password changes.
inactdays The number of days after a password expires before an account is locked.
warndays Number of days prior to maxdays to warn users.
expire Date that account expires, represented in days since epoch (January 1, 1970).
The below parameters apply to windows only:
win_homedrive (Windows Only) The drive letter to use for the home directory. If not specified the home directory will be a unc path. Otherwise the home directory will be mapped to the specified drive. Must be a letter followed by a colon.  Because of the colon, the value must be surrounded by single quotes. ie: - win_homedrive: 'U:
win_profile (Windows Only) The custom profile directory of the user. Uses default value of underlying system if not set.
win_logonscript (Windows Only) The full path to the logon script to run when the user logs in.
win_description (Windows Only) A brief description of the purpose of the users account.
salt.states.vagrant Manage Vagrant VMs Manange execution of Vagrant virtual machines on Salt minions.
Vagrant is a tool for building and managing virtual machine environments. It can use various providers, such as VirtualBox, Docker, or VMware, to run its VMs.  Vagrant provides some of the functionality of a light-weight hypervisor.  The combination of Salt modules, Vagrant running on the host, and a virtual machine provider, gives hypervisor-like functionality for developers who use Vagrant to quickly define their virtual environments. New in version 2018.3.0.
The configuration of each virtual machine is defined in a file named Vagrantfile which must exist on the VM host machine.  The essential parameters which must be defined to start a Vagrant VM are the directory where the Vagrantfile is located (argument cwd:), and the username which will own the Vagrant box created for the VM ( argument vagrant_runas:).
A single Vagrantfile may define one or more virtual machines.  Use the machine argument to chose among them. The default (blank) value will select the primary (or only) machine in the Vagrantfile.
[NOTE:] Each virtual machine host must have the following:
• a working salt-minion
• a Salt sdb database configured for vagrant_sdb_data.
• Vagrant installed and the vagrant command working
• a suitable VM provider
# EXAMPLE: # file /etc/salt/minion.d/vagrant_sdb.conf on the host computer #  -- this sdb database is required by the Vagrant module -- vagrant_sdb_data:  # The sdb database must have this name. driver: sqlite3  # Let's use SQLite to store the data ... database: /var/cache/salt/vagrant.sqlite  # ... in this file ... table: sdb  # ... using this table name. create_table: True  # if not present
salt.states.vagrant.destroyed(name) Stops a VM (or VMs) and removes all references to it (them). (Runs vagrant destroy.)
Subsequent re-use of the same machine will requere another operation of vagrant.running or a call to the vagrant.init execution module.
Parameters name -- May be a Salt_id node or a POSIX-style wildcard string.
node_name: vagrant.destroyed
salt.states.vagrant.initialized(name, **kwargs) Defines a new VM with specified arguments, but does not start it.
Parameters name -- the Salt_id node name you wish your VM to have.
Each machine must be initialized individually using this function or the "vagrant.running" function, or the vagrant.init execution module call.
This command will not change the state of a running or paused machine.
Possible keyword arguments:
• cwd: The directory (path) containing the Vagrantfile
• machine: ('') the name of the machine (in the Vagrantfile) if not default
• vagrant_runas: ('root') the username who owns the vagrantbox file
• vagrant_provider: the provider to run the VM (usually 'virtualbox')
• vm: ({}) a dictionary containing these or other keyword arguments
node_name1: vagrant.initialized - cwd: /projects/my_project - vagrant_runas: my_username - machine: machine1
node_name2: vagrant.initialized - cwd: /projects/my_project - vagrant_runas: my_username - machine: machine2
start_nodes: vagrant.start: - name: node_name?
salt.states.vagrant.paused(name) Stores the state of a VM (or VMs) for fast restart. (Runs vagrant suspend.)
node_name: vagrant.paused
salt.states.vagrant.powered_off(name) Stops a VM (or VMs) by power off.  (Runs vagrant halt.)
This method is provided for compatibility with other VM-control state modules. For Vagrant, the action is identical with stopped.
node_name: vagrant.unpowered
salt.states.vagrant.rebooted(name) Reboots a running, paused, or stopped VM (or VMs). (Runs vagrant reload.)
The  will re-run the provisioning
node_name: vagrant.reloaded
salt.states.vagrant.running(name, **kwargs) Defines and starts a new VM with specified arguments, or restart a VM (or group of VMs). (Runs vagrant up.)
If name contains a "?" or "*"  then it will re-start a group of VMs which have been paused or stopped.
Each machine must be initially started individually using this function or the vagrant.init execution module call.
[NOTE:] Keyword arguments are silently ignored when re-starting an existing VM.
node_name: vagrant.running
node_name: vagrant.running: - cwd: /projects/my_project - vagrant_runas: my_username - machine: machine1
salt.states.vagrant.stopped(name) Stops a VM (or VMs) by shutting it (them) down nicely. (Runs vagrant halt)
Parameters name -- May be a Salt_id node, or a POSIX-style wildcard string.
node_name: vagrant.stopped
salt.states.vault States for managing Hashicorp Vault.  Currently handles policies. Configuration instructions are documented in the execution module docs.
salt.states.vault.policy_present(name, rules) Ensure a Vault policy with the given name and rules is present.
name   The name of the policy
rules  Rules formatted as in-line HCL
demo-policy: vault.policy_present: - name: foo/bar - rules: | path "secret/top-secret/*" { policy = "deny" } path "secret/not-very-secret/*" { policy = "write" }
salt.states.vbox_guest VirtualBox Guest Additions installer state
salt.states.vbox_guest.additions_installed(name, reboot=False, upgrade_os=False) Ensure that the VirtualBox Guest Additions are installed. Uses the CD, connected by VirtualBox.
name   The name has no functional value and is only used as a tracking reference.
reboot False Restart OS to complete installation.
upgrade_os False Upgrade OS (to ensure the latests version of kernel and developer tools installed).
salt.states.vbox_guest.additions_removed(name, force=False) Ensure that the VirtualBox Guest Additions are removed. Uses the CD, connected by VirtualBox.
force  Force VirtualBox Guest Additions removing.
salt.states.vbox_guest.grant_access_to_shared_folders_to(name, users=None) Grant access to auto-mounted shared folders to the users.
User is specified by its name. To grant access for several users use argument users.
name   Name of the user to grant access to auto-mounted shared folders to.
users  List of names of users to grant access to auto-mounted shared folders to.  If specified, name will not be taken into account.
salt.states.victorops Create an Event in VictorOps New in version 2015.8.0.
This state is useful for creating events on the VictorOps service during state runs.
webserver-warning-message: victorops.create_event: - message_type: 'CRITICAL' - entity_id: 'webserver/diskspace' - state_message: 'Webserver diskspace is low.'
salt.states.victorops.create_event(name, message_type, routing_key='everyone', **kwargs) Create an event on the VictorOps service
database-server-warning-message: victorops.create_event: - message_type: 'WARNING' - entity_id: 'db_server/load' - state_message: 'Database Server load is high.' - entity_is_host: True - entity_display_name: 'dbdserver.example.com'
message_type One of the following values: INFO, WARNING, ACKNOWLEDGEMENT, CRITICAL, RECOVERY.
routing_key The key for where messages should be routed. By default, sent to 'everyone' route.
entity_id The name of alerting entity. If not provided, a random name will be assigned.
timestamp Timestamp of the alert in seconds since epoch. Defaults to the time the alert is received at VictorOps.
timestamp_fmt The date format for the timestamp parameter.  Defaults to ''%Y-%m-%dT%H:%M:%S'.
state_start_time The time this entity entered its current state (seconds since epoch). Defaults to the time alert is received.
state_start_time_fmt The date format for the timestamp parameter. Defaults to '%Y-%m-%dT%H:%M:%S'.
state_message Any additional status information from the alert item.
entity_is_host Used within VictorOps to select the appropriate display format for the incident.
entity_display_name Used within VictorOps to display a human-readable name for the entity.
ack_message A user entered comment for the acknowledgment.
ack_author The user that acknowledged the incident.
salt.states.virt Manage virt For the key certificate this state uses the external pillar in the master to call for the generation and signing of certificates for systems running libvirt:
salt.states.virt.defined(name, cpu=None, mem=None, vm_type=None, disk_profile=None, disks=None, nic_profile=None, interfaces=None, graphics=None, seed=True, install=True, pub_key=None, priv_key=None, connection=None, username=None, password=None, os_type=None, arch=None, boot=None, numatune=None, boot_dev=None, hypervisor_features=None, clock=None, serials=None, consoles=None, stop_on_reboot=False, live=True, host_devices=None) Starts an existing guest, or defines and starts a new VM with specified arguments.
• name -- name of the virtual machine to run
Number of virtual CPUs to assign to the virtual machine or a dictionary with detailed information to configure cpu model and topology, numa node tuning, cpu tuning and iothreads allocation. The structure of the dictionary is documented in init-cpu-def.
cpu: placement: static cpuset: 0-11 current: 5 maximum: 12 vcpus: 0: enabled: 'yes' hotpluggable: 'no' order: 1 1: enabled: 'no' hotpluggable: 'yes' match: minimum mode: custom check: full vendor: Intel model: name: core2duo fallback: allow vendor_id: GenuineIntel topology: sockets: 1 cores: 12 threads: 1 cache: level: 3 mode: emulate feature: policy: optional name: lahf_lm numa: 0: cpus: 0-3 memory: 1g discard: 'yes' distances: 0: 10     # sibling id : value 1: 21 2: 31 3: 41 1: cpus: 4-6 memory: 1g memAccess: shared distances: 0: 21 1: 10 2: 21 3: 31 tuning: vcpupin: 0: 1-4,^2  # vcpuid : cpuset 1: 0,1 2: 2,3 3: 0,4 emulatorpin: 1-3 iothreadpin: 1: 5,6    # iothread id: cpuset 2: 7,8 shares: 2048 period: 1000000 quota: -1 global_period: 1000000 global_quota: -1 emulator_period: 1000000 emulator_quota: -1 iothread_period: 1000000 iothread_quota: -1 vcpusched: - scheduler: fifo priority: 1 - scheduler: fifo priority: 2 vcpus: 1-3 - scheduler: rr priority: 3 vcpus: 4 iothreadsched: - scheduler: batch iothreads: 2 emulatorsched: scheduler: idle cachetune: 0-3:      # vcpus set 0:      # cache id level: 3 type: both size: 4 1: level: 3 type: both size: 6 monitor: 1: 3 0-3: 3 4-5: monitor: 4: 3  # vcpus: level 5: 3 memorytune: 0-3:      # vcpus set 0: 60   # node id: bandwidth 4-5: 0: 60 iothreads: 4
Amount of memory to allocate to the virtual machine in MiB. Since 3002, a dictionary can be used to contain detailed configuration which support memory allocation or tuning. Supported parameters are boot, current, max, slots, hard_limit, soft_limit, swap_hard_limit, min_guarantee, hugepages ,  nosharepages, locked, source, access, allocation and discard. The structure of the dictionary is documented in  init-mem-def. Both decimal and binary base are supported. Detail unit specification is documented  in virt-units. Please note that the value for slots must be an integer.
boot: 1g current: 1g max: 1g slots: 10 hard_limit: 1024 soft_limit: 512m swap_hard_limit: 1g min_guarantee: 512mib hugepages: - size: 2m - nodeset: 0-2 size: 1g - nodeset: 3 size: 2g nosharepages: True locked: True source: file access: shared allocation: immediate discard: True
• vm_type -- force virtual machine type for the new VM. The default value is taken from the host capabilities. This could be useful for example to use 'qemu' type instead of the 'kvm' one.
• disk_profile -- Name of the disk profile to use for the new virtual machine
• disks -- List of disk to create for the new virtual machine.  See init-disk-def for more details on the items on this list.
• nic_profile -- Name of the network interfaces profile to use for the new virtual machine
• interfaces -- List of network interfaces to create for the new virtual machine.  See init-nic-def for more details on the items on this list.
• graphics -- Graphics device to create for the new virtual machine.  See init-graphics-def for more details on this dictionary
• os_type -- type of virtualization as found in the //os/type element of the libvirt definition.  The default value is taken from the host capabilities, with a preference for hvm.  Only used when creating a new virtual machine.
• arch -- architecture of the virtual machine. The default value is taken from the host capabilities, but x86_64 is prefed over i686. Only used when creating a new virtual machine.
Refer to init-boot-def for the complete boot parameters description.
To update any boot parameters, specify the new path for each. To remove any boot parameters, pass a None object, for instance: 'kernel': None.
The optional numatune element provides details of how to tune the performance of a NUMA host via controlling NUMA policy for domain process. The optional memory element specifies how to allocate memory for the domain process on a NUMA host. memnode elements can specify memory allocation policies per each guest NUMA node. The definition used in the dictionary can be found at init-cpu-def.
Dictionary providing details on the serials connection to create. (Default: None) See init-chardevs-def for more details on the possible values.
Dictionary providing details on the consoles device to create. (Default: None) See init-chardevs-def for more details on the possible values.
• live --
If set to False the changes will not be applied live to the running instance, but will only apply at the next start. Note that reboot will not take those changes.
Make sure a virtual machine called domain_name is defined:
domain_name: virt.defined: - cpu: 2 - mem: 2048 - boot_dev: network hd - disk_profile: prod - disks: - name: system size: 8192 overlay_image: True pool: default image: /path/to/image.qcow2 - name: data size: 16834 - nic_profile: prod - interfaces: - name: eth0 mac: 01:23:45:67:89:AB - name: eth1 type: network source: admin - graphics: type: spice listen: type: address address: 192.168.0.125
salt.states.virt.keys(name, basepath='/etc/pki', **kwargs) Manage libvirt keys.
name   The name variable used to track the execution
basepath Defaults to /etc/pki, this is the root location used for libvirt keys on the hypervisor
country The country that the certificate should use.  Defaults to US.
state  The state that the certificate should use.  Defaults to Utah.
locality The locality that the certificate should use.  Defaults to Salt Lake City.
organization The organization that the certificate should use. Defaults to Salted.
expiration_days The number of days that the certificate should be valid for.  Defaults to 365 days (1 year)
salt.states.virt.network_defined(name, bridge, forward, vport=None, tag=None, ipv4_config=None, ipv6_config=None, autostart=True, connection=None, username=None, password=None, mtu=None, domain=None, nat=None, interfaces=None, addresses=None, physical_function=None, dns=None) Defines a new network with specified arguments.
• name -- Network name
• bridge -- Bridge name
Forward mode(bridge, router, nat)
Virtualport type (Default: 'None') The value can also be a dictionary with type and parameters keys.  The parameters value is a dictionary of virtual port parameters.
Vlan tag (Default: 'None') The value can also be a dictionary with the tags and optional trunk keys.  trunk is a boolean value indicating whether to use VLAN trunking.  tags is a list of dictionaries with keys id and nativeMode.  The nativeMode value can be one of tagged or untagged.
• ipv4_config -- IPv4 network configuration. See the virt.network_define function corresponding parameter documentation for more details on this dictionary. (Default: None).
• ipv6_config -- IPv6 network configuration. See the virt.network_define function corresponding parameter documentation for more details on this dictionary. (Default: None).
• autostart -- Network autostart (default 'True')
virtual network DNS configuration The value is a dictionary described in net-define-dns.  (default None)
network_name: virt.network_defined
network_name: virt.network_defined: - bridge: main - forward: bridge - vport: openvswitch - tag: 180 - autostart: True
network_name: virt.network_defined: - bridge: natted - forward: nat - ipv4_config: cidr: 192.168.42.0/24 dhcp_ranges: - start: 192.168.42.10 end: 192.168.42.25 - start: 192.168.42.100 end: 192.168.42.150 - autostart: True
salt.states.virt.network_running(name, bridge, forward, vport=None, tag=None, ipv4_config=None, ipv6_config=None, autostart=True, connection=None, username=None, password=None, mtu=None, domain=None, nat=None, interfaces=None, addresses=None, physical_function=None, dns=None) Defines and starts a new network with specified arguments.
• ipv4_config --
IPv4 network configuration. See the :py:func`virt.network_define <salt.modules.virt.network_define>` function corresponding parameter documentation for more details on this dictionary.  (Default: None).
• ipv6_config --
IPv6 network configuration. See the :py:func`virt.network_define <salt.modules.virt.network_define>` function corresponding parameter documentation for more details on this dictionary.  (Default: None).
- dns: forwarders: - domain: example.com addr: 192.168.1.1 - addr: 8.8.8.8 - domain: www.example.com txt: host.widgets.com.: "printer=lpr5" example.com.: "This domain name is reserved for use in documentation" hosts: 192.168.1.2: - mirror.acme.lab - test.acme.lab srvs: - name: ldap protocol: tcp domain: ldapserver.example.com target: . port: 389 priority: 1 weight: 10
network_name: virt.network_running
network_name: virt.network_running: - bridge: main - forward: bridge - vport: openvswitch - tag: 180 - autostart: True
network_name: virt.network_running: - bridge: natted - forward: nat - ipv4_config: cidr: 192.168.42.0/24 dhcp_ranges: - start: 192.168.42.10 end: 192.168.42.25 - start: 192.168.42.100 end: 192.168.42.150 - autostart: True
salt.states.virt.pool_defined(name, ptype=None, target=None, permissions=None, source=None, transient=False, autostart=True, connection=None, username=None, password=None) Defines a new pool with specified arguments.
• ptype -- libvirt pool type
• target -- full path to the target device or folder. (Default: None)
• permissions -- target permissions. See pool-define-permissions for more details on this structure.
• source -- dictionary containing keys matching the source_* parameters in function salt.modules.virt.pool_define().
• transient -- when set to True, the pool will be automatically undefined after being stopped. (Default: False)
• autostart -- Whether to start the pool when booting the host. (Default: True)
• start -- When True, define and start the pool, otherwise the pool will be left stopped.
pool_name: virt.pool_defined: - ptype: netfs - target: /mnt/cifs - permissions: - mode: 0770 - owner: 1000 - group: 100 - source: dir: samba_share hosts: - one.example.com - two.example.com format: cifs - autostart: True
salt.states.virt.pool_deleted(name, purge=False, connection=None, username=None, password=None) Deletes a virtual storage pool.
• name -- the name of the pool to delete.
• purge -- if True, the volumes contained in the pool will be deleted as well as the pool itself.  Note that these will be lost for ever. If False the pool will simply be undefined.  (Default: False)
In order to be purged a storage pool needs to be running to get the list of volumes to delete.
Some libvirt storage drivers may not implement deleting, those actions are implemented on a best effort idea. In any case check the result's comment property to see if any of the action was unsupported.
pool_name: uyuni_virt.pool_deleted: - purge: True
salt.states.virt.pool_running(name, ptype=None, target=None, permissions=None, source=None, transient=False, autostart=True, connection=None, username=None, password=None) Defines and starts a new pool with specified arguments.
pool_name: virt.pool_running
pool_name: virt.pool_running: - ptype: netfs - target: /mnt/cifs - permissions: - mode: 0770 - owner: 1000 - group: 100 - source: dir: samba_share hosts: - one.example.com - two.example.com format: cifs - autostart: True
salt.states.virt.powered_off(name, connection=None, username=None, password=None) Stops a VM by power off.
domain_name: virt.stopped
salt.states.virt.rebooted(name, connection=None, username=None, password=None) Reboots VMs
salt.states.virt.reverted(name, snapshot=None, cleanup=False) Deprecated since version 2016.3.0.
Reverts to the particular snapshot.
domain_name: virt.reverted: - cleanup: True
domain_name_1: virt.reverted: - snapshot: snapshot_name - cleanup: False
salt.states.virt.running(name, cpu=None, mem=None, vm_type=None, disk_profile=None, disks=None, nic_profile=None, interfaces=None, graphics=None, seed=True, install=True, pub_key=None, priv_key=None, connection=None, username=None, password=None, os_type=None, arch=None, boot=None, boot_dev=None, numatune=None, hypervisor_features=None, clock=None, serials=None, consoles=None, stop_on_reboot=False, host_devices=None) Starts an existing guest, or defines and starts a new VM with specified arguments.
• vm_type --
force virtual machine type for the new VM. The default value is taken from the host capabilities. This could be useful for example to use 'qemu' type instead of the 'kvm' one.
• disk_profile --
Name of the disk profile to use for the new virtual machine
List of disk to create for the new virtual machine.  See init-disk-def for more details on the items on this list.
• nic_profile --
Name of the network interfaces profile to use for the new virtual machine
List of network interfaces to create for the new virtual machine.  See init-nic-def for more details on the items on this list.
Graphics device to create for the new virtual machine. See init-graphics-def for more details on this dictionary
• saltenv --
Fileserver environment (Default: 'base').  See cp module for more details
• seed -- .INDENT 2.0
True to seed the disk image. Only used when the image parameter is provided. (Default: True)
• install --
install salt minion if absent (Default: True)
• pub_key --
public key to seed with (Default: None)
• priv_key --
• seed_cmd --
Salt command to execute to seed the image. (Default: 'seed.apply')
type of virtualization as found in the //os/type element of the libvirt definition.  The default value is taken from the host capabilities, with a preference for hvm.  Only used when creating a new virtual machine.
architecture of the virtual machine. The default value is taken from the host capabilities, but x86_64 is prefed over i686. Only used when creating a new virtual machine.