text stringlengths 81 112k |
|---|
Return ip address and FQDN grains
def ip_fqdn():
'''
Return ip address and FQDN grains
'''
if salt.utils.platform.is_proxy():
return {}
ret = {}
ret['ipv4'] = salt.utils.network.ip_addrs(include_loopback=True)
ret['ipv6'] = salt.utils.network.ip_addrs6(include_loopback=True)
_... |
Provide a dict of the connected interfaces and their ip addresses
The addresses will be passed as a list for each interface
def ip_interfaces():
'''
Provide a dict of the connected interfaces and their ip addresses
The addresses will be passed as a list for each interface
'''
# Provides:
# ... |
Provide a dict of the connected interfaces and their
hw addresses (Mac Address)
def hwaddr_interfaces():
'''
Provide a dict of the connected interfaces and their
hw addresses (Mac Address)
'''
# Provides:
# hwaddr_interfaces
ret = {}
ifaces = _get_interfaces()
for face in ifac... |
Parse the resolver configuration file
.. versionadded:: 2016.3.0
def dns():
'''
Parse the resolver configuration file
.. versionadded:: 2016.3.0
'''
# Provides:
# dns
if salt.utils.platform.is_windows() or 'proxyminion' in __opts__:
return {}
resolv = salt.utils.dns.p... |
Provide the machine-id for machine/virtualization combination
def get_machine_id():
'''
Provide the machine-id for machine/virtualization combination
'''
# Provides:
# machine-id
if platform.system() == 'AIX':
return _aix_get_machine_id()
locations = ['/etc/machine-id', '/var/lib... |
Return the path of the salt module
def saltpath():
'''
Return the path of the salt module
'''
# Provides:
# saltpath
salt_path = os.path.abspath(os.path.join(__file__, os.path.pardir))
return {'saltpath': os.path.dirname(salt_path)} |
Get system specific hardware data from dmidecode
Provides
biosversion
productname
manufacturer
serialnumber
biosreleasedate
uuid
.. versionadded:: 0.9.5
def _hw_data(osdata):
'''
Get system specific hardware data from dmidecode
Provides
bio... |
Shell-out Python 3 for compute reliable hash
:return:
def _get_hash_by_shell():
'''
Shell-out Python 3 for compute reliable hash
:return:
'''
id_ = __opts__.get('id', '')
id_hash = None
py_ver = sys.version_info[:2]
if py_ver >= (3, 3):
# Python 3.3 enabled hash randomizatio... |
Provides an integer based on the FQDN of a machine.
Useful as server-id in MySQL replication or anywhere else you'll need an ID
like this.
def get_server_id():
'''
Provides an integer based on the FQDN of a machine.
Useful as server-id in MySQL replication or anywhere else you'll need an ID
lik... |
Populates grains which describe whether a server has a default gateway
configured or not. Uses `ip -4 route show` and `ip -6 route show` and greps
for a `default` at the beginning of any line. Assuming the standard
`default via <ip>` format for default gateways, it will also parse out the
ip address of ... |
Return the kernel boot parameters
def kernelparams():
'''
Return the kernel boot parameters
'''
if salt.utils.platform.is_windows():
# TODO: add grains using `bcdedit /enum {current}`
return {}
else:
try:
with salt.utils.files.fopen('/proc/cmdline', 'r') as fhr:
... |
Helper function to find valid table attributes
def _table_attrs(table):
'''
Helper function to find valid table attributes
'''
cmd = ['osqueryi'] + ['--json'] + ['pragma table_info({0})'.format(table)]
res = __salt__['cmd.run_all'](cmd)
if res['retcode'] == 0:
attrs = []
text = ... |
Helper function to run raw osquery queries
def _osquery(sql, format='json'):
'''
Helper function to run raw osquery queries
'''
ret = {
'result': True,
}
cmd = ['osqueryi'] + ['--json'] + [sql]
res = __salt__['cmd.run_all'](cmd)
if res['stderr']:
ret['result'] = False
... |
Helper function to run osquery queries
def _osquery_cmd(table, attrs=None, where=None, format='json'):
'''
Helper function to run osquery queries
'''
ret = {
'result': True,
}
if attrs:
if isinstance(attrs, list):
valid_attrs = _table_attrs(table)
if val... |
Return version of osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.version
def version():
'''
Return version of osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.version
'''
_false_return = {'result': False,
'comment': 'OSQue... |
Return cpuid information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.rpm_packages
def rpm_packages(attrs=None, where=None):
'''
Return cpuid information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.rpm_packages
'''
if __grains... |
Return kernel_integrity information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_integrity
def kernel_integrity(attrs=None, where=None):
'''
Return kernel_integrity information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel... |
Return kernel_modules information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_modules
def kernel_modules(attrs=None, where=None):
'''
Return kernel_modules information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.kernel_modules... |
Return memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.memory_map
def memory_map(attrs=None, where=None):
'''
Return memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.memory_map
'''
if __gr... |
Return process_memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.process_memory_map
def process_memory_map(attrs=None, where=None):
'''
Return process_memory_map information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquer... |
Return shared_memory information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.shared_memory
def shared_memory(attrs=None, where=None):
'''
Return shared_memory information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.shared_memory
... |
Return apt_sources information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.apt_sources
def apt_sources(attrs=None, where=None):
'''
Return apt_sources information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.apt_sources
'''
if... |
Return deb_packages information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.deb_packages
def deb_packages(attrs=None, where=None):
'''
Return deb_packages information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.deb_packages
'''
... |
Return alf information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.alf
def alf(attrs=None, where=None):
'''
Return alf information from osquery
CLI Example:
.. code-block:: bash
salt '*' osquery.alf
'''
if salt.utils.platform.is_darwin():
... |
Check that the function passed really exists
def verify_fun(lazy_obj, fun):
'''
Check that the function passed really exists
'''
if not fun:
raise salt.exceptions.SaltInvocationError(
'Must specify a function to run!\n'
'ex: manage.up'
)
if fun not in lazy_ob... |
Clear the dict
def clear(self):
'''
Clear the dict
'''
# create a dict to store loaded values in
self._dict = getattr(self, 'mod_dict_class', dict)()
# have we already loded everything?
self.loaded = False |
Check to see if an instance profile exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
def instance_profile_exists(name, region=None, key=None, keyid=None,
profile=None):
'''
Check to see if an instance profile exis... |
Check to see if an IAM role exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.role_exists myirole
def role_exists(name, region=None, key=None, keyid=None, profile=None):
'''
Check to see if an IAM role exists.
CLI Example:
.. code-block:: bash
salt myminion ... |
Get information for a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.describe_role myirole
def describe_role(name, region=None, key=None, keyid=None, profile=None):
'''
Get information for a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.des... |
Create a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_user myuser
def create_user(user_name, path=None, region=None, key=None, keyid=None,
profile=None):
'''
Create a user.
.. versionadded:: 2015.8.0
CLI Examp... |
Get all access keys from a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_access_keys myuser
def get_all_access_keys(user_name, marker=None, max_items=None,
region=None, key=None, keyid=None, profile=None):
'''
G... |
Delete a user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user myuser
def delete_user(user_name, region=None, key=None, keyid=None,
profile=None):
'''
Delete a user.
.. versionadded:: 2015.8.0
CLI Example:
..... |
Get user information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user myuser
def get_user(user_name=None, region=None, key=None, keyid=None, profile=None):
'''
Get user information.
.. versionadded:: 2015.8.0
CLI Example:
.. co... |
Get group information.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup
def get_group(group_name, region=None, key=None, keyid=None, profile=None):
'''
Get group information.
.. versionadded:: 2015.8.0
CLI Example:
.. c... |
Get group information.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group mygroup
def get_group_members(group_name, region=None, key=None, keyid=None, profile=None):
'''
Get group information.
.. versionadded:: 2016.3.0
CLI Example:
... |
Add user to group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.add_user_to_group myuser mygroup
def add_user_to_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
'''
Add user to group.
.. ver... |
Check if user exists in group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.user_exists_in_group myuser mygroup
def user_exists_in_group(user_name, group_name, region=None, key=None, keyid=None,
profile=None):
'''
Check if ... |
Adds or updates the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.put_group_policy mygroup policyname policyrules
def put_group_policy(group_name, policy_name, policy_json, region=None, key=None,
... |
Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group_policy mygroup mypolicy
def delete_group_policy(group_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a group policy.
CLI Example::
... |
Retrieves the specified policy document for the specified group.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_group_policy mygroup policyname
def get_group_policy(group_name, policy_name, region=None, key=None,
keyid=None, profile=... |
Get and return all IAM group details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_groups
def get_all_groups(path_prefix='/', region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM group details, star... |
Get and return all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.get_all_instance_profiles
def get_all_instance_profiles(path_prefix='/', region=None, key=None,
keyid=None, profile=None):
'''
Ge... |
List all IAM instance profiles, starting at the optional path.
.. versionadded:: 2016.11.0
CLI Example:
salt-call boto_iam.list_instance_profiles
def list_instance_profiles(path_prefix='/', region=None, key=None,
keyid=None, profile=None):
'''
List all IAM instance... |
Get a list of policy names from a group.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_group_policies mygroup
def get_all_group_policies(group_name, region=None, key=None, keyid=None,
profile=None):
'''
Get a list of policy names from a group.
... |
Delete a group policy.
CLI Example::
.. code-block:: bash
salt myminion boto_iam.delete_group mygroup
def delete_group(group_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a group policy.
CLI Example::
.. code-block:: bash
salt m... |
Creates a login profile for the specified user, give the user the
ability to access AWS services and the AWS Management Console.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_login_profile user_name password
def create_login_profile(user_name, pa... |
Get all MFA devices associated with an IAM user.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_mfa_devices user_name
def get_all_mfa_devices(user_name, region=None, key=None, keyid=None,
profile=None):
'''
Get all MFA... |
Deletes the specified virtual MFA device.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_virtual_mfa_device serial_num
def delete_virtual_mfa_device(serial, region=None, key=None, keyid=None, profile=None):
'''
Deletes the specified virtual MFA device.
CLI Example:
... |
Update the password policy for the AWS account.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.update_account_password_policy True
def update_account_password_policy(allow_users_to_change_password=None,
hard_expiry=None, ma... |
Get account policy for the AWS account.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_policy
def get_account_policy(region=None, key=None, keyid=None, profile=None):
'''
Get account policy for the AWS account.
.. versionadded:: 2015... |
Create an instance role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role myrole
def create_role(name, policy_document=None, path=None, region=None, key=None,
keyid=None, profile=None):
'''
Create an instance role.
CLI Example:
.. code-block:: ba... |
Delete an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role myirole
def delete_role(name, region=None, key=None, keyid=None, profile=None):
'''
Delete an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role myirole
... |
Check to see if an instance profile is associated with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.profile_associated myirole myiprofile
def profile_associated(role_name, profile_name, region, key, keyid, profile):
'''
Check to see if an instance profile is associat... |
Associate an instance profile with an IAM role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.associate_profile_to_role myirole myiprofile
def associate_profile_to_role(profile_name, role_name, region=None, key=None,
keyid=None, profile=None):
'''
Ass... |
Get a list of policy names from a role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_role_policies myirole
def list_role_policies(role_name, region=None, key=None, keyid=None,
profile=None):
'''
Get a list of policy names from a role.
CLI Example:... |
Get a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_role_policy myirole mypolicy
def get_role_policy(role_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Get a role policy.
CLI Example:
.. code-block:: bash
... |
Create or modify a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_role_policy myirole mypolicy '{"MyPolicy": "Statement": [{"Action": ["sqs:*"], "Effect": "Allow", "Resource": ["arn:aws:sqs:*:*:*"], "Sid": "MyPolicySqs1"}]}'
def create_role_policy(role_name, policy_name... |
Delete a role policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_role_policy myirole mypolicy
def delete_role_policy(role_name, policy_name, region=None, key=None,
keyid=None, profile=None):
'''
Delete a role policy.
CLI Example:
.. code-... |
Update an assume role policy for a role.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.update_assume_role_policy myrole '{"Statement":"..."}'
def update_assume_role_policy(role_name, policy_document, region=None,
key=None, keyi... |
Build a default assume role policy.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.build_policy
def build_policy(region=None, key=None, keyid=None, profile=None):
'''
Build a default assume role policy.
.. versionadded:: 2015.8.0
CLI Exampl... |
Get a the AWS account id associated with the used credentials.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_account_id
def get_account_id(region=None, key=None, keyid=None, profile=None):
'''
Get a the AWS account id associated with the used credentials.
CLI Example:
... |
Get and return all IAM role details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_roles
def get_all_roles(path_prefix=None, region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM role details, startin... |
Get and return all IAM user details, starting at the optional path.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.get_all_users
def get_all_users(path_prefix='/', region=None, key=None, keyid=None,
profile=None):
'''
Get and return all IAM user details, starting... |
Get all user policies.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_all_user_policies myuser
def get_all_user_policies(user_name, marker=None, max_items=None, region=None, key=None, keyid=None, profile=None):
'''
Get all user policies.
.. ... |
Retrieves the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_user_policy myuser mypolicyname
def get_user_policy(user_name, policy_name, region=None, key=None, keyid=None, profile=None):
'''
Retri... |
Adds or updates the specified policy document for the specified user.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.put_user_policy myuser policyname policyrules
def put_user_policy(user_name, policy_name, policy_json, region=None, key=None, keyid=None, pro... |
Delete a user policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_user_policy myuser mypolicy
def delete_user_policy(user_name, policy_name, region=None, key=None, keyid=None, profile=None):
'''
Delete a user policy.
CLI Example:
.. code-block:: bash
sa... |
Upload a certificate to Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.upload_server_cert mycert_name crt priv_key
:param cert_name: The name for the server certificate. Do not include the path in this value.
:param cert_body: The contents of... |
Lists the server certificates stored in IAM that have the specified path prefix.
.. versionadded:: ???
:param path_prefix:
The path prefix for filtering the results. For example: /company/servercerts would get
all server certificates for which the path starts with /company/servercerts .
... |
Deletes a certificate from Amazon.
.. versionadded:: 2015.8.0
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_server_cert mycert_name
def delete_server_cert(cert_name, region=None, key=None, keyid=None, profile=None):
'''
Deletes a certificate from Amazon.
.. versio... |
Get all IAM user details. Produces results that can be used to create an
sls file.
.. versionadded:: 2016.3.0
CLI Example:
salt-call boto_iam.export_users --out=txt | sed "s/local: //" > iam_users.sls
def export_users(path_prefix='/', region=None, key=None, keyid=None,
profile=N... |
Get all IAM role details. Produces results that can be used to create an
sls file.
CLI Example:
salt-call boto_iam.export_roles --out=txt | sed "s/local: //" > iam_roles.sls
def export_roles(path_prefix='/', region=None, key=None, keyid=None, profile=None):
'''
Get all IAM role details. Produ... |
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
def policy_exists(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-bloc... |
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
def get_policy(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
.. code-block:: ba... |
Create a policy.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy mypolicy '{"Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": ["s3:Get*", "s3:List*"], "Resource": ["arn:aws:s3:::my-bucket/shared/*"]},]}'
def create_policy(policy_name, policy_document, path=... |
List policies.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policies
def list_policies(region=None, key=None, keyid=None, profile=None):
'''
List policies.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policies
'''
conn = _get_conn(... |
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
def policy_version_exists(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Exampl... |
Check to see if policy exists.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.instance_profile_exists myiprofile
def get_policy_version(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Check to see if policy exists.
CLI Example:
... |
Create a policy version.
CLI Example:
.. code-block:: bash
salt myminios boto_iam.create_policy_version mypolicy '{"Version": "2012-10-17", "Statement": [{ "Effect": "Allow", "Action": ["s3:Get*", "s3:List*"], "Resource": ["arn:aws:s3:::my-bucket/shared/*"]},]}'
def create_policy_version(policy_name... |
Delete a policy version.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_policy_version mypolicy v1
def delete_policy_version(policy_name, version_id,
region=None, key=None, keyid=None, profile=None):
'''
Delete a policy version.
CLI Example:
.. co... |
List versions of a policy.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_policy_versions mypolicy
def list_policy_versions(policy_name,
region=None, key=None, keyid=None, profile=None):
'''
List versions of a policy.
CLI Example:
.. code-block:: ba... |
Detach a managed policy to a user.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.detach_user_policy mypolicy myuser
def detach_user_policy(policy_name, user_name,
region=None, key=None, keyid=None, profile=None):
'''
Detach a managed policy to a user.
CLI Ex... |
List entities that a policy is attached to.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy
def list_entities_for_policy(policy_name, path_prefix=None, entity_filter=None,
region=None, key=None, keyid=None, profile=None):
'''
List ... |
List entities attached to the given role.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_entities_for_policy mypolicy
def list_attached_role_policies(role_name, path_prefix=None, entity_filter=None,
region=None, key=None, keyid=None, profile=None):
'''
List e... |
Create SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.create_saml_provider my_saml_provider_name saml_metadata_document
def create_saml_provider(name, saml_metadata_document, region=None, key=None, keyid=None, profile=None):
'''
Create SAML provider
CLI Example:
... |
Get SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider_arn my_saml_provider_name
def get_saml_provider_arn(name, region=None, key=None, keyid=None, profile=None):
'''
Get SAML provider
CLI Example:
.. code-block:: bash
salt myminion bo... |
Delete SAML provider
CLI Example:
.. code-block:: bash
salt myminion boto_iam.delete_saml_provider my_saml_provider_name
def delete_saml_provider(name, region=None, key=None, keyid=None, profile=None):
'''
Delete SAML provider
CLI Example:
.. code-block:: bash
salt myminio... |
List SAML providers.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_saml_providers
def list_saml_providers(region=None, key=None, keyid=None, profile=None):
'''
List SAML providers.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.list_saml_providers... |
Get SAML provider document.
CLI Example:
.. code-block:: bash
salt myminion boto_iam.get_saml_provider arn
def get_saml_provider(name, region=None, key=None, keyid=None, profile=None):
'''
Get SAML provider document.
CLI Example:
.. code-block:: bash
salt myminion boto_iam... |
Validate the beacon configuration
def validate(config):
'''
Validate the beacon configuration
'''
# Configuration for adb beacon should be a dictionary with states array
if not isinstance(config, list):
log.info('Configuration for adb beacon must be a list.')
return False, ('Configu... |
Emit the status of all devices returned by adb
Specify the device states that should emit an event,
there will be an event for each device with the
event type and device specified.
.. code-block:: yaml
beacons:
adb:
- states:
- offline
- u... |
Add a value to the named set
USAGE:
.. code-block:: yaml
foo:
reg.set:
- add: bar
- match: my/custom/event
def set_(name, add, match):
'''
Add a value to the named set
USAGE:
.. code-block:: yaml
foo:
reg.set:
- add: ... |
Add the specified values to the named list
If ``stamp`` is True, then the timestamp from the event will also be added
if ``prune`` is set to an integer higher than ``0``, then only the last
``prune`` values will be kept in the list.
USAGE:
.. code-block:: yaml
foo:
reg.list:
... |
Accept a numeric value from the matched events and store a running average
of the values in the given register. If the specified value is not numeric
it will be skipped
USAGE:
.. code-block:: yaml
foo:
reg.mean:
- add: data_field
- match: my/custom/event
def... |
Clear the namespace from the register
USAGE:
.. code-block:: yaml
clearns:
reg.clear:
- name: myregister
def clear(name):
'''
Clear the namespace from the register
USAGE:
.. code-block:: yaml
clearns:
reg.clear:
- name: myregiste... |
Delete the namespace from the register
USAGE:
.. code-block:: yaml
deletens:
reg.delete:
- name: myregister
def delete(name):
'''
Delete the namespace from the register
USAGE:
.. code-block:: yaml
deletens:
reg.delete:
- name: my... |
Set a key in etcd
name
The etcd key name, for example: ``/foo/bar/baz``.
value
The value the key should contain.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt Master config.
.. code-block:: yaml
... |
Create a directory in etcd.
name
The etcd directory name, for example: ``/foo/bar/baz``.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt Master config.
.. code-block:: yaml
my_etd_config:
etcd.ho... |
Deletes a key from etcd
name
The etcd key name to remove, for example ``/foo/bar/baz``.
recurse
Optional, defaults to ``False``. If ``True`` performs a recursive delete.
profile
Optional, defaults to ``None``. Sets the etcd profile to use which has
been defined in the Salt... |
The etcd watcher, called to invoke the watch command.
When called, execute a etcd function based on a watch call requisite.
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this func... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.