neulab/tldr huggingface dataset:
Note that this is only checked if the source value has not changed.  If it has (e.g. to increment a version number in the path) then the archive will not be extracted even if the hash has changed.
NOTE: Setting this to True along with keep_source set to False will result the source re-download to do a archive file list check.  If it's not desirable please consider the skip_files_list_verify argument.
skip_files_list_verify False Set this to True if archive should be extracted if source_hash has changed but only checksums of the archive will be checked to determine if the extraction is required.
It will try to find a local cache of the source and check its hash against the source_hash. If there is no local cache available, for example if you set the keep_source to False,  it will try to find a cached source hash file in the Minion archives cache directory.
NOTE: The current limitation of this logic is that you have to set minions hash_type config option to the same one that you're going to pass via source_hash argument.
WARNING: With this argument set to True Salt will only check for the source_hash against the local hash of the sourse. So if you, for example, remove extracted files without clearing the Salt Minion cache next time you execute the state Salt will not notice that extraction is required if the hashes are still match.
skip_verify False If True, hash verification of remote file sources (http://, https://, ftp://) will be skipped, and the source_hash argument will be ignored.
keep_source True For source archives not local to the minion (i.e. from the Salt fileserver or a remote source such as http(s) or ftp), Salt will need to download the archive to the minion cache before they can be extracted. To remove the downloaded archive after extraction, set this argument to False.
keep   True Same as keep_source, kept for backward-compatibility.
NOTE: If both keep_source and keep are used, keep will be ignored.
password For ZIP archives only. Password used for extraction.
Changed in version 2016.11.0: The newly-added archive.is_encrypted function will be used to determine if the archive is password-protected. If it is, then the password argument will be required for the state to proceed.
options For tar and zip archives only.  This option can be used to specify a string of additional arguments to pass to the tar/zip command.
If this argument is not used, then the minion will attempt to use Python's native tarfile/zipfile support to extract it. For zip archives, this argument is mostly used to overwrite existing files with o.
Using this argument means that the tar or unzip command will be used, which is less platform-independent, so keep this in mind when using this option; the CLI options must be valid options for the tar/unzip implementation on the minion's OS.
Changed in version 2015.8.11,2016.3.2: XZ-compressed tar archives no longer require J to manually be set in the options, they are now detected automatically and decompressed using the xz CLI command and extracted using tar xvf. This is a more platform-independent solution, as not all tar implementations support the J argument for extracting archives.
NOTE: For tar archives, main operators like -x, --extract, --get, -c and -f/--file should not be used here.
list_options For tar archives only. This state uses archive.list to discover the contents of the source archive so that it knows which file paths should exist on the minion if the archive has already been extracted. For the vast majority of tar archives, archive.list "just works". Archives compressed using gzip, bzip2, and xz/lzma (with the help of the xz CLI command) are supported automatically. However, for archives compressed using other compression types, CLI options must be passed to archive.list.
This argument will be passed through to archive.list as its options argument, to allow it to successfully list the archive's contents. For the vast majority of archives, this argument should not need to be used, it should only be needed in cases where the state fails with an error stating that the archive's contents could not be listed.
force  False If a path that should be occupied by a file in the extracted result is instead a directory (or vice-versa), the state will fail. Set this argument to True to force these paths to be removed in order to allow the archive to be extracted.
WARNING: Use this option very carefully.
overwrite False Set this to True to force the archive to be extracted. This is useful for cases where the filenames/directories have not changed, but the content of the files have.
New in version 2016.11.1.
clean  False Set this to True to remove any top-level files and recursively remove any top-level directory paths before extracting.
NOTE: Files will only be cleaned first if extracting the archive is deemed necessary, either by paths missing on the minion, or if overwrite is set to True.
clean_parent False If True, and the archive is extracted, delete the parent directory (i.e. the directory into which the archive is extracted), and then re-create that directory before extracting. Note that clean and clean_parent are mutually exclusive.
user   The user to own each extracted file. Not available on Windows.
Changed in version 2016.3.0: When used in combination with if_missing, ownership will only be enforced if if_missing is a directory.
Changed in version 2016.11.0: Ownership will be enforced only on the file/directory paths found by running archive.list on the source archive. An alternative root directory on which to enforce ownership can be specified using the enforce_ownership_on argument.
group  The group to own each extracted file. Not available on Windows.
if_missing If specified, this path will be checked, and if it exists then the archive will not be extracted. This path can be either a directory or a file, so this option can also be used to check for a semaphore file and conditionally skip extraction.
Changed in version 2016.3.0: When used in combination with either user or group, ownership will only be enforced when if_missing is a directory.
Changed in version 2016.11.0: Ownership enforcement is no longer tied to this argument, it is simply checked for existence and extraction will be skipped if if is present.
trim_output False Useful for archives with many files in them. This can either be set to True (in which case only the first 100 files extracted will be in the state results), or it can be set to an integer for more exact control over the max number of files to include in the state results.
use_cmd_unzip False Set to True for zip files to force usage of the archive.cmd_unzip function to extract.
extract_perms True For ZIP archives only. When using archive.unzip to extract ZIP archives, Salt works around an upstream bug in Python to set the permissions on extracted files/directories to match those encoded into the ZIP archive. Set this argument to False to skip this workaround.
enforce_toplevel True This option will enforce a single directory at the top level of the source archive, to prevent extracting a 'tar-bomb'. Set this argument to False to allow archives with files (or multiple directories) at the top level to be extracted.
enforce_ownership_on When user or group is specified, Salt will default to enforcing permissions on the file/directory paths detected by running archive.list on the source archive. Use this argument to specify an alternate directory on which ownership should be enforced.
NOTE: This path must be within the path specified by the name argument.
archive_format One of tar, zip, or rar.
Changed in version 2016.11.0: If omitted, the archive format will be guessed based on the value of the source argument. If the minion is running a release older than 2016.11.0, this option is required.
1. tar with lmza (i.e. xz) compression:
graylog2-server: archive.extracted: - name: /opt/ - source: https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.lzma - source_hash: md5=499ae16dcae71eeb7c3a30c75ea7a1a6
2. tar archive with flag for verbose output, and enforcement of user/group ownership:
graylog2-server: archive.extracted: - name: /opt/ - source: https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.gz - source_hash: md5=499ae16dcae71eeb7c3a30c75ea7a1a6 - options: v - user: foo - group: foo
3. tar archive, with source_hash_update set to True to prevent state from attempting extraction unless the source_hash differs from the previous time the archive was extracted:
graylog2-server: archive.extracted: - name: /opt/ - source: https://github.com/downloads/Graylog2/graylog2-server/graylog2-server-0.9.6p1.tar.lzma - source_hash: md5=499ae16dcae71eeb7c3a30c75ea7a1a6 - source_hash_update: True
salt.states.artifactory This state downloads artifacts from artifactory.
salt.states.artifactory.downloaded(name, artifact, target_dir='/tmp', target_file=None, use_literal_group_id=False) Ensures that the artifact from artifactory exists at given location. If it doesn't exist, then it will be downloaded. If it already exists then the checksum of existing file is checked against checksum in artifactory. If it is different then the step will fail.
artifact Details of the artifact to be downloaded from artifactory. Various options are:
• artifactory_url: URL of the artifactory instance
• repository: Repository in artifactory
• artifact_id: Artifact ID
• group_id: Group ID
• packaging: Packaging
• classifier: Classifier .. versionadded:: 2015.8.0
version: Version One of the following: - Version to download - latest - Download the latest release of this artifact - latest_snapshot - Download the latest snapshot for this artifact
• username: Artifactory username .. versionadded:: 2015.8.0
• password: Artifactory password .. versionadded:: 2015.8.0
target_dir Directory where the artifact should be downloaded. By default it is downloaded to /tmp directory.
target_file Target file to download artifact to. By default file name is resolved by artifactory.
An example to download an artifact to a specific file:
jboss_module_downloaded: artifactory.downloaded: - artifact: artifactory_url: http://artifactory.intranet.example.com/artifactory repository: 'libs-release-local' artifact_id: 'module' group_id: 'com.company.module' packaging: 'jar' classifier: 'sources' version: '1.0' - target_file: /opt/jboss7/modules/com/company/lib/module.jar
Download artifact to the folder (automatically resolves file name):
jboss_module_downloaded: artifactory.downloaded: - artifact: artifactory_url: http://artifactory.intranet.example.com/artifactory repository: 'libs-release-local' artifact_id: 'module' group_id: 'com.company.module' packaging: 'jar' classifier: 'sources' version: '1.0' - target_dir: /opt/jboss7/modules/com/company/lib
salt.states.at Configuration disposable regularly scheduled tasks for at. The at state can be add disposable regularly scheduled tasks for your system.
salt.states.at.absent(name, jobid=None, **kwargs) Changed in version 2017.7.0.
Remove a job from queue
jobid: string|int Specific jobid to remove
tag    string Job's tag
runas  string Runs user-specified jobs
kwargs Addition kwargs can be provided to filter jobs.  See output of at.jobcheck for more.
example1: at.absent:
WARNING: this will remove all jobs!
example2: at.absent: - year: 13
example3: at.absent: - tag: rose
example4: at.absent: - tag: rose - day: 13 - hour: 16
example5: at.absent: - jobid: 4
salt.states.at.mod_watch(name, **kwargs) The at watcher, called to invoke the watch command.
NOTE: This state exists to support special handling of the watch requisite. It should not be called directly.
Parameters for this function should be set by the state being triggered.
name   The name of the atjob
salt.states.at.present(name, timespec, tag=None, user=None, job=None, unique_tag=False) Changed in version 2017.7.0.
Add a job to queue.
job    string Command to run.
timespec string The 'timespec' follows the format documented in the at(1) manpage.
tag    string Make a tag for the job.
user   string The user to run the at job .. versionadded:: 2014.1.4
unique_tag boolean If set to True job will not be added if a job with the tag exists.  .. versionadded:: 2017.7.0
rose: at.present: - job: 'echo "I love saltstack" > love' - timespec: '9:09 11/09/13' - tag: love - user: jam
salt.states.at.watch(name, timespec, tag=None, user=None, job=None, unique_tag=False) New in version 2017.7.0.
Add an at job if trigger by watch
minion_restart: at.watch: - job: 'salt-call --local service.restart salt-minion' - timespec: 'now +1 min' - tag: minion_restart - unique_tag: trye - watch: - file: /etc/salt/minion
salt.states.augeas Configuration management using Augeas
This state requires the augeas Python module.
Augeas can be used to manage configuration files.
WARNING: Minimal installations of Debian and Ubuntu have been seen to have packaging bugs with python-augeas, causing the augeas module to fail to import. If the minion has the augeas module installed, and the state fails with a comment saying that the state is unavailable, first restart the salt-minion service. If the problem persists past that, the following command can be run from the master to determine what is causing the import to fail:
salt.states.augeas.change(name, context=None, changes=None, lens=None, load_path=None, **kwargs) New in version 2014.7.0.
This state replaces setvalue().
Issue changes to Augeas, optionally for a specific context, with a specific lens.
name   State name
context A file path, prefixed by /files. Should resolve to an actual file (not an arbitrary augeas path). This is used to avoid duplicating the file name for each item in the changes list (for example, set bind 0.0.0.0 in the example below operates on the file specified by context). If context is not specified, a file path prefixed by /files should be included with the set command.
The file path is examined to determine if the specified changes are already present.
redis-conf: augeas.change: - context: /files/etc/redis/redis.conf - changes: - set bind 0.0.0.0 - set maxmemory 1G
changes List of changes that are issued to Augeas. Available commands are set, setm, mv/move, ins/insert, and rm/remove.
lens   The lens to use, needs to be suffixed with .lns, e.g.: Nginx.lns.  See the list of stock lenses shipped with Augeas.
load_path A list of directories that modules should be searched in. This is in addition to the standard load path and the directories in AUGEAS_LENS_LIB.
Set the bind parameter in /etc/redis/redis.conf:
redis-conf: augeas.change: - changes: - set /files/etc/redis/redis.conf/bind 0.0.0.0
NOTE: Use the context parameter to specify the file you want to manipulate. This way you don't have to include this in the changes every time:
redis-conf: augeas.change: - context: /files/etc/redis/redis.conf - changes: - set bind 0.0.0.0 - set databases 4 - set maxmemory 1G
Augeas is aware of a lot of common configuration files and their syntax.  It knows the difference between for example ini and yaml files, but also files with very specific syntax, like the hosts file. This is done with lenses, which provide mappings between the Augeas tree and the file.
There are many preconfigured lenses that come with Augeas by default, and they specify the common locations for configuration files. So most of the time Augeas will know how to manipulate a file. In the event that you need to manipulate a file that Augeas doesn't know about, you can specify the lens to use like this:
redis-conf: augeas.change: - lens: redis.lns - context: /files/etc/redis/redis.conf - changes: - set bind 0.0.0.0
NOTE: Even though Augeas knows that /etc/redis/redis.conf is a Redis configuration file and knows how to parse it, it is recommended to specify the lens anyway. This is because by default, Augeas loads all known lenses and their associated file paths. All these files are parsed when Augeas is loaded, which can take some time. When specifying a lens, Augeas is loaded with only that lens, which speeds things up quite a bit.
A more complex example, this adds an entry to the services file for Zabbix, and removes an obsolete service:
zabbix-service: augeas.change: - lens: services.lns - context: /files/etc/services - changes: - ins service-name after service-name[last()] - set service-name[last()] "zabbix-agent" - set "service-name[. = 'zabbix-agent']/port" 10050 - set "service-name[. = 'zabbix-agent']/protocol" tcp - set "service-name[. = 'zabbix-agent']/#comment" "Zabbix Agent service" - rm "service-name[. = 'im-obsolete']" - unless: grep "zabbix-agent" /etc/services
WARNING: Don't forget the unless here, otherwise it will fail on next runs because the service is already defined. Additionally you have to quote lines containing service-name[. = 'zabbix-agent'] otherwise augeas_cfg execute will fail because it will receive more parameters than expected.
NOTE: Order is important when defining a service with Augeas, in this case it's port, protocol and #comment. For more info about the lens check services lens documentation.
http://augeas.net/docs/references/lenses/files/services-aug.html#Services.record
salt.states.aws_sqs Manage SQS Queues
Create and destroy SQS queues. Be aware that this interacts with Amazon's services, and so may incur charges.
This module uses the awscli tool provided by Amazon. This can be downloaded from pip. Also check the documentation for awscli for configuration information.
myqueue: aws_sqs.exists: - region: eu-west-1
salt.states.aws_sqs.absent(name, region, user=None, opts=False) Remove the named SQS queue if it exists.
name   Name of the SQS queue.
region Region to remove the queue from
user   Name of the user performing the SQS operations
opts   Include additional arguments and options to the aws command line
salt.states.aws_sqs.exists(name, region, user=None, opts=False) Ensure the SQS queue exists.
region Region to create the queue
salt.states.azurearm_compute Azure (ARM) Compute State Module
configuration This module requires Azure Resource Manager credentials to be passed as a dictionary of keyword arguments to the connection_auth parameter in order to work properly. Since the authentication parameters are sensitive, it's recommended to pass them to the states via pillar.
Example Pillar for Azure Resource Manager authentication:
azurearm: user_pass_auth: subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617 username: fletch password: 123pass mysubscription: subscription_id: 3287abc8-f98a-c678-3bde-326766fd3617 tenant: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF client_id: ABCDEFAB-1234-ABCD-1234-ABCDEFABCDEF secret: XXXXXXXXXXXXXXXXXXXXXXXX cloud_environment: AZURE_PUBLIC_CLOUD
Example states using Azure Resource Manager authentication:
{% set profile = salt['pillar.get']('azurearm:mysubscription') %} Ensure availability set exists: azurearm_compute.availability_set_present: - name: my_avail_set - resource_group: my_rg - virtual_machines: - my_vm1 - my_vm2 - tags: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
Ensure availability set is absent: azurearm_compute.availability_set_absent: - name: other_avail_set - resource_group: my_rg - connection_auth: {{ profile }}
salt.states.azurearm_compute.availability_set_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure an availability set does not exist in a resource group.
• name -- Name of the availability set.
• resource_group -- Name of the resource group containing the availability set.
• connection_auth -- A dict with subscription and authentication parameters to be used in connecting to the Azure Resource Manager API.
salt.states.azurearm_compute.availability_set_present(name, resource_group, tags=None, platform_update_domain_count=None, platform_fault_domain_count=None, virtual_machines=None, sku=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure an availability set exists.
• resource_group -- The resource group assigned to the availability set.
• tags -- A dictionary of strings can be passed as tag metadata to the availability set object.
• platform_update_domain_count -- An optional parameter which indicates groups of virtual machines and underlying physical hardware that can be rebooted at the same time.
• platform_fault_domain_count -- An optional parameter which defines the group of virtual machines that share a common power source and network switch.
• virtual_machines -- A list of names of existing virtual machines to be included in the availability set.
• sku -- The availability set SKU, which specifies whether the availability set is managed or not. Possible values are 'Aligned' or 'Classic'. An 'Aligned' availability set is managed, 'Classic' is not.
Ensure availability set exists: azurearm_compute.availability_set_present: - name: aset1 - resource_group: group1 - platform_update_domain_count: 5 - platform_fault_domain_count: 3 - sku: aligned - tags: contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }} - require: - azurearm_resource: Ensure resource group exists
salt.states.azurearm_dns Azure (ARM) DNS State Module
• azure-mgmt-dns >= 1.0.1
Optional provider parameters: cloud_environment: Used to point the cloud driver to different API endpoints, such as Azure GovCloud. Possible values:
{% set profile = salt['pillar.get']('azurearm:mysubscription') %} Ensure DNS zone exists: azurearm_dns.zone_present: - name: contoso.com - resource_group: my_rg - tags: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
Ensure DNS record set exists: azurearm_dns.record_set_present: - name: web - zone_name: contoso.com - resource_group: my_rg - record_type: A - ttl: 300 - arecords: - ipv4_address: 10.0.0.1 - tags: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
Ensure DNS record set is absent: azurearm_dns.record_set_absent: - name: web - zone_name: contoso.com - resource_group: my_rg - record_type: A - connection_auth: {{ profile }}
Ensure DNS zone is absent: azurearm_dns.zone_absent: - name: contoso.com - resource_group: my_rg - connection_auth: {{ profile }}
salt.states.azurearm_dns.record_set_absent(name, zone_name, resource_group, connection_auth=None) New in version 3000.
Ensure a record set does not exist in the DNS zone.
• name -- Name of the record set.
• zone_name -- Name of the DNS zone.
• resource_group -- The resource group assigned to the DNS zone.
salt.states.azurearm_dns.record_set_present(name, zone_name, resource_group, record_type, if_match=None, if_none_match=None, etag=None, metadata=None, ttl=None, arecords=None, aaaa_records=None, mx_records=None, ns_records=None, ptr_records=None, srv_records=None, txt_records=None, cname_record=None, soa_record=None, caa_records=None, connection_auth=None, **kwargs) New in version 3000.
Ensure a record set exists in a DNS zone.
• zone_name -- Name of the DNS zone (without a terminating dot).
• if_match -- The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwritting any concurrent changes.
• if_none_match -- Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored.
• etag -- The etag of the record set. Etags are used to handle concurrent changes to the same resource safely.
• metadata -- A dictionary of strings can be passed as tag metadata to the record set object.
• ttl -- The TTL (time-to-live) of the records in the record set. Required when specifying record information.
• arecords -- The list of A records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• aaaa_records -- The list of AAAA records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• mx_records -- The list of MX records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• ns_records -- The list of NS records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• ptr_records -- The list of PTR records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• srv_records -- The list of SRV records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• txt_records -- The list of TXT records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
• cname_record -- The CNAME record in the record set. View the Azure SDK documentation to create a dictionary representing the record object.
• soa_record -- The SOA record in the record set. View the Azure SDK documentation to create a dictionary representing the record object.
• caa_records -- The list of CAA records in the record set. View the Azure SDK documentation to create a list of dictionaries representing the record objects.
Ensure record set exists: azurearm_dns.record_set_present: - name: web - zone_name: contoso.com - resource_group: my_rg - record_type: A - ttl: 300 - arecords: - ipv4_address: 10.0.0.1 - metadata: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
salt.states.azurearm_dns.zone_absent(name, resource_group, connection_auth=None) New in version 3000.
Ensure a DNS zone does not exist in the resource group.
• name -- Name of the DNS zone.
salt.states.azurearm_dns.zone_present(name, resource_group, etag=None, if_match=None, if_none_match=None, registration_virtual_networks=None, resolution_virtual_networks=None, tags=None, zone_type='Public', connection_auth=None, **kwargs) New in version 3000.
Ensure a DNS zone exists.
• name -- Name of the DNS zone (without a terminating dot).
• etag -- The etag of the zone. Etags are used to handle concurrent changes to the same resource safely.
• if_match -- The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwritting any concurrent changes.
• if_none_match -- Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored.
• registration_virtual_networks --
A list of references to virtual networks that register hostnames in this DNS zone. This is only when zone_type is Private. (requires azure-mgmt-dns >= 2.0.0rc1)
• resolution_virtual_networks --
A list of references to virtual networks that resolve records in this DNS zone. This is only when zone_type is Private. (requires azure-mgmt-dns >= 2.0.0rc1)
• tags -- A dictionary of strings can be passed as tag metadata to the DNS zone object.
• zone_type -- .INDENT 2.0
The type of this DNS zone (Public or Private). Possible values include: 'Public', 'Private'. Default value: 'Public' (requires azure-mgmt-dns >= 2.0.0rc1)
Ensure DNS zone exists: azurearm_dns.zone_present: - name: contoso.com - resource_group: my_rg - zone_type: Private - registration_virtual_networks: - /subscriptions/{{ sub }}/resourceGroups/my_rg/providers/Microsoft.Network/virtualNetworks/test_vnet - tags: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
salt.states.azurearm_network Azure (ARM) Network State Module
{% set profile = salt['pillar.get']('azurearm:mysubscription') %} Ensure virtual network exists: azurearm_network.virtual_network_present: - name: my_vnet - resource_group: my_rg - address_prefixes: - '10.0.0.0/8' - '192.168.0.0/16' - dns_servers: - '8.8.8.8' - tags: how_awesome: very contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }}
Ensure virtual network is absent: azurearm_network.virtual_network_absent: - name: other_vnet - resource_group: my_rg - connection_auth: {{ profile }}
salt.states.azurearm_network.load_balancer_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a load balancer does not exist in the resource group.
• name -- Name of the load balancer.
• resource_group -- The resource group assigned to the load balancer.
salt.states.azurearm_network.load_balancer_present(name, resource_group, sku=None, frontend_ip_configurations=None, backend_address_pools=None, load_balancing_rules=None, probes=None, inbound_nat_rules=None, inbound_nat_pools=None, outbound_nat_rules=None, tags=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a load balancer exists.
• sku -- The load balancer SKU, which can be 'Basic' or 'Standard'.
• tags -- A dictionary of strings can be passed as tag metadata to the load balancer object.
• frontend_ip_configurations --
An optional list of dictionaries representing valid FrontendIPConfiguration objects. A frontend IP configuration can be either private (using private IP address and subnet parameters) or public (using a reference to a public IP address object). Valid parameters are:
• name: The name of the resource that is unique within a resource group.
• private_ip_address: The private IP address of the IP configuration. Required if 'private_ip_allocation_method' is 'Static'.
• private_ip_allocation_method: The Private IP allocation method. Possible values are: 'Static' and 'Dynamic'.
• subnet: Name of an existing subnet inside of which the frontend IP will reside.
• public_ip_address: Name of an existing public IP address which will be assigned to the frontend IP object.
• backend_address_pools -- An optional list of dictionaries representing valid BackendAddressPool objects. Only the 'name' parameter is valid for a BackendAddressPool dictionary. All other parameters are read-only references from other objects linking to the backend address pool. Inbound traffic is randomly load balanced across IPs in the backend IPs.
• probes --
An optional list of dictionaries representing valid Probe objects. Valid parameters are:
• protocol: The protocol of the endpoint. Possible values are 'Http' or 'Tcp'. If 'Tcp' is specified, a received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK response from the specified URI is required for the probe to be successful.
• port: The port for communicating the probe. Possible values range from 1 to 65535, inclusive.
• interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint for health status. Typically, the interval is slightly less than half the allocated timeout period (in seconds) which allows two full probes before taking the instance out of rotation. The default value is 15, the minimum value is 5.
• number_of_probes: The number of probes where if no response, will result in stopping further traffic from being delivered to the endpoint. This values allows endpoints to be taken out of rotation faster or slower than the typical times used in Azure.
• request_path: The URI used for requesting health status from the VM. Path is required if a protocol is set to 'Http'. Otherwise, it is not allowed. There is no default value.
• load_balancing_rules --
An optional list of dictionaries representing valid LoadBalancingRule objects. Valid parameters are:
• load_distribution: The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and 'SourceIPProtocol'.
• frontend_port: The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 enables 'Any Port'.
• backend_port: The port used for internal connections on the endpoint. Acceptable values are between 0 and 65535. Note that value 0 enables 'Any Port'.
• idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
• enable_floating_ip: Configures a virtual machine's endpoint for the floating IP capability required to configure a SQL AlwaysOn Availability Group. This setting is required when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed after you create the endpoint.
• disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the public IP address specified in the frontend of the load balancing rule.
• frontend_ip_configuration: Name of the frontend IP configuration object used by the load balancing rule object.
• backend_address_pool: Name of the backend address pool object used by the load balancing rule object.  Inbound traffic is randomly load balanced across IPs in the backend IPs.
• probe: Name of the probe object used by the load balancing rule object.
• inbound_nat_rules --
An optional list of dictionaries representing valid InboundNatRule objects. Defining inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an Inbound NAT pool. They have to reference individual inbound NAT rules. Valid parameters are:
• frontend_ip_configuration: Name of the frontend IP configuration object used by the inbound NAT rule object.
• protocol: Possible values include 'Udp', 'Tcp', or 'All'.
• frontend_port: The port for the external endpoint. Port numbers for each rule must be unique within the Load Balancer. Acceptable values range from 1 to 65534.
• backend_port: The port used for the internal endpoint. Acceptable values range from 1 to 65535.
• inbound_nat_pools --
An optional list of dictionaries representing valid InboundNatPool objects. They define an external port range for inbound NAT to a single backend port on NICs associated with a load balancer. Inbound NAT rules are created automatically for each NIC associated with the Load Balancer using an external port from this range. Defining an Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with individual virtual machines cannot reference an inbound NAT pool. They have to reference individual inbound NAT rules. Valid parameters are:
• frontend_ip_configuration: Name of the frontend IP configuration object used by the inbound NAT pool object.
• frontend_port_range_start: The first port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with a load balancer. Acceptable values range between 1 and 65534.
• frontend_port_range_end: The last port number in the range of external ports that will be used to provide Inbound NAT to NICs associated with a load balancer. Acceptable values range between 1 and 65535.
• backend_port: The port used for internal connections to the endpoint. Acceptable values are between 1 and 65535.
• outbound_nat_rules --
An optional list of dictionaries representing valid OutboundNatRule objects. Valid parameters are:
• frontend_ip_configuration: Name of the frontend IP configuration object used by the outbound NAT rule object.
• backend_address_pool: Name of the backend address pool object used by the outbound NAT rule object.  Outbound traffic is randomly load balanced across IPs in the backend IPs.
• allocated_outbound_ports: The number of outbound ports to be used for NAT.
Ensure load balancer exists: azurearm_network.load_balancer_present: - name: lb1 - resource_group: group1 - location: eastus - frontend_ip_configurations: - name: lb1_feip1 public_ip_address: pub_ip1 - backend_address_pools: - name: lb1_bepool1 - probes: - name: lb1_webprobe1 protocol: tcp port: 80 interval_in_seconds: 5 number_of_probes: 2 - load_balancing_rules: - name: lb1_webprobe1 protocol: tcp frontend_port: 80 backend_port: 80 idle_timeout_in_minutes: 4 frontend_ip_configuration: lb1_feip1 backend_address_pool: lb1_bepool1 probe: lb1_webprobe1 - tags: contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }} - require: - azurearm_resource: Ensure resource group exists - azurearm_network: Ensure public IP exists
salt.states.azurearm_network.network_interface_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a network interface does not exist in the resource group.
• name -- Name of the network interface.
• resource_group -- The resource group assigned to the network interface.
salt.states.azurearm_network.network_interface_present(name, ip_configurations, subnet, virtual_network, resource_group, tags=None, virtual_machine=None, network_security_group=None, dns_settings=None, mac_address=None, primary=None, enable_accelerated_networking=None, enable_ip_forwarding=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a network interface exists.
• subnet -- Name of the existing subnet assigned to the network interface.
• virtual_network -- Name of the existing virtual network containing the subnet.
• resource_group -- The resource group assigned to the virtual network.
• tags -- A dictionary of strings can be passed as tag metadata to the network interface object.
• network_security_group -- The name of the existing network security group to assign to the network interface.
• virtual_machine -- The name of the existing virtual machine to assign to the network interface.
• dns_settings --
An optional dictionary representing a valid NetworkInterfaceDnsSettings object. Valid parameters are:
• dns_servers: List of DNS server IP addresses. Use 'AzureProvidedDNS' to switch to Azure provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be the only value in dns_servers collection.
• internal_dns_name_label: Relative DNS name for this NIC used for internal communications between VMs in the same virtual network.
• internal_fqdn: Fully qualified DNS name supporting internal communications between VMs in the same virtual network.
• internal_domain_name_suffix: Even if internal_dns_name_label is not specified, a DNS entry is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the VM name with the value of internal_domain_name_suffix.
• mac_address -- Optional string containing the MAC address of the network interface.
• primary -- Optional boolean allowing the interface to be set as the primary network interface on a virtual machine with multiple interfaces attached.
• enable_accelerated_networking -- Optional boolean indicating whether accelerated networking should be enabled for the interface.
• enable_ip_forwarding -- Optional boolean indicating whether IP forwarding should be enabled for the interface.
Ensure network interface exists: azurearm_network.network_interface_present: - name: iface1 - subnet: vnet1_sn1 - virtual_network: vnet1 - resource_group: group1 - ip_configurations: - name: iface1_ipc1 public_ip_address: pub_ip2 - dns_settings: internal_dns_name_label: decisionlab-int-test-label - primary: True - enable_accelerated_networking: True - enable_ip_forwarding: False - network_security_group: nsg1 - connection_auth: {{ profile }} - require: - azurearm_network: Ensure subnet exists - azurearm_network: Ensure network security group exists - azurearm_network: Ensure another public IP exists
salt.states.azurearm_network.network_security_group_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a network security group does not exist in the resource group.
• name -- Name of the network security group.
• resource_group -- The resource group assigned to the network security group.
salt.states.azurearm_network.network_security_group_present(name, resource_group, tags=None, security_rules=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a network security group exists.
• tags -- A dictionary of strings can be passed as tag metadata to the network security group object.
• security_rules -- An optional list of dictionaries representing valid SecurityRule objects. See the documentation for the security_rule_present state or security_rule_create_or_update execution module for more information on required and optional parameters for security rules. The rules are only managed if this parameter is present. When this parameter is absent, implemented rules will not be removed, and will merely become unmanaged.
Ensure network security group exists: azurearm_network.network_security_group_present: - name: nsg1 - resource_group: group1 - security_rules: - name: nsg1_rule1 priority: 100 protocol: tcp access: allow direction: outbound source_address_prefix: virtualnetwork destination_address_prefix: internet source_port_range: '*' destination_port_range: '*' - name: nsg1_rule2 priority: 101 protocol: tcp access: allow direction: inbound source_address_prefix: internet destination_address_prefix: virtualnetwork source_port_range: '*' destination_port_ranges: - '80' - '443' - tags: contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }} - require: - azurearm_resource: Ensure resource group exists
salt.states.azurearm_network.public_ip_address_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a public IP address does not exist in the resource group.
• name -- Name of the public IP address.
• resource_group -- The resource group assigned to the public IP address.
salt.states.azurearm_network.public_ip_address_present(name, resource_group, tags=None, sku=None, public_ip_allocation_method=None, public_ip_address_version=None, dns_settings=None, idle_timeout_in_minutes=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a public IP address exists.
• dns_settings -- An optional dictionary representing a valid PublicIPAddressDnsSettings object. Parameters include 'domain_name_label' and 'reverse_fqdn', which accept strings. The 'domain_name_label' parameter is concatenated with the regionalized DNS zone make up the fully qualified domain name associated with the public IP address.  If a domain name label is specified, an A DNS record is created for the public IP in the Microsoft Azure DNS system. The 'reverse_fqdn' parameter is a user-visible, fully qualified domain name that resolves to this public IP address. If the reverse FQDN is specified, then a PTR DNS record is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN.
• sku -- The public IP address SKU, which can be 'Basic' or 'Standard'.
• public_ip_allocation_method -- The public IP allocation method. Possible values are: 'Static' and 'Dynamic'.
• public_ip_address_version -- The public IP address version. Possible values are: 'IPv4' and 'IPv6'.
• idle_timeout_in_minutes -- An integer representing the idle timeout of the public IP address.
• tags -- A dictionary of strings can be passed as tag metadata to the public IP address object.
Ensure public IP exists: azurearm_network.public_ip_address_present: - name: pub_ip1 - resource_group: group1 - dns_settings: domain_name_label: decisionlab-ext-test-label - sku: basic - public_ip_allocation_method: static - public_ip_address_version: ipv4 - idle_timeout_in_minutes: 4 - tags: contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }} - require: - azurearm_resource: Ensure resource group exists
salt.states.azurearm_network.route_absent(name, route_table, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a route table does not exist in the resource group.
• name -- Name of the route table.
• route_table -- The name of the existing route table containing the route.
• resource_group -- The resource group assigned to the route table.
salt.states.azurearm_network.route_present(name, address_prefix, next_hop_type, route_table, resource_group, next_hop_ip_address=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a route exists within a route table.
• name -- Name of the route.
• next_hop_ip_address -- The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is 'VirtualAppliance'.
• route_table -- The name of the existing route table which will contain the route.
Ensure route exists: azurearm_network.route_present: - name: rt1_route2 - route_table: rt1 - resource_group: group1 - address_prefix: '192.168.0.0/16' - next_hop_type: vnetlocal - connection_auth: {{ profile }} - require: - azurearm_network: Ensure route table exists
salt.states.azurearm_network.route_table_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
salt.states.azurearm_network.route_table_present(name, resource_group, tags=None, routes=None, disable_bgp_route_propagation=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a route table exists.
• routes -- An optional list of dictionaries representing valid Route objects contained within a route table. See the documentation for the route_present state or route_create_or_update execution module for more information on required and optional parameters for routes. The routes are only managed if this parameter is present. When this parameter is absent, implemented routes will not be removed, and will merely become unmanaged.
• disable_bgp_route_propagation -- An optional boolean parameter setting whether to disable the routes learned by BGP on the route table.
• tags -- A dictionary of strings can be passed as tag metadata to the route table object.
Ensure route table exists: azurearm_network.route_table_present: - name: rt1 - resource_group: group1 - routes: - name: rt1_route1 address_prefix: '0.0.0.0/0' next_hop_type: internet - name: rt1_route2 address_prefix: '192.168.0.0/16' next_hop_type: vnetlocal - tags: contact_name: Elmer Fudd Gantry - connection_auth: {{ profile }} - require: - azurearm_resource: Ensure resource group exists
salt.states.azurearm_network.security_rule_absent(name, security_group, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a security rule does not exist in the network security group.
• name -- Name of the security rule.
salt.states.azurearm_network.security_rule_present(name, access, direction, priority, protocol, security_group, resource_group, destination_address_prefix=None, destination_port_range=None, source_address_prefix=None, source_port_range=None, description=None, destination_address_prefixes=None, destination_port_ranges=None, source_address_prefixes=None, source_port_ranges=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a security rule exists.
• security_group -- The name of the existing network security group to contain the security rule.
• description -- Optional description of the security rule.
Ensure security rule exists: azurearm_network.security_rule_present: - name: nsg1_rule2 - security_group: nsg1 - resource_group: group1 - priority: 101 - protocol: tcp - access: allow - direction: inbound - source_address_prefix: internet - destination_address_prefix: virtualnetwork - source_port_range: '*' - destination_port_ranges: - '80' - '443' - connection_auth: {{ profile }} - require: - azurearm_network: Ensure network security group exists
salt.states.azurearm_network.subnet_absent(name, virtual_network, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a virtual network does not exist in the virtual network.
• name -- Name of the subnet.
salt.states.azurearm_network.subnet_present(name, address_prefix, virtual_network, resource_group, security_group=None, route_table=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a subnet exists.
• address_prefix -- A CIDR block used by the subnet within the virtual network.
• virtual_network -- Name of the existing virtual network to contain the subnet.
• security_group -- The name of the existing network security group to assign to the subnet.
• route_table -- The name of the existing route table to assign to the subnet.
Ensure subnet exists: azurearm_network.subnet_present: - name: vnet1_sn1 - virtual_network: vnet1 - resource_group: group1 - address_prefix: '192.168.1.0/24' - security_group: nsg1 - route_table: rt1 - connection_auth: {{ profile }} - require: - azurearm_network: Ensure virtual network exists - azurearm_network: Ensure network security group exists - azurearm_network: Ensure route table exists
salt.states.azurearm_network.virtual_network_absent(name, resource_group, connection_auth=None) New in version 2019.2.0.
Ensure a virtual network does not exist in the resource group.
• name -- Name of the virtual network.
salt.states.azurearm_network.virtual_network_present(name, address_prefixes, resource_group, dns_servers=None, tags=None, connection_auth=None, **kwargs) New in version 2019.2.0.
Ensure a virtual network exists.
• dns_servers -- A list of DNS server addresses.
• tags -- A dictionary of strings can be passed as tag metadata to the virtual network object.