text stringlengths 81 112k |
|---|
.. versionadded:: Neon
Validate a certificate against a given CA/CRL.
cert
path to the certifiate PEM file or string
ca_name
name of the CA
crl_file
full path to the CRL file
def validate(cert, ca_name, crl_file):
'''
.. versionadded:: Neon
Validate a certificat... |
Returns a datetime.datetime object
def _get_expiration_date(cert):
'''
Returns a datetime.datetime object
'''
cert_obj = _read_cert(cert)
if cert_obj is None:
raise CommandExecutionError(
'Failed to read cert from {0}, see log for details'.format(cert)
)
return dat... |
Create a Certificate Authority (CA)
ca_name
name of the CA
bits
number of RSA key bits, default is 2048
days
number of days the CA will be valid, default is 365
CN
common name in the request, default is "localhost"
C
country, default is "US"
ST
st... |
Fetch X509 and CSR extension definitions from tls:extensions:
(common|server|client) or set them to standard defaults.
.. versionadded:: 2015.8.0
cert_type:
The type of certificate such as ``server`` or ``client``.
CLI Example:
.. code-block:: bash
salt '*' tls.get_extensions cl... |
Create a Certificate Signing Request (CSR) for a
particular Certificate Authority (CA)
ca_name
name of the CA
bits
number of RSA key bits, default is 2048
CN
common name in the request, default is "localhost"
C
country, default is "US"
ST
state, default i... |
Create a Self-Signed Certificate (CERT)
tls_dir
location appended to the ca.cert_base_path, default is 'tls'
bits
number of RSA key bits, default is 2048
CN
common name in the request, default is "localhost"
C
country, default is "US"
ST
state, default is "Ut... |
Create a Certificate (CERT) signed by a named Certificate Authority (CA)
If the certificate file already exists, the function just returns assuming
the CERT already exists.
The CN *must* match an existing CSR generated by create_csr. If it
does not, this method does nothing.
ca_name
name ... |
Create a PKCS#12 browser certificate for a particular Certificate (CN)
ca_name
name of the CA
CN
common name matching the certificate signing request
passphrase
used to unlock the PKCS#12 certificate when loaded into the browser
cacert_path
absolute path to ca certificat... |
Return information for a particular certificate
cert
path to the certifiate PEM file or string
.. versionchanged:: 2018.3.4
digest
what digest to use for fingerprinting
CLI Example:
.. code-block:: bash
salt '*' tls.cert_info /dir/for/certs/cert.pem
def cert_info(c... |
Create an empty Certificate Revocation List.
.. versionadded:: 2015.8.0
ca_name
name of the CA
cacert_path
absolute path to ca certificates root directory
ca_filename
alternative filename for the CA
.. versionadded:: 2015.5.3
crl_file
full path to the CRL ... |
Revoke a certificate.
.. versionadded:: 2015.8.0
ca_name
Name of the CA.
CN
Common name matching the certificate signing request.
cacert_path
Absolute path to ca certificates root directory.
ca_filename
Alternative filename for the CA.
cert_path
Path... |
convert a seco.range range into a list target
def _convert_range_to_list(tgt, range_server):
'''
convert a seco.range range into a list target
'''
r = seco.range.Range(range_server)
try:
return r.expand(tgt)
except seco.range.RangeException as err:
log.error('Range server except... |
Filter minions by a generic filter.
def _ret_minions(self, filter_):
'''
Filter minions by a generic filter.
'''
minions = {}
for minion in filter_(self.raw):
data = self.get_data(minion)
if data:
minions[minion] = data.copy()
retu... |
Return minions that match via glob
def ret_glob_minions(self):
'''
Return minions that match via glob
'''
fnfilter = functools.partial(fnmatch.filter, pat=self.tgt)
return self._ret_minions(fnfilter) |
Return minions that match via pcre
def ret_pcre_minions(self):
'''
Return minions that match via pcre
'''
tgt = re.compile(self.tgt)
refilter = functools.partial(filter, tgt.match)
return self._ret_minions(refilter) |
Return minions that match via list
def ret_list_minions(self):
'''
Return minions that match via list
'''
tgt = _tgt_set(self.tgt)
return self._ret_minions(tgt.intersection) |
Return minions which match the special list-only groups defined by
ssh_list_nodegroups
def ret_nodegroup_minions(self):
'''
Return minions which match the special list-only groups defined by
ssh_list_nodegroups
'''
nodegroup = __opts__.get('ssh_list_nodegroups', {}).get(... |
Return minions that are returned by a range query
def ret_range_minions(self):
'''
Return minions that are returned by a range query
'''
if HAS_RANGE is False:
raise RuntimeError("Python lib 'seco.range' is not available")
minions = {}
range_hosts = _convert... |
Return the configured ip
def get_data(self, minion):
'''
Return the configured ip
'''
ret = copy.deepcopy(__opts__.get('roster_defaults', {}))
if isinstance(self.raw[minion], six.string_types):
ret.update({'host': self.raw[minion]})
return ret
eli... |
Rather basic....
def output(data, **kwargs): # pylint: disable=unused-argument
'''
Rather basic....
'''
if not isinstance(data, six.string_types):
data = six.text_type(data)
return salt.utils.stringutils.to_unicode(data) |
Return a list of the images that are on the provider
def avail_images(call=None):
'''
Return a list of the images that are on the provider
'''
if call == 'action':
raise SaltCloudSystemExit(
'The avail_images function must be called with '
'-f or --function, or with the ... |
Return a list of the VMs that are on the provider
def list_nodes(call=None):
'''
Return a list of the VMs that are on the provider
'''
if call == 'action':
raise SaltCloudSystemExit(
'The list_nodes function must be called with -f or --function.'
)
ret = {}
items = ... |
Build and submit the XML to create a node
def create_node(vm_):
'''
Build and submit the XML to create a node
'''
# Start the tree
content = ET.Element('ve')
# Name of the instance
name = ET.SubElement(content, 'name')
name.text = vm_['name']
# Description, defaults to name
de... |
Create a single VM from a data dict
def create(vm_):
'''
Create a single VM from a data dict
'''
try:
# Check for required profile parameters before sending any API calls.
if vm_['profile'] and config.is_profile_configured(__opts__,
... |
Make a web call to a Parallels provider
def query(action=None, command=None, args=None, method='GET', data=None):
'''
Make a web call to a Parallels provider
'''
path = config.get_cloud_config_value(
'url', get_configured_provider(), __opts__, search_global=False
)
auth_handler = _HTTPB... |
Show the details from Parallels concerning an image
def show_image(kwargs, call=None):
'''
Show the details from Parallels concerning an image
'''
if call != 'function':
raise SaltCloudSystemExit(
'The show_image function must be called with -f or --function.'
)
items =... |
Show the details from Parallels concerning an instance
def show_instance(name, call=None):
'''
Show the details from Parallels concerning an instance
'''
if call != 'action':
raise SaltCloudSystemExit(
'The show_instance action must be called with -a or --action.'
)
ite... |
Wait until a specific state has been reached on a node
def wait_until(name, state, timeout=300):
'''
Wait until a specific state has been reached on a node
'''
start_time = time.time()
node = show_instance(name, call='action')
while True:
if node['state'] == state:
return ... |
Destroy a node.
CLI Example:
.. code-block:: bash
salt-cloud --destroy mymachine
def destroy(name, call=None):
'''
Destroy a node.
CLI Example:
.. code-block:: bash
salt-cloud --destroy mymachine
'''
if call == 'function':
raise SaltCloudSystemExit(
... |
Start a node.
CLI Example:
.. code-block:: bash
salt-cloud -a start mymachine
def start(name, call=None):
'''
Start a node.
CLI Example:
.. code-block:: bash
salt-cloud -a start mymachine
'''
if call != 'action':
raise SaltCloudSystemExit(
'The ... |
Send a Telegram message with the data.
:param ret: The data to be sent.
:return: Boolean if message was sent successfully.
def returner(ret):
'''
Send a Telegram message with the data.
:param ret: The data to be sent.
:return: Boolean if message was sent successfully.
... |
Walk though the jid dir and look for jobs
def _walk_through(job_dir):
'''
Walk though the jid dir and look for jobs
'''
serial = salt.payload.Serial(__opts__)
for top in os.listdir(job_dir):
t_path = os.path.join(job_dir, top)
if not os.path.exists(t_path):
continue
... |
Return a job id and prepare the job id directory.
This is the function responsible for making sure jids don't collide (unless
it is passed a jid).
So do what you have to do to make sure that stays the case
def prep_jid(nocache=False, passed_jid=None, recurse_count=0):
'''
Return a job id and prepa... |
Return data to the local job cache
def returner(load):
'''
Return data to the local job cache
'''
serial = salt.payload.Serial(__opts__)
# if a minion is returning a standalone job, get a jobid
if load['jid'] == 'req':
load['jid'] = prep_jid(nocache=load.get('nocache', False))
jid... |
Save the load to the specified jid
minions argument is to provide a pre-computed list of matched minions for
the job, for cases when this function can't compute that list itself (such
as for salt-ssh)
def save_load(jid, clear_load, minions=None, recurse_count=0):
'''
Save the load to the specified... |
Save/update the serialized list of minions for a given job
def save_minions(jid, minions, syndic_id=None):
'''
Save/update the serialized list of minions for a given job
'''
# Ensure we have a list for Python 3 compatability
minions = list(minions)
log.debug(
'Adding minions for job %s... |
Return the load data that marks a specified jid
def get_load(jid):
'''
Return the load data that marks a specified jid
'''
jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
load_fn = os.path.join(jid_dir, LOAD_P)
if not os.path.exists(jid_dir) or not os.path.exists(load_f... |
Return the information returned when the specified job id was executed
def get_jid(jid):
'''
Return the information returned when the specified job id was executed
'''
jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
serial = salt.payload.Serial(__opts__)
ret = {}
#... |
Return a dict mapping all job ids to job information
def get_jids():
'''
Return a dict mapping all job ids to job information
'''
ret = {}
for jid, job, _, _ in _walk_through(_job_dir()):
ret[jid] = salt.utils.jid.format_jid_instance(jid, job)
if __opts__.get('job_cache_store_endti... |
Return a list of all jobs information filtered by the given criteria.
:param int count: show not more than the count of most recent jobs
:param bool filter_find_jobs: filter out 'saltutil.find_job' jobs
def get_jids_filter(count, filter_find_job=True):
'''
Return a list of all jobs information filtered... |
Clean out the old jobs from the job cache
def clean_old_jobs():
'''
Clean out the old jobs from the job cache
'''
if __opts__['keep_jobs'] != 0:
jid_root = _job_dir()
if not os.path.exists(jid_root):
return
# Keep track of any empty t_path dirs that need to be remo... |
Update (or store) the end time for a given job
Endtime is stored as a plain text string
def update_endtime(jid, time):
'''
Update (or store) the end time for a given job
Endtime is stored as a plain text string
'''
jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
t... |
Retrieve the stored endtime for a given job
Returns False if no endtime is present
def get_endtime(jid):
'''
Retrieve the stored endtime for a given job
Returns False if no endtime is present
'''
jid_dir = salt.utils.jid.jid_dir(jid, _job_dir(), __opts__['hash_type'])
etpath = os.path.joi... |
Save the register to msgpack files
def save_reg(data):
'''
Save the register to msgpack files
'''
reg_dir = _reg_dir()
regfile = os.path.join(reg_dir, 'register')
try:
if not os.path.exists(reg_dir):
os.makedirs(reg_dir)
except OSError as exc:
if exc.errno == err... |
Load the register from msgpack files
def load_reg():
'''
Load the register from msgpack files
'''
reg_dir = _reg_dir()
regfile = os.path.join(reg_dir, 'register')
try:
with salt.utils.files.fopen(regfile, 'r') as fh_:
return salt.utils.msgpack.load(fh_)
except Exception:... |
Merge obj_b into obj_a.
def merge_recursive(obj_a, obj_b, level=False):
'''
Merge obj_b into obj_a.
'''
return aggregate(obj_a, obj_b, level,
map_class=AggregatedMap,
sequence_class=AggregatedSequence) |
Build the SLSMap
def construct_yaml_omap(self, node):
'''
Build the SLSMap
'''
sls_map = SLSMap()
if not isinstance(node, MappingNode):
raise ConstructorError(
None,
None,
'expected a mapping node, but found {0}'.format... |
Build the SLSString.
def construct_sls_str(self, node):
'''
Build the SLSString.
'''
# Ensure obj is str, not py2 unicode or py3 bytes
obj = self.construct_scalar(node)
if six.PY2:
obj = obj.encode('utf-8')
return SLSString(obj) |
Verify integers and pass them in correctly is they are declared
as octal
def construct_sls_int(self, node):
'''
Verify integers and pass them in correctly is they are declared
as octal
'''
if node.value == '0':
pass
elif node.value.startswith('0') \
... |
Ensure the DynamoDB table exists. Table throughput can be updated after
table creation.
Global secondary indexes (GSIs) are managed with some exceptions:
- If a GSI deletion is detected, a failure will occur (deletes should be
done manually in the AWS console).
- If multiple GSIs are added in a... |
Handles global secondary index for the table present state.
def _global_indexes_present(provisioned_indexes, global_indexes, changes_old,
changes_new, comments, name, region, key, keyid,
profile):
'''Handles global secondary index for the table present state.... |
Returns 3 disjoint sets of indexes: existing, to be created, and to be deleted.
def _partition_index_names(provisioned_index_names, index_names):
'''Returns 3 disjoint sets of indexes: existing, to be created, and to be deleted.'''
existing_index_names = set()
new_index_names = set()
for name in index_... |
Updates ret iff there was a failure or in test mode.
def _add_global_secondary_index(ret, name, index_name, changes_old, changes_new, comments,
gsi_config, region, key, keyid, profile):
'''Updates ret iff there was a failure or in test mode.'''
if __opts__['test']:
ret['... |
Updates ret iff there was a failure or in test mode.
def _update_global_secondary_indexes(ret, changes_old, changes_new, comments, existing_index_names,
provisioned_gsi_config, gsi_config, name, region, key,
keyid, profile):
'''Updates ret i... |
helper method for present. ensure that cloudwatch_alarms are set
def _alarms_present(name, alarms, alarms_from_pillar,
write_capacity_units, read_capacity_units,
region, key, keyid, profile):
'''helper method for present. ensure that cloudwatch_alarms are set'''
# load... |
Datapipeline API is throttling us, as all the pipelines are started at the same time.
We would like to uniformly distribute the startTime over a 60 minute window.
Return the next future utc datetime where
hour == utc_hour
minute = A value between 0-59 (depending on table name)
second = ... |
Generate winrepo_cachefile based on sls files in the winrepo_dir
opts
Specify an alternate opts dict. Should not be used unless this function
is imported into an execution module.
fire_event : True
Fire an event on failure. Only supported on the master.
CLI Example:
.. code-b... |
Checkout git repos containing Windows Software Package Definitions
opts
Specify an alternate opts dict. Should not be used unless this function
is imported into an execution module.
clean : False
Clean repo cachedirs which are not configured under
:conf_master:`winrepo_remotes`... |
Sync custom modules into the extension_modules directory
def sync(opts,
form,
saltenv=None,
extmod_whitelist=None,
extmod_blacklist=None):
'''
Sync custom modules into the extension_modules directory
'''
if saltenv is None:
saltenv = ['base']
if extmod_w... |
Applies a function to each element of a list, returning the resulting list.
A separate thread is created for each element in the input list and the
passed function is called for each of the elements. When all threads have
finished execution a list with the results corresponding to the inputs is
returne... |
Invoke a state run on a given target
name
An arbitrary name used to track the state execution
tgt
The target specification for the state run.
.. versionadded: 2016.11.0
Masterless support: When running on a masterless minion, the ``tgt``
is ignored and will always be ... |
Execute a single module function on a remote minion via salt or salt-ssh
name
The name of the function to run, aka cmd.run or pkg.install
tgt
The target specification, aka '*' for all minions
tgt_type
The target type, defaults to ``glob``
arg
The list of arguments to ... |
Watch Salt's event bus and block until a condition is met
.. versionadded:: 2014.7.0
name
An event tag to watch for; supports Reactor-style globbing.
id_list
A list of event identifiers to watch for -- usually the minion ID. Each
time an event tag is matched the event data is inspe... |
Execute a runner module on the master
.. versionadded:: 2014.7.0
name
The name of the function to run
kwargs
Any keyword arguments to pass to the runner function
asynchronous
Run the salt command but don't wait for a reply.
.. versionadded:: neon
.. code-block:... |
Executes multiple runner modules on the master in parallel.
.. versionadded:: 2017.x.0 (Nitrogen)
A separate thread is spawned for each runner. This state is intended to be
used with the orchestrate runner in place of the ``saltmod.runner`` state
when different tasks should be run in parallel. In gene... |
Execute a wheel module on the master
.. versionadded:: 2014.7.0
name
The name of the function to run
kwargs
Any keyword arguments to pass to the wheel function
asynchronous
Run the salt command but don't wait for a reply.
.. versionadded:: neon
.. code-block:: ... |
List all Slack rooms.
:param api_key: The Slack admin api key.
:return: The room list.
CLI Example:
.. code-block:: bash
salt '*' slack.list_rooms
salt '*' slack.list_rooms api_key=peWcBiMOS9HrZG15peWcBiMOS9HrZG15
def list_rooms(api_key=None):
'''
List all Slack rooms.
... |
Find a room by name and return it.
:param name: The room name.
:param api_key: The Slack admin api key.
:return: The room object.
CLI Example:
.. code-block:: bash
salt '*' slack.find_room name="random"
salt '*' slack.find_room name="random" api_key=peWcBiMOS9HrZG15peW... |
Find a user by name and return it.
:param name: The user name.
:param api_key: The Slack admin api key.
:return: The user object.
CLI Example:
.. code-block:: bash
salt '*' slack.find_user name="ThomasHatch"
salt '*' slack.find_user name="ThomasHatch" api_k... |
Send a message to a Slack channel.
:param channel: The channel name, either will work.
:param message: The message to send to the Slack channel.
:param from_name: Specify who the message is from.
:param api_key: The Slack api key, if not specified in the configuration.
:param icon: ... |
Send message to Slack incoming webhook.
:param message: The topic of message.
:param attachment: The message to send to the Slacke WebHook.
:param color: The color of border of left side
:param short: An optional flag indicating whether the value is short
enough... |
Add the specified group
name
Name of the new group
gid
Use GID for the new group
system
Create a system account
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.add foo 3456
def add(name, gid=None, system=False, root=N... |
Remove the named group
name
Name group to delete
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.delete foo
def delete(name, root=None):
'''
Remove the named group
name
Name group to delete
root
Directory to c... |
Return information about a group
name
Name of the group
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.info foo
def info(name, root=None):
'''
Return information about a group
name
Name of the group
root
Dire... |
Return info on all groups
refresh
Force a refresh of group information
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.getent
def getent(refresh=False, root=None):
'''
Return info on all groups
refresh
Force a refresh of g... |
Change an attribute for a named user
def _chattrib(name, key, value, param, root=None):
'''
Change an attribute for a named user
'''
pre_info = info(name, root=root)
if not pre_info:
return False
if value == pre_info[key]:
return True
cmd = ['groupmod']
if root is not... |
Add a user in the group.
name
Name of the group to modify
username
Username to add to the group
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.adduser foo bar
Verifies if a valid username 'bar' as a member of an existing gro... |
Remove a user from the group.
name
Name of the group to modify
username
Username to delete from the group
root
Directory to chroot into
CLI Example:
.. code-block:: bash
salt '*' group.deluser foo bar
Removes a member user 'bar' from a group 'foo'. If grou... |
Replaces members of the group with a provided list.
name
Name of the group to modify
members_list
Username list to set into the group
root
Directory to chroot into
CLI Example:
salt '*' group.members foo 'user1,user2,user3,...'
Replaces a membership list for a l... |
Alternative implementation for getgrnam, that use only /etc/group
def _getgrnam(name, root=None):
'''
Alternative implementation for getgrnam, that use only /etc/group
'''
root = root or '/'
passwd = os.path.join(root, 'etc/group')
with salt.utils.files.fopen(passwd) as fp_:
for line in... |
Execute nagios plugin if it's in the directory with salt command specified in run_type
def _execute_cmd(plugin, args='', run_type='cmd.retcode'):
'''
Execute nagios plugin if it's in the directory with salt command specified in run_type
'''
data = {}
all_plugins = list_plugins()
if plugin in a... |
Run one or more nagios plugins from pillar data and get the result of run_type
The pillar have to be in this format:
------
webserver:
Ping_google:
- check_icmp: 8.8.8.8
- check_icmp: google.com
Load:
- check_load: -w 0.8 -c 1
APT:
- ch... |
Run one nagios plugin and return retcode of the execution
def retcode(plugin, args='', key_name=None):
'''
Run one nagios plugin and return retcode of the execution
'''
data = {}
# Remove all the spaces, the key must not have any space
if key_name is None:
key_name = _format_dict_key(a... |
Run one or more nagios plugins from pillar data and get the result of cmd.retcode
The pillar have to be in this format::
------
webserver:
Ping_google:
- check_icmp: 8.8.8.8
- check_icmp: google.com
Load:
- check_load: -w 0.8 -... |
List all the nagios plugins
CLI Example:
.. code-block:: bash
salt '*' nagios.list_plugins
def list_plugins():
'''
List all the nagios plugins
CLI Example:
.. code-block:: bash
salt '*' nagios.list_plugins
'''
plugin_list = os.listdir(PLUGINDIR)
ret = []
fo... |
Make sure that a package is installed.
name
The name of the package to install
cyg_arch : x86_64
The cygwin architecture to install the package into.
Current options are x86 and x86_64
mirrors : None
List of mirrors to check.
None will use a default mirror (kernel.... |
Make sure that a package is not installed.
name
The name of the package to uninstall
cyg_arch : x86_64
The cygwin architecture to remove the package from.
Current options are x86 and x86_64
mirrors : None
List of mirrors to check.
None will use a default mirror (ke... |
Make sure all packages are up to date.
name : None
No affect, salt fails poorly without the arg available
cyg_arch : x86_64
The cygwin architecture to update.
Current options are x86 and x86_64
mirrors : None
List of mirrors to check.
None will use a default mirror... |
Parse varstack data and return the result
def ext_pillar(minion_id, # pylint: disable=W0613
pillar, # pylint: disable=W0613
conf):
'''
Parse varstack data and return the result
'''
vs = varstack.Varstack(config_filename=conf)
return vs.evaluate(__grains__) |
Query the PagerDuty API
def query(method='GET', profile_dict=None, url=None, path='api/v1',
action=None, api_key=None, service=None, params=None,
data=None, subdomain=None, client_url=None, description=None,
opts=None, verify_ssl=True):
'''
Query the PagerDuty API
'''
user... |
List items belonging to an API call. Used for list_services() and
list_incidents()
def list_items(action, key, profile_dict=None, api_key=None, opts=None):
'''
List items belonging to an API call. Used for list_services() and
list_incidents()
'''
items = salt.utils.json.loads(query(
pro... |
Add the specified group
CLI Example:
.. code-block:: bash
salt '*' group.add foo 3456
def add(name, gid=None, system=False, root=None):
'''
Add the specified group
CLI Example:
.. code-block:: bash
salt '*' group.add foo 3456
'''
cmd = 'mkgroup '
if system and ... |
Return information about a group
CLI Example:
.. code-block:: bash
salt '*' group.info foo
def info(name):
'''
Return information about a group
CLI Example:
.. code-block:: bash
salt '*' group.info foo
'''
try:
grinfo = grp.getgrnam(name)
except KeyErro... |
Return info on all groups
CLI Example:
.. code-block:: bash
salt '*' group.getent
def getent(refresh=False):
'''
Return info on all groups
CLI Example:
.. code-block:: bash
salt '*' group.getent
'''
if 'group.getent' in __context__ and not refresh:
return _... |
Remove a user from the group.
CLI Example:
.. code-block:: bash
salt '*' group.deluser foo bar
Removes a member user 'bar' from a group 'foo'. If group is not present
then returns True.
def deluser(name, username, root=None):
'''
Remove a user from the group.
CLI Example:
... |
Replaces members of the group with a provided list.
CLI Example:
salt '*' group.members foo 'user1,user2,user3,...'
Replaces a membership list for a local group 'foo'.
foo:x:1234:user1,user2,user3,...
def members(name, members_list, root=None):
'''
Replaces members of the group with ... |
Install pyenv systemwide
CLI Example:
.. code-block:: bash
salt '*' pyenv.install
def install(runas=None, path=None):
'''
Install pyenv systemwide
CLI Example:
.. code-block:: bash
salt '*' pyenv.install
'''
path = path or _pyenv_path(runas)
path = os.path.expa... |
Updates the current versions of pyenv and python-Build
CLI Example:
.. code-block:: bash
salt '*' pyenv.update
def update(runas=None, path=None):
'''
Updates the current versions of pyenv and python-Build
CLI Example:
.. code-block:: bash
salt '*' pyenv.update
'''
... |
Install a python implementation.
python
The version of python to install, should match one of the
versions listed by pyenv.list
CLI Example:
.. code-block:: bash
salt '*' pyenv.install_python 2.0.0-p0
def install_python(python, runas=None):
'''
Install a python implement... |
Uninstall a python implementation.
python
The version of python to uninstall. Should match one of the versions
listed by :mod:`pyenv.versions <salt.modules.pyenv.versions>`
CLI Example:
.. code-block:: bash
salt '*' pyenv.uninstall_python 2.0.0-p0
def uninstall_python(python, ru... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.