neulab/tldr huggingface dataset:
salt '*' puppet.run salt '*' puppet.run tags=basefiles::edit,apache::server salt '*' puppet.run agent onetime no-daemonize no-usecacheonfailure no-splay ignorecache salt '*' puppet.run debug salt '*' puppet.run apply /a/b/manifest.pp modulepath=/a/b/modules tags=basefiles::edit,apache::server
salt.modules.puppet.status() New in version 2014.7.0.
Display puppet agent status
salt '*' puppet.status
salt.modules.puppet.summary() New in version 2014.7.0.
Show a summary of the last puppet agent run
salt '*' puppet.summary
salt.modules.purefa Management of Pure Storage FlashArray
Installation Prerequisites • You will need the purestorage python package in your python installation path that is running salt.
pip install purestorage
• Configure Pure Storage FlashArray authentication. Use one of the following three methods.
1. From the minion config
pure_tags: fa: san_ip: management vip or hostname for the FlashArray api_token: A valid api token for the FlashArray being managed
2. From environment (PUREFA_IP and PUREFA_API)
3. From the pillar (PUREFA_IP and PUREFA_API)
maintainer Simon Dodsley (simon@purestorage.com)
requires purestorage
salt.modules.purefa.hg_create(name, host=None, volume=None) Create a hostgroup on a Pure Storage FlashArray.
Will return False if hostgroup already exists, or if named host or volume do not exist.
name   string name of hostgroup (truncated to 63 characters)
host   string name of host to add to hostgroup
volume string name of volume to add to hostgroup
salt '*' purefa.hg_create foo host=bar volume=vol
salt.modules.purefa.hg_delete(name) Delete a hostgroup on a Pure Storage FlashArray (removes all volumes and hosts).
Will return False is hostgroup is already in a deleted state.
name   string name of hostgroup
salt '*' purefa.hg_delete foo
salt.modules.purefa.hg_remove(name, volume=None, host=None) Remove a host and/or volume from a hostgroup on a Pure Storage FlashArray.
Will return False is hostgroup does not exist, or named host or volume are not in the hostgroup.
volume string name of volume to remove from hostgroup
host   string name of host to remove from hostgroup
salt '*' purefa.hg_remove foo volume=test host=bar
salt.modules.purefa.hg_update(name, host=None, volume=None) Adds entries to a hostgroup on a Pure Storage FlashArray.
Will return False is hostgroup doesn't exist, or host or volume do not exist.
salt '*' purefa.hg_update foo host=bar volume=vol
salt.modules.purefa.host_create(name, iqn=None, wwn=None) Add a host on a Pure Storage FlashArray.
Will return False if host already exists, or the iSCSI or Fibre Channel parameters are not in a valid format.  See Pure Storage FlashArray documentation.
name   string name of host (truncated to 63 characters)
iqn    string iSCSI IQN of host
wwn    string Fibre Channel WWN of host
salt '*' purefa.host_create foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>'
salt.modules.purefa.host_delete(name) Delete a host on a Pure Storage FlashArray (detaches all volumes).
Will return False if the host doesn't exist.
name   string name of host
salt '*' purefa.host_delete foo
salt.modules.purefa.host_update(name, iqn=None, wwn=None) Update a hosts port definitions on a Pure Storage FlashArray.
Will return False if new port definitions are already in use by another host, or are not in a valid format.  See Pure Storage FlashArray documentation.
iqn    string Additional iSCSI IQN of host
wwn    string Additional Fibre Channel WWN of host
salt '*' purefa.host_update foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>'
salt.modules.purefa.pg_create(name, hostgroup=None, host=None, volume=None, enabled=True) Create a protection group on a Pure Storage FlashArray.
Will return False is the following cases:
• Protection Grop already exists
• Protection Group in a deleted state
• More than one type is specified - protection groups are for only hostgroups, hosts or volumes
• Named type for protection group does not exist
name   string name of protection group
hostgroup string name of hostgroup to add to protection group
host   string name of host to add to protection group
volume string name of volume to add to protection group
salt '*' purefa.pg_create foo [hostgroup=foo | host=bar | volume=vol] enabled=[true | false]
salt.modules.purefa.pg_delete(name, eradicate=False) Delete a protecton group on a Pure Storage FlashArray.
Will return False if protection group is already in a deleted state.
salt '*' purefa.pg_delete foo
salt.modules.purefa.pg_eradicate(name) Eradicate a deleted protecton group on a Pure Storage FlashArray.
Will return False if protection group is not in a deleted state.
salt '*' purefa.pg_eradicate foo
salt.modules.purefa.pg_remove(name, hostgroup=None, host=None, volume=None) Remove a hostgroup, host or volume from a protection group on a Pure Storage FlashArray.
Will return False in the following cases:
• Protection group does not exist
• Specified type is not currently associated with the protection group
hostgroup string name of hostgroup to remove from protection group
salt '*' purefa.pg_remove foo [hostgroup=bar | host=test | volume=bar]
salt.modules.purefa.pg_update(name, hostgroup=None, host=None, volume=None) Update a protection group on a Pure Storage FlashArray.
• Incorrect type selected for current protection group type
• Specified type does not exist
salt '*' purefa.pg_update foo [hostgroup=foo | host=bar | volume=vol]
salt.modules.purefa.snap_create(name, suffix=None) Create a volume snapshot on a Pure Storage FlashArray.
Will return False is volume selected to snap does not exist.
name   string name of volume to snapshot
suffix string if specificed forces snapshot name suffix. If not specified defaults to timestamp.
salt '*' purefa.snap_create foo salt '*' purefa.snap_create foo suffix=bar
salt.modules.purefa.snap_delete(name, suffix=None, eradicate=False) Delete a volume snapshot on a Pure Storage FlashArray.
Will return False if selected snapshot does not exist.
name   string name of volume
suffix string name of snapshot
eradicate boolean Eradicate snapshot after deletion if True. Default is False
salt '*' purefa.snap_delete foo suffix=snap eradicate=True
salt.modules.purefa.snap_eradicate(name, suffix=None) Eradicate a deleted volume snapshot on a Pure Storage FlashArray.
Will return False if snapshot is not in a deleted state.
salt '*' purefa.snap_eradicate foo suffix=snap
salt.modules.purefa.snap_volume_create(name, target, overwrite=False) Create R/W volume from snapshot on a Pure Storage FlashArray.
Will return False if target volume already exists and overwrite is not specified, or selected snapshot doesn't exist.
name   string name of volume snapshot
target string name of clone volume
overwrite boolean overwrite clone if already exists (default: False)
salt '*' purefa.snap_volume_create foo.bar clone overwrite=True
salt.modules.purefa.volume_attach(name, host) Attach a volume to a host on a Pure Storage FlashArray.
Host and volume must exist or else will return False.
host   string name of host
salt '*' purefa.volume_attach foo bar
salt.modules.purefa.volume_clone(name, target, overwrite=False) Clone an existing volume on a Pure Storage FlashArray.
Will return False if source volume doesn't exist, or target volume already exists and overwrite not specified.
salt '*' purefa.volume_clone foo bar overwrite=True
salt.modules.purefa.volume_create(name, size=None) Create a volume on a Pure Storage FlashArray.
Will return False if volume already exists.
name   string name of volume (truncated to 63 characters)
size   string if specificed capacity of volume. If not specified default to 1G.  Refer to Pure Storage documentation for formatting rules.
salt '*' purefa.volume_create foo salt '*' purefa.volume_create foo size=10T
salt.modules.purefa.volume_delete(name, eradicate=False) Delete a volume on a Pure Storage FlashArray.
Will return False if volume doesn't exist is already in a deleted state.
eradicate boolean Eradicate volume after deletion if True. Default is False
salt '*' purefa.volume_delete foo eradicate=True
salt.modules.purefa.volume_detach(name, host) Detach a volume from a host on a Pure Storage FlashArray.
Will return False if either host or volume do not exist, or if selected volume isn't already connected to the host.
salt '*' purefa.volume_detach foo bar
salt.modules.purefa.volume_eradicate(name) Eradicate a deleted volume on a Pure Storage FlashArray.
Will return False is volume is not in a deleted state.
salt '*' purefa.volume_eradicate foo
salt.modules.purefa.volume_extend(name, size) Extend an existing volume on a Pure Storage FlashArray.
Will return False if new size is less than or equal to existing size.
size   string New capacity of volume.  Refer to Pure Storage documentation for formatting rules.
salt '*' purefa.volume_extend foo 10T
salt.modules.purefb Management of Pure Storage FlashBlade
Installation Prerequisites • You will need the purity_fb python package in your python installation path that is running salt.
pip install purity_fb
• Configure Pure Storage FlashBlade authentication. Use one of the following three methods.
pure_tags: fb: san_ip: management vip or hostname for the FlashBlade api_token: A valid api token for the FlashBlade being managed
2. From environment (PUREFB_IP and PUREFB_API)
3. From the pillar (PUREFB_IP and PUREFB_API)
requires purity_fb
salt.modules.purefb.fs_create(name, size=None, proto='NFS', nfs_rules='*(rw,no_root_squash)', snapshot=False) Create a filesystem on a Pure Storage FlashBlade.
Will return False if filesystem already exists.
name   string name of filesystem (truncated to 63 characters)
proto  string (Optional) Sharing protocol (NFS, CIFS or HTTP). If not specified default is NFS
snapshot: boolean (Optional) Are snapshots enabled on the filesystem. Default is False
nfs_rules string (Optional) export rules for NFS. If not specified default is *(rw,no_root_squash). Refer to Pure Storage documentation for formatting rules.
size   string if specified capacity of filesystem. If not specified default to 32G.  Refer to Pure Storage documentation for formatting rules.
salt '*' purefb.fs_create foo proto=CIFS salt '*' purefb.fs_create foo size=10T
salt.modules.purefb.fs_delete(name, eradicate=False) Delete a share on a Pure Storage FlashBlade.
Will return False if filesystem doesn't exist or is already in a deleted state.
name   string name of filesystem
eradicate boolean (Optional) Eradicate filesystem after deletion if True. Default is False
salt '*' purefb.fs_delete foo eradicate=True
salt.modules.purefb.fs_eradicate(name) Eradicate a deleted filesystem on a Pure Storage FlashBlade.
Will return False is filesystem is not in a deleted state.
salt '*' purefb.fs_eradicate foo
salt.modules.purefb.fs_extend(name, size) Resize an existing filesystem on a Pure Storage FlashBlade.
size   string New capacity of filesystem.  Refer to Pure Storage documentation for formatting rules.
salt '*' purefb.fs_extend foo 10T
salt.modules.purefb.fs_update(name, rules, snapshot=False) Update filesystem on a Pure Storage FlashBlade.
Allows for change of NFS export rules and enabling/disabled of snapshotting capability.
rules  string NFS export rules for filesystem Refer to Pure Storage documentation for formatting rules.
snapshot: boolean (Optional) Enable/Disable snapshots on the filesystem. Default is False
salt '*' purefb.fs_nfs_update foo rules='10.234.112.23(ro), 10.234.112.24(rw)' snapshot=True
salt.modules.purefb.snap_create(name, suffix=None) Create a filesystem snapshot on a Pure Storage FlashBlade.
Will return False if filesystem selected to snap does not exist.
name   string name of filesystem to snapshot
salt '*' purefb.snap_create foo salt '*' purefb.snap_create foo suffix=bar
salt.modules.purefb.snap_delete(name, suffix=None, eradicate=False) Delete a filesystem snapshot on a Pure Storage FlashBlade.
salt '*' purefb.snap_delete foo suffix=snap eradicate=True
salt.modules.purefb.snap_eradicate(name, suffix=None) Eradicate a deleted filesystem snapshot on a Pure Storage FlashBlade.
salt '*' purefb.snap_eradicate foo suffix=snap
salt.modules.pushbullet Module for sending messages to Pushbullet (https://www.pushbullet.com)
pushbullet: api_key: 'ABC123abc123ABC123abc123ABC123ab'
pushbullet: device: "Chrome" title: "Example push message" body: "Message body."
salt.modules.pushbullet.push_note(device=None, title=None, body=None) Pushing a text note.
• device -- Pushbullet target device
• title -- Note title
• body -- Note body
salt "*" pushbullet.push_note device="Chrome" title="Example title" body="Example body."
salt.modules.pushover_notify Module for sending messages to Pushover (https://www.pushover.net)
pushover: token: abAHuZyCLtdH8P4zhmFZmgUHUsv1ei8
salt.modules.pushover_notify.post_message(user=None, device=None, message=None, title=None, priority=None, expire=None, retry=None, sound=None, api_version=1, token=None) Send a message to a Pushover user or group.
• user -- The user or group to send to, must be key of user or group not email address.
• message -- The message to send to the PushOver user or group.
• title -- Specify who the message is from.
• priority -- The priority of the message, defaults to 0.
• expire -- The message should expire after N number of seconds.
• retry -- The number of times the message should be retried.
• sound -- The sound to associate with the message.
• api_version -- The PushOver API version, if not specified in the configuration.
• token -- The PushOver token, if not specified in the configuration.
salt '*' pushover.post_message user='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' title='Message from Salt' message='Build is done'
salt '*' pushover.post_message user='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' title='Message from Salt' message='Build is done' priority='2' expire='720' retry='5'
salt.modules.pw_group Manage groups on FreeBSD
salt.modules.pw_group.add(name, gid=None, **kwargs) Add the specified group
salt.modules.pw_group.adduser(name, username) Add a user in the group.
salt.modules.pw_group.chgid(name, gid) Change the gid for a named group
salt.modules.pw_group.delete(name) Remove the named group
salt.modules.pw_group.deluser(name, username) Remove a user from the group.
salt.modules.pw_group.getent(refresh=False) Return info on all groups
salt.modules.pw_group.info(name) Return information about a group
salt.modules.pw_group.members(name, members_list) Replaces members of the group with a provided list.
New in version 2015.5.4.
salt.modules.pw_user Manage users with the pw command
salt.modules.pw_user.add(name, uid=None, gid=None, groups=None, home=None, shell=None, unique=True, fullname='', roomnumber='', workphone='', homephone='', createhome=True, loginclass=None, **kwargs) Add a user to the minion
salt.modules.pw_user.chfullname(name, fullname) Change the user's Full Name
salt '*' user.chfullname foo "Foo Bar"
salt.modules.pw_user.chgid(name, gid) Change the default group of the user
salt.modules.pw_user.chgroups(name, groups, append=False) Change the groups to which a user belongs
name   Username to modify
groups List of groups to set for the user. Can be passed as a comma-separated list or a Python list.
append False Set to True to append these groups to the user's existing list of groups. Otherwise, the specified groups will replace any existing groups for the user.
salt '*' user.chgroups foo wheel,root True
salt.modules.pw_user.chhome(name, home, persist=False) Set a new home directory for an existing user
home   New home directory to set
persist False Set to True to prevent configuration files in the new home directory from being overwritten by the files from the skeleton directory.
salt '*' user.chhome foo /home/users/foo True
salt.modules.pw_user.chhomephone(name, homephone) Change the user's Home Phone
salt '*' user.chhomephone foo "7735551234"
salt.modules.pw_user.chloginclass(name, loginclass, root=None) Change the default login class of the user
salt '*' user.chloginclass foo staff
salt.modules.pw_user.chroomnumber(name, roomnumber) Change the user's Room Number
salt '*' user.chroomnumber foo 123
salt.modules.pw_user.chshell(name, shell) Change the default shell of the user
salt.modules.pw_user.chuid(name, uid) Change the uid for a named user
salt.modules.pw_user.chworkphone(name, workphone) Change the user's Work Phone
salt '*' user.chworkphone foo "7735550123"
salt.modules.pw_user.delete(name, remove=False, force=False) Remove a user from the minion
salt.modules.pw_user.get_loginclass(name) Get the login class of the user
salt '*' user.get_loginclass foo
salt.modules.pw_user.getent(refresh=False) Return the list of all info for all users
salt.modules.pw_user.info(name) Return user information
salt.modules.pw_user.list_groups(name) Return a list of groups the named user belongs to
salt.modules.pw_user.list_users() Return a list of all users
salt.modules.pw_user.rename(name, new_name) Change the username for a named user
salt.modules.pyenv Manage python installations with pyenv.
NOTE: Git needs to be installed and available via PATH if pyenv is to be installed automatically by the module.
New in version 2014.4.0.
salt.modules.pyenv.default(python=None, runas=None) Returns or sets the currently defined default python.
python=None The version to set as the default. Should match one of the versions listed by pyenv.versions. Leave blank to return the current default.
salt '*' pyenv.default salt '*' pyenv.default 2.0.0-p0
salt.modules.pyenv.do(cmdline=None, runas=None) Execute a python command with pyenv's shims from the user or the system.
salt '*' pyenv.do 'gem list bundler' salt '*' pyenv.do 'gem list bundler' deploy
salt.modules.pyenv.do_with_python(python, cmdline, runas=None) Execute a python command with pyenv's shims using a specific python version.
salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' deploy
salt.modules.pyenv.install(runas=None, path=None) Install pyenv systemwide
salt '*' pyenv.install
salt.modules.pyenv.install_python(python, runas=None) Install a python implementation.
python The version of python to install, should match one of the versions listed by pyenv.list
salt '*' pyenv.install_python 2.0.0-p0
salt.modules.pyenv.is_installed(runas=None) Check if pyenv is installed.
salt '*' pyenv.is_installed
salt.modules.pyenv.list_(runas=None) List the installable versions of python.
salt '*' pyenv.list
salt.modules.pyenv.rehash(runas=None) Run pyenv rehash to update the installed shims.
salt '*' pyenv.rehash
salt.modules.pyenv.uninstall_python(python, runas=None) Uninstall a python implementation.
python The version of python to uninstall. Should match one of the versions listed by pyenv.versions
salt '*' pyenv.uninstall_python 2.0.0-p0
salt.modules.pyenv.update(runas=None, path=None) Updates the current versions of pyenv and python-Build
salt '*' pyenv.update
salt.modules.pyenv.versions(runas=None) List the installed versions of python.
salt '*' pyenv.versions
salt.modules.qemu_img Qemu-img Command Wrapper The qemu img command is wrapped for specific functions
depends qemu-img
salt.modules.qemu_img.convert(orig, dest, fmt) Convert an existing disk image to another format using qemu-img
salt '*' qemu_img.convert /path/to/original.img /path/to/new.img qcow2
salt.modules.qemu_img.make_image(location, size, fmt) Create a blank virtual machine image file of the specified size in megabytes. The image can be created in any format supported by qemu
salt '*' qemu_img.make_image /tmp/image.qcow 2048 qcow2 salt '*' qemu_img.make_image /tmp/image.raw 10240 raw
salt.modules.qemu_nbd Qemu Command Wrapper
The qemu system comes with powerful tools, such as qemu-img and qemu-nbd which are used here to build up kvm images.
salt.modules.qemu_nbd.clear(mnt) Pass in the mnt dict returned from nbd_mount to unmount and disconnect the image from nbd. If all of the partitions are unmounted return an empty dict, otherwise return a dict containing the still mounted partitions
salt '*' qemu_nbd.clear '{"/mnt/foo": "/dev/nbd0p1"}'
salt.modules.qemu_nbd.connect(image) Activate nbd for an image file.
salt '*' qemu_nbd.connect /tmp/image.raw
salt.modules.qemu_nbd.init(image, root=None) Mount the named image via qemu-nbd and return the mounted roots
salt '*' qemu_nbd.init /srv/image.qcow2
salt.modules.qemu_nbd.mount(nbd, root=None) Pass in the nbd connection device location, mount all partitions and return a dict of mount points
salt '*' qemu_nbd.mount /dev/nbd0
salt.modules.quota Module for managing quotas on POSIX-like systems.
salt.modules.quota.get_mode(device) Report whether the quota system for this device is on or off
salt '*' quota.get_mode
salt.modules.quota.off(device) Turns off the quota system
salt '*' quota.off
salt.modules.quota.on(device) Turns on the quota system
salt '*' quota.on
salt.modules.quota.report(mount) Report on quotas for a specific volume
salt '*' quota.report /media/data
salt.modules.quota.set_(device, **kwargs) Calls out to setquota, for a specific user or group
salt '*' quota.set /media/data user=larry block-soft-limit=1048576 salt '*' quota.set /media/data group=painters file-hard-limit=1000
salt.modules.quota.stats() Runs the quotastats command, and returns the parsed output
salt '*' quota.stats
salt.modules.quota.warn() Runs the warnquota command, to send warning emails to users who are over their quota limit.
salt '*' quota.warn
salt.modules.rabbitmq Module to provide RabbitMQ compatibility to Salt.  Todo: A lot, need to add cluster support, logging, and minion configuration data.
salt.modules.rabbitmq.add_user(name, password=None, runas=None) Add a rabbitMQ user via rabbitmqctl user_add <user> <password>
salt '*' rabbitmq.add_user rabbit_user password
salt.modules.rabbitmq.add_vhost(vhost, runas=None) Adds a vhost via rabbitmqctl add_vhost.
salt '*' rabbitmq add_vhost '<vhost_name>'
salt.modules.rabbitmq.change_password(name, password, runas=None) Changes a user's password.
salt '*' rabbitmq.change_password rabbit_user password
salt.modules.rabbitmq.check_password(name, password, runas=None) New in version 2016.3.0.
Checks if a user's password is valid.
salt '*' rabbitmq.check_password rabbit_user password
salt.modules.rabbitmq.clear_password(name, runas=None) Removes a user's password.
salt '*' rabbitmq.clear_password rabbit_user
salt.modules.rabbitmq.cluster_status(runas=None) return rabbitmq cluster_status
salt '*' rabbitmq.cluster_status
salt.modules.rabbitmq.delete_policy(vhost, name, runas=None) Delete a policy based on rabbitmqctl clear_policy.
Reference: http://www.rabbitmq.com/ha.html
salt '*' rabbitmq.delete_policy / HA
salt.modules.rabbitmq.delete_upstream(name, runas=None) Deletes an upstream via rabbitmqctl clear_parameter.
• name (str) -- The name of the upstream to delete.
• runas (str) -- The name of the user to run the command as.
salt '*' rabbitmq.delete_upstream upstream_name
salt.modules.rabbitmq.delete_user(name, runas=None) Deletes a user via rabbitmqctl delete_user.
salt '*' rabbitmq.delete_user rabbit_user
salt.modules.rabbitmq.delete_vhost(vhost, runas=None) Deletes a vhost rabbitmqctl delete_vhost.
salt '*' rabbitmq.delete_vhost '<vhost_name>'
salt.modules.rabbitmq.disable_plugin(name, runas=None) Disable a RabbitMQ plugin via the rabbitmq-plugins command.
salt '*' rabbitmq.disable_plugin foo
salt.modules.rabbitmq.enable_plugin(name, runas=None) Enable a RabbitMQ plugin via the rabbitmq-plugins command.
salt '*' rabbitmq.enable_plugin foo
salt.modules.rabbitmq.force_reset(runas=None) Forcefully Return a RabbitMQ node to its virgin state
salt '*' rabbitmq.force_reset
salt.modules.rabbitmq.join_cluster(host, user='rabbit', ram_node=None, runas=None) Join a rabbit cluster
salt '*' rabbitmq.join_cluster rabbit.example.com rabbit
salt.modules.rabbitmq.list_available_plugins(runas=None) Returns a list of the names of all available plugins (enabled and disabled).
salt '*' rabbitmq.list_available_plugins
salt.modules.rabbitmq.list_enabled_plugins(runas=None) Returns a list of the names of the enabled plugins.
salt '*' rabbitmq.list_enabled_plugins
salt.modules.rabbitmq.list_permissions(vhost, runas=None) Lists permissions for vhost via rabbitmqctl list_permissions
salt '*' rabbitmq.list_permissions /myvhost
salt.modules.rabbitmq.list_policies(vhost='/', runas=None) Return a dictionary of policies nested by vhost and name based on the data returned from rabbitmqctl list_policies.
salt '*' rabbitmq.list_policies
salt.modules.rabbitmq.list_queues(runas=None, *args) Returns queue details of the / virtual host
salt '*' rabbitmq.list_queues messages consumers
salt.modules.rabbitmq.list_queues_vhost(vhost, runas=None, *args) Returns queue details of specified virtual host. This command will consider first parameter as the vhost name and rest will be treated as queueinfoitem. For getting details on vhost /, use list_queues instead).
salt.modules.rabbitmq.list_upstreams(runas=None) Returns a dict of upstreams based on rabbitmqctl list_parameters.
Parameters runas (str) -- The name of the user to run this command as.
salt '*' rabbitmq.list_upstreams
salt.modules.rabbitmq.list_user_permissions(name, runas=None) List permissions for a user via rabbitmqctl list_user_permissions
salt '*' rabbitmq.list_user_permissions user
salt.modules.rabbitmq.list_users(runas=None) Return a list of users based off of rabbitmqctl user_list.
salt '*' rabbitmq.list_users
salt.modules.rabbitmq.list_vhosts(runas=None) Return a list of vhost based on rabbitmqctl list_vhosts.
salt '*' rabbitmq.list_vhosts
salt.modules.rabbitmq.plugin_is_enabled(name, runas=None) Return whether the plugin is enabled.
salt '*' rabbitmq.plugin_is_enabled rabbitmq_plugin_name
salt.modules.rabbitmq.policy_exists(vhost, name, runas=None) Return whether the policy exists based on rabbitmqctl list_policies.
salt '*' rabbitmq.policy_exists / HA
salt.modules.rabbitmq.reset(runas=None) Return a RabbitMQ node to its virgin state
salt '*' rabbitmq.reset
salt.modules.rabbitmq.set_permissions(vhost, user, conf='.*', write='.*', read='.*', runas=None) Sets permissions for vhost via rabbitmqctl set_permissions
salt '*' rabbitmq.set_permissions myvhost myuser
salt.modules.rabbitmq.set_policy(vhost, name, pattern, definition, priority=None, runas=None, apply_to=None) Set a policy based on rabbitmqctl set_policy.
salt '*' rabbitmq.set_policy / HA '.*' '{"ha-mode":"all"}'
salt.modules.rabbitmq.set_upstream(name, uri, prefetch_count=None, reconnect_delay=None, ack_mode=None, trust_user_id=None, exchange=None, max_hops=None, expires=None, message_ttl=None, ha_policy=None, queue=None, runas=None) Configures an upstream via rabbitmqctl set_parameter. This can be an exchange-upstream, a queue-upstream or both.
Parameters name (str) -- The name of the upstream to configure.
The following parameters apply to federated exchanges and federated queues:
• uri (str) -- The AMQP URI(s) for the upstream.
• prefetch_count (int) -- The maximum number of unacknowledged messages copied over a link at any one time. Default: 1000
• reconnect_delay (int) -- The duration (in seconds) to wait before reconnecting to the broker after being disconnected. Default: 1
• ack_mode (str) -- Determines how the link should acknowledge messages.  If set to on-confirm (the default), messages are acknowledged to the upstream broker after they have been confirmed downstream. This handles network errors and broker failures without losing messages, and is the slowest option.  If set to on-publish, messages are acknowledged to the upstream broker after they have been published downstream. This handles network errors without losing messages, but may lose messages in the event of broker failures.  If set to no-ack, message acknowledgements are not used. This is the fastest option, but may lose messages in the event of network or broker failures.
• trust_user_id (bool) -- Determines how federation should interact with the validated user-id feature. If set to true, federation will pass through any validated user-id from the upstream, even though it cannot validate it itself. If set to false or not set, it will clear any validated user-id it encounters. You should only set this to true if you trust the upstream server (and by extension, all its upstreams) not to forge user-ids.
The following parameters apply to federated exchanges only:
• exchange (str) -- The name of the upstream exchange. Default is to use the same name as the federated exchange.
• max_hops (int) -- The maximum number of federation links that a message published to a federated exchange can traverse before it is discarded.  Default is 1. Note that even if max-hops is set to a value greater than 1, messages will never visit the same node twice due to travelling in a loop.  However, messages may still be duplicated if it is possible for them to travel from the source to the destination via multiple routes.
• expires (int) -- The expiry time (in milliseconds) after which an upstream queue for a federated exchange may be deleted, if a connection to the upstream broker is lost. The default is 'none', meaning the queue should never expire.  This setting controls how long the upstream queue will last before it is eligible for deletion if the connection is lost.  This value is used to set the "x-expires" argument for the upstream queue.
• message_ttl (int) -- The expiry time for messages in the upstream queue for a federated exchange (see expires), in milliseconds. Default is None, meaning messages should never expire. This does not apply to federated queues. This value is used to set the "x-message-ttl" argument for the upstream queue.
• ha_policy (str) -- Determines the "x-ha-policy" argument for the upstream queue for a federated exchange (see expires). This is only of interest when connecting to old brokers which determine queue HA mode using this argument. Default is None, meaning the queue is not HA.
The following parameter applies to federated queues only:
• queue (str) -- The name of the upstream queue. Default is to use the same name as the federated queue.
salt '*' rabbitmq.set_upstream upstream_name ack_mode=on-confirm max_hops=1             trust_user_id=True uri=amqp://hostname
salt.modules.rabbitmq.set_user_tags(name, tags, runas=None) Add user tags via rabbitmqctl set_user_tags
salt '*' rabbitmq.set_user_tags myadmin administrator
salt.modules.rabbitmq.start_app(runas=None) Start the RabbitMQ application.
salt '*' rabbitmq.start_app
salt.modules.rabbitmq.status(runas=None) return rabbitmq status
salt '*' rabbitmq.status
salt.modules.rabbitmq.stop_app(runas=None) Stops the RabbitMQ application, leaving the Erlang node running.
salt '*' rabbitmq.stop_app
salt.modules.rabbitmq.upstream_exists(name, runas=None) Return whether the upstreamexists based on rabbitmqctl list_parameters.
• name (str) -- The name of the upstream to check for.
salt '*' rabbitmq.upstream_exists rabbit_upstream
salt.modules.rabbitmq.user_exists(name, runas=None) Return whether the user exists based on rabbitmqctl list_users.
salt '*' rabbitmq.user_exists rabbit_user
salt.modules.rabbitmq.vhost_exists(name, runas=None) Return whether the vhost exists based on rabbitmqctl list_vhosts.
salt '*' rabbitmq.vhost_exists rabbit_host
salt.modules.rallydev Support for RallyDev
Requires a username and a password in /etc/salt/minion:
rallydev: username: myuser@example.com password: 123pass
salt.modules.rallydev.list_items(name) List items of a particular type
salt myminion rallydev.list_<item name>s salt myminion rallydev.list_users salt myminion rallydev.list_artifacts
salt.modules.rallydev.list_users() List the users
salt myminion rallydev.list_users
salt.modules.rallydev.query_item(name, query_string, order='Rank') Query a type of record for one or more items. Requires a valid query string.  See https://rally1.rallydev.com/slm/doc/webservice/introduction.jsp for information on query syntax.
salt myminion rallydev.query_<item name> <query string> [<order>] salt myminion rallydev.query_task '(Name contains github)' salt myminion rallydev.query_task '(Name contains reactor)' Rank
salt.modules.rallydev.query_user(query_string, order='UserName') Update a user
salt myminion rallydev.query_user '(Name contains Jo)'
salt.modules.rallydev.show_artifact(id_) Show an artifact
salt myminion rallydev.show_artifact <artifact id>
salt.modules.rallydev.show_item(name, id_) Show an item
salt myminion rallydev.show_<item name> <item id>
salt.modules.rallydev.show_user(id_) Show a user
salt myminion rallydev.show_user <user id>
salt.modules.rallydev.update_item(name, id_, field=None, value=None, postdata=None) Update an item. Either a field and a value, or a chunk of POST data, may be used, but not both.
salt myminion rallydev.update_<item name> <item id> field=<field> value=<value> salt myminion rallydev.update_<item name> <item id> postdata=<post data>
salt.modules.rallydev.update_user(id_, field, value) Update a user
salt myminion rallydev.update_user <user id> <field> <new value>
salt.modules.random_org Module for retrieving random information from Random.org
random_org: api_key: 7be1402d-5719-5bd3-a306-3def9f135da5 api_version: 1
salt.modules.random_org.generateBlobs(api_key=None, api_version=None, **kwargs) List all Slack users.
• api_key -- The Random.org api key.
• api_version -- The Random.org api version.
• format -- Specifies the format in which the blobs will be returned. Values allowed are base64 and hex.
Returns The user list.
salt '*' get_integers number=5 min=1 max=6
salt.modules.random_org.generateDecimalFractions(api_key=None, api_version=None, **kwargs) Generates true random decimal fractions
• number -- How many random decimal fractions you need. Must be within the [1,1e4] range.
• decimalPlaces -- The number of decimal places to use. Must be within the [1,20] range.
• replacement -- Specifies whether the random numbers should be picked with replacement. The default (true) will cause the numbers to be picked with replacement, i.e., the resulting numbers may contain duplicate values (like a series of dice rolls). If you want the numbers picked to be unique (like raffle tickets drawn from a container), set this value to false.
Returns A list of decimal fraction
salt '*' random_org.generateDecimalFractions number=10 decimalPlaces=4
salt '*' random_org.generateDecimalFractions number=10 decimalPlaces=4 replacement=True
salt.modules.random_org.generateGaussians(api_key=None, api_version=None, **kwargs) This method generates true random numbers from a Gaussian distribution (also known as a normal distribution).
• number -- How many random numbers you need.  Must be within the [1,1e4] range.
• mean -- The distribution's mean. Must be within the [-1e6,1e6] range.
• standardDeviation -- The distribution's standard deviation. Must be within the [-1e6,1e6] range.
• significantDigits -- The number of significant digits to use. Must be within the [2,20] range.
salt '*' random_org.generateGaussians number=10 mean=0.0 standardDeviation=1.0 significantDigits=8
salt.modules.random_org.generateIntegers(api_key=None, api_version=None, **kwargs) Generate random integers
• number -- The number of integers to generate
• minimum -- The lower boundary for the range from which the random numbers will be picked. Must be within the [-1e9,1e9] range.
• maximum -- The upper boundary for the range from which the random numbers will be picked. Must be within the [-1e9,1e9] range.
• base -- Specifies the base that will be used to display the numbers.  Values allowed are 2, 8, 10 and 16. This affects the JSON types and formatting of the resulting data as discussed below.
Returns A list of integers.
salt '*' random_org.generateIntegers number=5 minimum=1 maximum=6
salt '*' random_org.generateIntegers number=5 minimum=2 maximum=255 base=2
salt.modules.random_org.generateStrings(api_key=None, api_version=None, **kwargs) Generate random strings.
• number -- The number of strings to generate.
• length -- The length of each string. Must be within the [1,20] range. All strings will be of the same length
• characters -- A string that contains the set of characters that are allowed to occur in the random strings. The maximum number of characters is 80.
• replacement -- Specifies whether the random strings should be picked with replacement. The default (true) will cause the strings to be picked with replacement, i.e., the resulting list of strings may contain duplicates (like a series of dice rolls). If you want the strings to be unique (like raffle tickets drawn from a container), set this value to false.
Returns A list of strings.
salt '*' random_org.generateStrings number=5 length=8 characters='abcdefghijklmnopqrstuvwxyz'
salt '*' random_org.generateStrings number=10 length=16 characters'abcdefghijklmnopqrstuvwxyz'
salt.modules.random_org.generateUUIDs(api_key=None, api_version=None, **kwargs) Generate a list of random UUIDs
• number -- How many random UUIDs you need.  Must be within the [1,1e3] range.
Returns A list of UUIDs
salt '*' random_org.generateUUIDs number=5
salt.modules.random_org.getUsage(api_key=None, api_version=None) Show current usages statistics
Returns The current usage statistics.
salt '*' random_org.getUsage
salt '*' random_org.getUsage api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15 api_version=1
salt.modules.rbac_solaris Module for Solaris' Role-Based Access Control
salt.modules.rbac_solaris.auth_add(user, auth) Add authorization to user
user   string username
auth   string authorization name
salt '*' rbac.auth_add martine solaris.zone.manage salt '*' rbac.auth_add martine solaris.zone.manage,solaris.mail.mailq
salt.modules.rbac_solaris.auth_get(user, computed=True) List authorization for user
computed boolean merge results from auths command into data from user_attr
salt '*' rbac.auth_get leo
salt.modules.rbac_solaris.auth_list() List all available authorization
salt '*' rbac.auth_list
salt.modules.rbac_solaris.auth_rm(user, auth) Remove authorization from user
salt '*' rbac.auth_rm jorge solaris.zone.manage salt '*' rbac.auth_rm jorge solaris.zone.manage,solaris.mail.mailq
salt.modules.rbac_solaris.profile_add(user, profile) Add profile to user
profile string profile name
salt '*' rbac.profile_add martine 'Primary Administrator' salt '*' rbac.profile_add martine 'User Management,User Security'
salt.modules.rbac_solaris.profile_get(user, default_hidden=True) List profiles for user
default_hidden boolean hide default profiles
salt '*' rbac.profile_get leo salt '*' rbac.profile_get leo default_hidden=False
salt.modules.rbac_solaris.profile_list(default_only=False) List all available profiles
default_only boolean return only default profile
salt '*' rbac.profile_list
salt.modules.rbac_solaris.profile_rm(user, profile) Remove profile from user
salt '*' rbac.profile_rm jorge 'Primary Administrator' salt '*' rbac.profile_rm jorge 'User Management,User Security'
salt.modules.rbac_solaris.role_add(user, role) Add role to user
role   string role name
salt '*' rbac.role_add martine netcfg salt '*' rbac.role_add martine netcfg,zfssnap
salt.modules.rbac_solaris.role_get(user) List roles for user
salt '*' rbac.role_get leo
salt.modules.rbac_solaris.role_list() List all available roles
salt '*' rbac.role_list
salt.modules.rbac_solaris.role_rm(user, role) Remove role from user
salt '*' rbac.role_rm jorge netcfg salt '*' rbac.role_rm jorge netcfg,zfssnap
salt.modules.rbenv Manage ruby installations with rbenv. rbenv is supported on Linux and macOS.  rbenv doesn't work on Windows (and isn't really necessary on Windows as there is no system Ruby on Windows). On Windows, the RubyInstaller and/or Pik are both good alternatives to work with multiple versions of Ruby on the same box.
http://misheska.com/blog/2013/06/15/using-rbenv-to-manage-multiple-versions-of-ruby/
salt.modules.rbenv.default(ruby=None, runas=None) Returns or sets the currently defined default ruby
ruby   The version to set as the default. Should match one of the versions listed by rbenv.versions.  Leave blank to return the current default.
salt '*' rbenv.default salt '*' rbenv.default 2.0.0-p0
salt.modules.rbenv.do(cmdline, runas=None, env=None) Execute a ruby command with rbenv's shims from the user or the system
salt '*' rbenv.do 'gem list bundler' salt '*' rbenv.do 'gem list bundler' deploy
salt.modules.rbenv.do_with_ruby(ruby, cmdline, runas=None) Execute a ruby command with rbenv's shims using a specific ruby version
salt '*' rbenv.do_with_ruby 2.0.0-p0 'gem list bundler' salt '*' rbenv.do_with_ruby 2.0.0-p0 'gem list bundler' runas=deploy
salt.modules.rbenv.install(runas=None, path=None) Install rbenv systemwide
salt '*' rbenv.install
salt.modules.rbenv.install_ruby(ruby, runas=None) Install a ruby implementation.
ruby   The version of Ruby to install, should match one of the versions listed by rbenv.list
runas  The user under which to run rbenv. If not specified, then rbenv will be run as the user under which Salt is running.
Additional environment variables can be configured in pillar / grains / master:
rbenv: build_env: 'CONFIGURE_OPTS="--no-tcmalloc" CFLAGS="-fno-tree-dce"'
salt '*' rbenv.install_ruby 2.0.0-p0
salt.modules.rbenv.is_installed(runas=None) Check if rbenv is installed
salt '*' rbenv.is_installed
salt.modules.rbenv.list_(runas=None) List the installable versions of ruby
salt '*' rbenv.list
salt.modules.rbenv.rehash(runas=None) Run rbenv rehash to update the installed shims
salt '*' rbenv.rehash
salt.modules.rbenv.uninstall_ruby(ruby, runas=None) Uninstall a ruby implementation.
ruby   The version of ruby to uninstall. Should match one of the versions listed by rbenv.versions.
salt '*' rbenv.uninstall_ruby 2.0.0-p0
salt.modules.rbenv.update(runas=None, path=None) Updates the current versions of rbenv and ruby-build
salt '*' rbenv.update
salt.modules.rbenv.versions(runas=None) List the installed versions of ruby
salt '*' rbenv.versions
salt.modules.rdp Manage RDP Service on Windows servers
salt.modules.rdp.disable() Disable RDP the service on the server
salt '*' rdp.disable
salt.modules.rdp.disconnect_session(session_id) Disconnect a session.
Parameters session_id -- The numeric Id of the session.
Returns A boolean representing whether the disconnect succeeded.
salt '*' rdp.disconnect_session session_id
salt '*' rdp.disconnect_session 99
salt.modules.rdp.enable() Enable RDP the service on the server
salt '*' rdp.enable
salt.modules.rdp.get_session(session_id) Get information about a session.
Returns A dictionary of session information.
salt '*' rdp.get_session session_id
salt '*' rdp.get_session 99
salt.modules.rdp.list_sessions(logged_in_users_only=False) List information about the sessions.
Parameters logged_in_users_only -- If True, only return sessions with users logged in.
Returns A list containing dictionaries of session information.
salt '*' rdp.list_sessions
salt.modules.rdp.logoff_session(session_id) Initiate the logoff of a session.
Returns A boolean representing whether the logoff succeeded.
salt '*' rdp.logoff_session session_id
salt '*' rdp.logoff_session 99
salt.modules.rdp.status() Show if rdp is enabled on the server
salt '*' rdp.status
salt.modules.rebootmgr module maintainer Alberto Planas <aplanas@suse.com>
salt.modules.rebootmgr.cancel() Cancels an already running reboot.
salt microos rebootmgr cancel
salt.modules.rebootmgr.get_group() The currently set lock group for etcd.
salt microos rebootmgr get_group
salt.modules.rebootmgr.get_strategy() The currently used reboot strategy of rebootmgrd will be printed.
salt microos rebootmgr get_strategy
salt.modules.rebootmgr.get_window() The currently set maintenance window will be printed.
salt microos rebootmgr get_window
salt.modules.rebootmgr.is_active() Check if the rebootmgrd is running and active or not.
salt microos rebootmgr is_active
salt.modules.rebootmgr.lock(machine_id=None, group=None)
Lock a machine. If no group is specified, the local default group will be used. If no machine-id is specified, the local machine will be locked.
machine_id The machine-id is a network wide, unique ID. Per default the ID from /etc/machine-id is used.
group  Group name
salt microos rebootmgr lock group=group1
salt.modules.rebootmgr.reboot(order=None) Tells rebootmgr to schedule a reboot.
With the [now] option, a forced reboot is done, no lock from etcd is requested and a set maintenance window is ignored. With the [fast] option, a lock from etcd is requested if needed, but a defined maintenance window is ignored.
order  If specified, can be "now" or "fast"
salt microos rebootmgr reboot salt microos rebootmgt reboot order=now
salt.modules.rebootmgr.set_group(group)
Set the group, to which this machine belongs to get a reboot lock from etcd.
salt microos rebootmgr set_group group=group_1
salt.modules.rebootmgr.set_max(max_locks, group=None)
Set the maximal number of hosts in a group, which are allowed to reboot at the same time.
number Maximal number of hosts in a group
salt microos rebootmgr set_max 4
salt.modules.rebootmgr.set_strategy(strategy=None) A new strategy to reboot the machine is set and written into /etc/rebootmgr.conf.
strategy If specified, must be one of those options:
best-effort - This is the default strategy. If etcd is running, etcd-lock is used. If no etcd is running, but a maintenance window is specified, the strategy will be maint-window. If no maintenance window is specified, the machine is immediately rebooted (instantly).
etcd-lock - A lock at etcd for the specified lock-group will be acquired before reboot. If a maintenance window is specified, the lock is only acquired during this window.
maint-window - Reboot does happen only during a specified maintenance window. If no window is specified, the instantly strategy is followed.
instantly - Other services will be informed that a reboot will happen. Reboot will be done without getting any locks or waiting for a maintenance window.
off - Reboot requests are temporary ignored. /etc/rebootmgr.conf is not modified.
salt microos rebootmgr set_strategy stragegy=off
salt.modules.rebootmgr.set_window(time, duration) Set's the maintenance window.
time   The format of time is the same as described in systemd.time(7).
duration The format of duration is "[XXh][YYm]".
salt microos rebootmgr set_window time="Thu,Fri 2020-*-1,5 11:12:13" duration=1h
salt.modules.rebootmgr.status() Returns the current status of rebootmgrd.
Valid returned values are: 0 - No reboot requested 1 - Reboot requested 2 - Reboot requested, waiting for maintenance window 3 - Reboot requested, waiting for etcd lock.
salt microos rebootmgr status
salt.modules.rebootmgr.unlock(machine_id=None, group=None)
Unlock a machine. If no group is specified, the local default group will be used. If no machine-id is specified, the local machine will be locked.
salt microos rebootmgr unlock group=group1
salt.modules.rebootmgr.version() Return the version of rebootmgrd
salt microos rebootmgr version
salt.modules.redis Module to provide redis functionality to Salt
configuration This module requires the redis python module and uses the following defaults which may be overridden in the minion configuration:
redis.host: 'salt' redis.port: 6379 redis.db: 0 redis.password: None
salt.modules.redismod.bgrewriteaof(host=None, port=None, db=None, password=None) Asynchronously rewrite the append-only file
salt '*' redis.bgrewriteaof
salt.modules.redismod.bgsave(host=None, port=None, db=None, password=None) Asynchronously save the dataset to disk
salt '*' redis.bgsave
salt.modules.redismod.config_get(pattern='*', host=None, port=None, db=None, password=None) Get redis server configuration values
salt '*' redis.config_get salt '*' redis.config_get port
salt.modules.redismod.config_set(name, value, host=None, port=None, db=None, password=None) Set redis server configuration values
salt '*' redis.config_set masterauth luv_kittens
salt.modules.redismod.dbsize(host=None, port=None, db=None, password=None) Return the number of keys in the selected database
salt '*' redis.dbsize
salt.modules.redismod.delete(*keys, **connection_args) Deletes the keys from redis, returns number of keys deleted
salt '*' redis.delete foo
salt.modules.redismod.exists(key, host=None, port=None, db=None, password=None) Return true if the key exists in redis
salt '*' redis.exists foo
salt.modules.redismod.expire(key, seconds, host=None, port=None, db=None, password=None) Set a keys time to live in seconds
salt '*' redis.expire foo 300
salt.modules.redismod.expireat(key, timestamp, host=None, port=None, db=None, password=None) Set a keys expire at given UNIX time
salt '*' redis.expireat foo 1400000000
salt.modules.redismod.flushall(host=None, port=None, db=None, password=None) Remove all keys from all databases
salt '*' redis.flushall
salt.modules.redismod.flushdb(host=None, port=None, db=None, password=None) Remove all keys from the selected database
salt '*' redis.flushdb
salt.modules.redismod.get_key(key, host=None, port=None, db=None, password=None) Get redis key value
salt '*' redis.get_key foo