Search is not available for this dataset
text
stringlengths
75
104k
def get_disabled(jail=None): ''' Return what services are available but not enabled to start at boot .. versionchanged:: 2016.3.4 Support for jail (representing jid or jail name) keyword argument in kwargs CLI Example: .. code-block:: bash salt '*' service.get_disabled ''' e...
def _switch(name, # pylint: disable=C0103 on, # pylint: disable=C0103 **kwargs): ''' Switch on/off service start at boot. .. versionchanged:: 2016.3.4 Support for jail (representing jid or jail name) and chroot keyword argument in kwarg...
def enabled(name, **kwargs): ''' Return True if the named service is enabled, false otherwise name Service name .. versionchanged:: 2016.3.4 Support for jail (representing jid or jail name) keyword argument in kwargs CLI Example: .. code-block:: bash salt '*' service.en...
def get_all(jail=None): ''' Return a list of all available services .. versionchanged:: 2016.3.4 jail: optional jid or jail name CLI Example: .. code-block:: bash salt '*' service.get_all ''' ret = [] service = _cmd(jail) for srv in __salt__['cmd.run']('{0} -l'.forma...
def start(name, jail=None): ''' Start the specified service .. versionchanged:: 2016.3.4 jail: optional jid or jail name CLI Example: .. code-block:: bash salt '*' service.start <service name> ''' cmd = '{0} {1} onestart'.format(_cmd(jail), name) return not __salt__['cmd...
def _python_installed(ret, python, user=None): ''' Check to see if given python is installed. ''' default = __salt__['pyenv.default'](runas=user) for version in __salt__['pyenv.versions'](user): if version == python: ret['result'] = True ret['comment'] = 'Requested py...
def _check_and_install_python(ret, python, default=False, user=None): ''' Verify that python is installed, install if unavailable ''' ret = _python_installed(ret, python, user=user) if not ret['result']: if __salt__['pyenv.install_python'](python, runas=user): ret['result'] = Tru...
def installed(name, default=False, user=None): ''' Verify that the specified python is installed with pyenv. pyenv is installed if necessary. name The version of python to install default : False Whether to make this python the default. user: None The user to run pyenv...
def _check_and_uninstall_python(ret, python, user=None): ''' Verify that python is uninstalled ''' ret = _python_installed(ret, python, user=user) if ret['result']: if ret['default']: __salt__['pyenv.default']('system', runas=user) if __salt__['pyenv.uninstall_python'](p...
def absent(name, user=None): ''' Verify that the specified python is not installed with pyenv. pyenv is installed if necessary. name The version of python to uninstall user: None The user to run pyenv as. .. versionadded:: 0.17.0 .. versionadded:: 0.16.0 ''' r...
def install_pyenv(name, user=None): ''' Install pyenv if not installed. Allows you to require pyenv be installed prior to installing the plugins. Useful if you want to install pyenv plugins via the git or file modules and need them installed before installing any rubies. Use the pyenv.root conf...
def send_msg(name, recipient, subject, sender=None, profile=None, use_ssl='True', attachments=None): ''' Send a message via SMTP .. code-block:: yaml server-warning-message: smtp.send_msg: - name: '...
def get_selections(fetchempty=True): ''' Answers to debconf questions for all packages in the following format:: {'package': [['question', 'type', 'value'], ...]} CLI Example: .. code-block:: bash salt '*' debconf.get_selections ''' selections = {} cmd = 'debconf-get-sele...
def set_(package, question, type, value, *extra): ''' Set answers to debconf questions for a package. CLI Example: .. code-block:: bash salt '*' debconf.set <package> <question> <type> <value> [<value> ...] ''' if extra: value = ' '.join((value,) + tuple(extra)) fd_, fna...
def set_template(path, template, context, defaults, saltenv='base', **kwargs): ''' Set answers to debconf questions from a template. path location of the file containing the package selections template template format context variables to add to the template environment ...
def set_file(path, saltenv='base', **kwargs): ''' Set answers to debconf questions from a file. CLI Example: .. code-block:: bash salt '*' debconf.set_file salt://pathto/pkg.selections ''' if '__env__' in kwargs: # "env" is not supported; Use "saltenv". kwargs.pop('__e...
def prep_jid(nocache=False, passed_jid=None): ''' Call both with prep_jid on all returners in multi_returner TODO: finish this, what do do when you get different jids from 2 returners... since our jids are time based, this make this problem hard, because they aren't unique, meaning that we have to ...
def returner(load): ''' Write return to all returners in multi_returner ''' for returner_ in __opts__[CONFIG_KEY]: _mminion().returners['{0}.returner'.format(returner_)](load)
def save_load(jid, clear_load, minions=None): ''' Write load to all returners in multi_returner ''' for returner_ in __opts__[CONFIG_KEY]: _mminion().returners['{0}.save_load'.format(returner_)](jid, clear_load)
def get_load(jid): ''' Merge the load data from all returners ''' ret = {} for returner_ in __opts__[CONFIG_KEY]: ret.update(_mminion().returners['{0}.get_load'.format(returner_)](jid)) return ret
def get_jids(): ''' Return all job data from all returners ''' ret = {} for returner_ in __opts__[CONFIG_KEY]: ret.update(_mminion().returners['{0}.get_jids'.format(returner_)]()) return ret
def clean_old_jobs(): ''' Clean out the old jobs from all returners (if you have it) ''' for returner_ in __opts__[CONFIG_KEY]: fstr = '{0}.clean_old_jobs'.format(returner_) if fstr in _mminion().returners: _mminion().returners[fstr]()
def present(name, auth=None, **kwargs): ''' Ensure domain exists and is up-to-date name Name of the domain enabled Boolean to control if domain is enabled description An arbitrary description of the domain ''' ret = {'name': name, 'changes': {}, ...
def absent(name, auth=None): ''' Ensure domain does not exist name Name of the domain ''' ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''} __salt__['keystoneng.setup_clouds'](auth) domain = __salt__['keystoneng.domain_get'](name=n...
def match(tgt, opts=None): ''' Runs the compound target check ''' if not opts: opts = __opts__ nodegroups = opts.get('nodegroups', {}) matchers = salt.loader.matchers(opts) if not isinstance(tgt, six.string_types) and not isinstance(tgt, (list, tuple)): log.error('Compound t...
def config(name, config): ''' Ensure that the marathon app with the given id is present and is configured to match the given config values. :param name: The app name/id :param config: The configuration to apply (dict) :return: A standard Salt changes dictionary ''' # setup return struct...
def running(name, restart=False, force=True): ''' Ensure that the marathon app with the given id is present and restart if set. :param name: The app name/id :param restart: Restart the app :param force: Override the current deployment :return: A standard Salt changes dictionary ''' ret ...
def present(name, template_body=None, template_url=None, parameters=None, notification_arns=None, disable_rollback=None, timeout_in_minutes=None, capabilities=None, tags=None, on_failure=None, stack_policy_body=None, stack_policy_url=None, use_previous_template=None, stack_policy_during_update_b...
def absent(name, region=None, key=None, keyid=None, profile=None): ''' Ensure cloud formation stack is absent. name (string) – The name of the stack to delete. region (string) - Region to connect to. key (string) - Secret key to be used. keyid (string) - Access key to be used. profile (...
def present(name, database, query, resample_time=None, coverage_period=None, **client_args): ''' Ensure that given continuous query is present. name Name of the continuous query to create. database Database to create continuous query on. query The query content resamp...
def system(name, utc=True): ''' Set the timezone for the system. name The name of the timezone to use (e.g.: America/Denver) utc Whether or not to set the hardware clock to UTC (default is True) ''' ret = {'name': name, 'changes': {}, 'result': None, ...
def _auth(profile=None, **kwargs): ''' Set up nova credentials ''' keystone_api_args = None if kwargs is not None: if kwargs.get('keystone_api_args') is not None: keystone_api_args = kwargs['keystone_api_args'] if profile: credentials = __salt__['config.option'](prof...
def boot(name, flavor_id=0, image_id=0, profile=None, timeout=300, **kwargs): ''' Boot (create) a new instance name Name of the new instance (must be first) flavor_id Unique integer ID for the flavor image_id Unique integer ID for the image timeout How long to...
def volume_list(search_opts=None, profile=None, **kwargs): ''' List storage volumes search_opts Dictionary of search options profile Profile to use CLI Example: .. code-block:: bash salt '*' nova.volume_list search_opts='{"display_name": "myblock"}' profile=openstack...
def volume_show(name, profile=None, **kwargs): ''' Create a block storage volume name Name of the volume profile Profile to use CLI Example: .. code-block:: bash salt '*' nova.volume_show myblock profile=openstack ''' conn = _auth(profile, **kwargs) retu...
def volume_create(name, size=100, snapshot=None, voltype=None, profile=None, **kwargs): ''' Create a block storage volume name Name of the new volume (must be first) size Volume size snapshot Block storage snapshot id voltype Type of storage profile ...
def volume_delete(name, profile=None, **kwargs): ''' Destroy the volume name Name of the volume profile Profile to build on CLI Example: .. code-block:: bash salt '*' nova.volume_delete myblock profile=openstack ''' conn = _auth(profile, **kwargs) return...
def volume_detach(name, profile=None, timeout=300, **kwargs): ''' Attach a block storage volume name Name of the new volume to attach server_name Name of the server to detach from profile Profile to build on CLI Example: .. code-block:: bash salt '*' nov...
def volume_attach(name, server_name, device='/dev/xvdb', profile=None, timeout=300, **kwargs): ''' Attach a block storage volume name Name of the new volume to attach server_name Name of the server to attach to ...
def suspend(instance_id, profile=None, **kwargs): ''' Suspend an instance instance_id ID of the instance to be suspended CLI Example: .. code-block:: bash salt '*' nova.suspend 1138 ''' conn = _auth(profile, **kwargs) return conn.suspend(instance_id)
def resume(instance_id, profile=None, **kwargs): ''' Resume an instance instance_id ID of the instance to be resumed CLI Example: .. code-block:: bash salt '*' nova.resume 1138 ''' conn = _auth(profile, **kwargs) return conn.resume(instance_id)
def lock(instance_id, profile=None, **kwargs): ''' Lock an instance instance_id ID of the instance to be locked CLI Example: .. code-block:: bash salt '*' nova.lock 1138 ''' conn = _auth(profile, **kwargs) return conn.lock(instance_id)
def delete(instance_id, profile=None, **kwargs): ''' Delete an instance instance_id ID of the instance to be deleted CLI Example: .. code-block:: bash salt '*' nova.delete 1138 ''' conn = _auth(profile, **kwargs) return conn.delete(instance_id)
def flavor_list(profile=None, **kwargs): ''' Return a list of available flavors (nova flavor-list) CLI Example: .. code-block:: bash salt '*' nova.flavor_list ''' filters = kwargs.get('filter', {}) conn = _auth(profile, **kwargs) return conn.flavor_list(**filters)
def flavor_create(name, # pylint: disable=C0103 flavor_id=0, # pylint: disable=C0103 ram=0, disk=0, vcpus=1, is_public=True, profile=None, **kwargs): ''' Add a flavor to nova (nova flavor-create...
def flavor_delete(flavor_id, profile=None, **kwargs): # pylint: disable=C0103 ''' Delete a flavor from nova by id (nova flavor-delete) CLI Example: .. code-block:: bash salt '*' nova.flavor_delete 7 ''' conn = _auth(profile, **kwargs) return conn.flavor_delete(flavor_id)
def flavor_access_list(flavor_id, profile=None, **kwargs): ''' Return a list of project IDs assigned to flavor ID CLI Example: .. code-block:: bash salt '*' nova.flavor_access_list flavor_id=ID ''' conn = _auth(profile, **kwargs) return conn.flavor_access_list(flavor_id=flavor_id,...
def flavor_access_add(flavor_id, project_id, profile=None, **kwargs): ''' Add a project to the flavor access list CLI Example: .. code-block:: bash salt '*' nova.flavor_access_add flavor_id=fID project_id=pID ''' conn = _auth(profile, **kwargs) return conn.flavor_access_add(flavor...
def flavor_access_remove(flavor_id, project_id, profile=None, **kwargs): ''' Remove a project from the flavor access list CLI Example: .. code-block:: bash salt '*' nova.flavor_access_remove flavor_id=fID project_id=pID ''' conn = _auth(profile, **kwargs) return conn.flavor_access...
def keypair_add(name, pubfile=None, pubkey=None, profile=None, **kwargs): ''' Add a keypair to nova (nova keypair-add) CLI Examples: .. code-block:: bash salt '*' nova.keypair_add mykey pubfile='/home/myuser/.ssh/id_rsa.pub' salt '*' nova.keypair_add mykey pubkey='ssh-rsa <key> myuser...
def keypair_delete(name, profile=None, **kwargs): ''' Add a keypair to nova (nova keypair-delete) CLI Example: .. code-block:: bash salt '*' nova.keypair_delete mykey ''' conn = _auth(profile, **kwargs) return conn.keypair_delete(name)
def image_list(name=None, profile=None, **kwargs): ''' Return a list of available images (nova images-list + nova image-show) If a name is provided, only that image will be displayed. CLI Examples: .. code-block:: bash salt '*' nova.image_list salt '*' nova.image_list myimage ...
def image_meta_set(image_id=None, name=None, profile=None, **kwargs): # pylint: disable=C0103 ''' Sets a key=value pair in the metadata for an image (nova image-meta set) CLI Examples: .. code-block:: bash salt '*' nova.image_meta_set ...
def image_meta_delete(image_id=None, # pylint: disable=C0103 name=None, keys=None, profile=None, **kwargs): ''' Delete a key=value pair from the metadata for an image (nova image-meta set) CLI Examples: .. code-block:: bash ...
def server_show(server_id, profile=None, **kwargs): ''' Return detailed information for an active server CLI Example: .. code-block:: bash salt '*' nova.server_show <server_id> ''' conn = _auth(profile, **kwargs) return conn.server_show(server_id)
def secgroup_create(name, description, profile=None, **kwargs): ''' Add a secgroup to nova (nova secgroup-create) CLI Example: .. code-block:: bash salt '*' nova.secgroup_create mygroup 'This is my security group' ''' conn = _auth(profile, **kwargs) return conn.secgroup_create(nam...
def secgroup_delete(name, profile=None, **kwargs): ''' Delete a secgroup to nova (nova secgroup-delete) CLI Example: .. code-block:: bash salt '*' nova.secgroup_delete mygroup ''' conn = _auth(profile, **kwargs) return conn.secgroup_delete(name)
def server_by_name(name, profile=None, **kwargs): ''' Return information about a server name Server Name CLI Example: .. code-block:: bash salt '*' nova.server_by_name myserver profile=openstack ''' conn = _auth(profile, **kwargs) return conn.server_by_name(name)
def _get_root_object(models): ''' Read list of models and returns a Root object with the proper models added. ''' root = napalm_yang.base.Root() for model in models: current = napalm_yang for part in model.split('.'): current = getattr(current, part) root.add_mode...
def diff(candidate, running, *models): ''' Returns the difference between two configuration entities structured according to the YANG model. .. note:: This function is recommended to be used mostly as a state helper. candidate First model to compare. running Second mod...
def parse(*models, **kwargs): ''' Parse configuration from the device. models A list of models to be used when parsing. config: ``False`` Parse config. state: ``False`` Parse state. profiles: ``None`` Use certain profiles to parse. If not specified, will use t...
def get_config(data, *models, **kwargs): ''' Return the native config. data Dictionary structured with respect to the models referenced. models A list of models to be used when generating the config. profiles: ``None`` Use certain profiles to generate the config. I...
def load_config(data, *models, **kwargs): ''' Generate and load the config on the device using the OpenConfig or IETF models and device profiles. data Dictionary structured with respect to the models referenced. models A list of models to be used when generating the config. pr...
def compliance_report(data, *models, **kwargs): ''' Return the compliance report using YANG objects. data Dictionary structured with respect to the models referenced. models A list of models to be used when generating the config. filepath The absolute path to the validatio...
def value_present(name, datastore, path, config): ''' Ensure a specific value exists at a given path :param name: The name for this rule :type name: ``str`` :param datastore: The datastore, e.g. running, operational. One of the NETCONF store IETF types :type datastore: :class:`Datast...
def managed(name, roles=None, profiles=None, authorizations=None): ''' Manage RBAC properties for user name : string username roles : list list of roles for user profiles : list list of profiles for user authorizations : list list of authorizations for user ...
def pillar(tgt, delimiter=DEFAULT_TARGET_DELIM): ''' Return True if the minion matches the given pillar target. The ``delimiter`` argument can be used to specify a different delimiter. CLI Example: .. code-block:: bash salt '*' match.pillar 'cheese:foo' salt '*' match.pillar 'clon...
def data(tgt): ''' Return True if the minion matches the given data target CLI Example: .. code-block:: bash salt '*' match.data 'spam:eggs' ''' matchers = salt.loader.matchers(__opts__) try: return matchers['data_match.match'](tgt, opts=__opts__) except Exception as e...
def pcre(tgt, minion_id=None): ''' Return True if the minion ID matches the given pcre target minion_id Specify the minion ID to match against the target expression .. versionadded:: 2014.7.0 CLI Example: .. code-block:: bash salt '*' match.pcre '.*' ''' if minio...
def filter_by(lookup, tgt_type='compound', minion_id=None, merge=None, merge_lists=False, default='default'): ''' Return the first match in a dictionary of target patterns .. versionadded:: 2014.7.0 CLI Example: .. code-block::...
def search_by(lookup, tgt_type='compound', minion_id=None): ''' Search a dictionary of target strings for matching targets This is the inverse of :py:func:`match.filter_by <salt.modules.match.filter_by>` and allows matching values instead of matching keys. A minion can be matched by multiple entrie...
def _run_varnishadm(cmd, params=(), **kwargs): ''' Execute varnishadm command return the output of the command cmd The command to run in varnishadm params Any additional args to add to the command line kwargs Additional options to pass to the salt cmd.run_all function ...
def version(): ''' Return server version from varnishd -V CLI Example: .. code-block:: bash salt '*' varnish.version ''' cmd = ['varnishd', '-V'] out = __salt__['cmd.run'](cmd, python_shell=False) ret = re.search(r'\(varnish-([^\)]+)\)', out).group(1) return ret
def param_show(param=None): ''' Show params of varnish cache CLI Example: .. code-block:: bash salt '*' varnish.param_show param ''' ret = _run_varnishadm('param.show', [param]) if ret['retcode']: return False else: result = {} for line in ret['stdout']...
def _strip_dirty(xmltree): ''' Removes dirtyID tags from the candidate config result. Palo Alto devices will make the candidate configuration with a dirty ID after a change. This can cause unexpected results when parsing. ''' dirty = xmltree.attrib.pop('dirtyId', None) if dirty: xmltree....
def init(opts): ''' This function gets called when the proxy starts up. For panos devices, a determination is made on the connection type and the appropriate connection details that must be cached. ''' if 'host' not in opts['proxy']: log.critical('No \'host\' key found in pillar for this...
def call(payload=None): ''' This function captures the query string and sends it to the Palo Alto device. ''' r = None try: if DETAILS['method'] == 'dev_key': # Pass the api key without the target declaration conditional_payload = {'key': DETAILS['apikey']} ...
def is_required_version(required_version='0.0.0'): ''' Because different versions of Palo Alto support different command sets, this function will return true if the current version of Palo Alto supports the required command. ''' if 'sw-version' in DETAILS['grains_cache']: current_version = D...
def grains(): ''' Get the grains from the proxied device ''' if not DETAILS.get('grains_cache', {}): DETAILS['grains_cache'] = GRAINS_CACHE try: query = {'type': 'op', 'cmd': '<show><system><info></info></system></show>'} DETAILS['grains_cache'] = call(query)['res...
def _append_comment(ret, comment): ''' append ``comment`` to ``ret['comment']`` ''' if ret['comment']: ret['comment'] = ret['comment'].rstrip() + '\n' + comment else: ret['comment'] = comment return ret
def present(name, persist=False, mods=None): ''' Ensure that the specified kernel module is loaded name The name of the kernel module to verify is loaded persist Also add module to ``/etc/modules`` mods A list of modules to verify are loaded. If this argument is used, the...
def absent(name, persist=False, comment=True, mods=None): ''' Verify that the named kernel module is not loaded name The name of the kernel module to verify is not loaded persist Remove module from ``/etc/modules`` comment Comment out module in ``/etc/modules`` rather than...
def _do(name, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' host = find_guest(name, quiet=True, path=path) if not host: return False ...
def _do_names(names, fun, path=None): ''' Invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} hosts = find_guests(names, path=path) if not hosts: re...
def find_guest(name, quiet=False, path=None): ''' Returns the host for a container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.find_guest name ''' if quiet: log...
def find_guests(names, path=None): ''' Return a dict of hosts and named guests path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' ret = {} names = names.split(',') for data in _list_iter(path=path): host,...
def init(names, host=None, saltcloud_mode=False, quiet=False, **kwargs): ''' Initialize a new container .. code-block:: bash salt-run lxc.init name host=minion_id [cpuset=cgroups_cpuset] \\ [cpushare=cgroups_cpushare] [memory=cgroups_memory] \\ [template=lxc_templa...
def cloud_init(names, host=None, quiet=False, **kwargs): ''' Wrapper for using lxc.init in saltcloud compatibility mode names Name of the containers, supports a single name or a comma delimited list of names. host Minion to start the container on. Required. path pa...
def _list_iter(host=None, path=None): ''' Return a generator iterating over hosts path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 ''' tgt = host or '*' client = salt.client.get_local_client(__opts__['conf_file']) f...
def list_(host=None, quiet=False, path=None): ''' List defined containers (running, stopped, and frozen) for the named (or all) host(s). path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-r...
def purge(name, delete_key=True, quiet=False, path=None): ''' Purge the named container and delete its minion key if present. WARNING: Destroys all data associated with the container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 201...
def start(name, quiet=False, path=None): ''' Start the named container. path path to the container parent default: /var/lib/lxc (system default) .. versionadded:: 2015.8.0 .. code-block:: bash salt-run lxc.start name ''' data = _do_names(name, 'start', path=pa...
def selinux_fs_path(): ''' Return the location of the SELinux VFS directory CLI Example: .. code-block:: bash salt '*' selinux.selinux_fs_path ''' # systems running systemd (e.g. Fedora 15 and newer) # have the selinux filesystem in a different location try: for direct...
def getenforce(): ''' Return the mode selinux is running in CLI Example: .. code-block:: bash salt '*' selinux.getenforce ''' _selinux_fs_path = selinux_fs_path() if _selinux_fs_path is None: return 'Disabled' try: enforce = os.path.join(_selinux_fs_path, 'enfo...
def getconfig(): ''' Return the selinux mode from the config file CLI Example: .. code-block:: bash salt '*' selinux.getconfig ''' try: config = '/etc/selinux/config' with salt.utils.files.fopen(config, 'r') as _fp: for line in _fp: line = s...
def setenforce(mode): ''' Set the SELinux enforcing mode CLI Example: .. code-block:: bash salt '*' selinux.setenforce enforcing ''' if isinstance(mode, six.string_types): if mode.lower() == 'enforcing': mode = '1' modestring = 'Enforcing' elif ...
def setsebool(boolean, value, persist=False): ''' Set the value for a boolean CLI Example: .. code-block:: bash salt '*' selinux.setsebool virt_use_usb off ''' if persist: cmd = 'setsebool -P {0} {1}'.format(boolean, value) else: cmd = 'setsebool {0} {1}'.format(bo...
def setsebools(pairs, persist=False): ''' Set the value of multiple booleans CLI Example: .. code-block:: bash salt '*' selinux.setsebools '{virt_use_usb: on, squid_use_tproxy: off}' ''' if not isinstance(pairs, dict): return {} if persist: cmd = 'setsebool -P ' ...
def list_sebool(): ''' Return a structure listing all of the selinux booleans on the system and what state they are in CLI Example: .. code-block:: bash salt '*' selinux.list_sebool ''' bdata = __salt__['cmd.run']('semanage boolean -l').splitlines() ret = {} for line in bd...
def setsemod(module, state): ''' Enable or disable an SELinux module. CLI Example: .. code-block:: bash salt '*' selinux.setsemod nagios Enabled .. versionadded:: 2016.3.0 ''' if state.lower() == 'enabled': cmd = 'semodule -e {0}'.format(module) elif state.lower() == ...