Module Expr Str FunctionDef arguments args defaults body Expr Str Return IfExp CompareIn Str NameLoad Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr If Call NameLoad ListLoad Call AttributeLoad NameLoad attr Str CompareEq NameLoad Str CompareEq NameLoad Str body Return Str If Call NameLoad ListLoad Call AttributeLoad NameLoad attr Str CompareEq NameLoad Str CompareEq NameLoad Str body Return Str If Call NameLoad ListLoad Call AttributeLoad NameLoad attr Str body Return Str Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr If CompareIn NameLoad TupleLoad Str Str Str Str body Return Str If CompareIn NameLoad TupleLoad Str Str Str Str body Return Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr If CompareIn NameLoad TupleLoad Str Str Str Str Str body Return Str If CompareIn NameLoad TupleLoad Str Str Str Str Str body Return Str Return Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore CompareEq SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad Assign NameStore CompareEq SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str NameLoad If NameLoad body If BoolOpAnd NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Str Return NameLoad orelse If NameLoad body Assign SubscriptStore NameLoad Index Str Str Return NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad If Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str Str body Expr Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad Str Dict Assign NameStore Call SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad If CompareNotEq NameLoad Str body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str If UnaryOpNot CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Str If CompareEq NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad If SubscriptLoad NameLoad Index Str body Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad If Call SubscriptLoad NameLoad Index Str NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
Management of SELinux rules
===========================

If SELinux is available for the running system, the mode can be managed and
booleans can be set.

.. code-block:: yaml

    enforcing:
        selinux.mode

    samba_create_home_dirs:
        selinux.boolean:
          - value: True
          - persist: True

    nginx:
        selinux.module:
          - enabled: False

.. note::
    Use of these states require that the :mod:`selinux <salt.modules.selinux>`
    execution module is available.
 __virtual__ N/A N/A N/A N/A N/A 
    Only make this state available if the selinux module is available.
     N/A N/A N/A selinux.getenforce __salt__ selinux False N/A _refine_mode N/A N/A mode N/A N/A N/A 
    Return a mode value that is predictable
     N/A mode N/A N/A N/A str mode lower N/A N/A any N/A N/A N/A mode startswith e N/A mode 1 N/A mode on N/A N/A Enforcing N/A N/A any N/A N/A N/A mode startswith p N/A mode 0 N/A mode off N/A N/A Permissive N/A N/A any N/A N/A N/A mode startswith d N/A N/A Disabled N/A unknown N/A _refine_value N/A N/A value N/A N/A N/A 
    Return a yes/no value, or None if the input is invalid
     N/A value N/A N/A N/A str value lower N/A N/A value N/A 1 on yes true N/A N/A on N/A N/A value N/A 0 off no false N/A N/A off N/A None N/A _refine_module_state N/A N/A module_state N/A N/A N/A 
    Return a predictable value, or allow us to error out
    .. versionadded:: 2016.3.0
     N/A module_state N/A N/A N/A str module_state lower N/A N/A module_state N/A 1 on yes true enabled N/A N/A enabled N/A N/A module_state N/A 0 off no false disabled N/A N/A disabled N/A unknown N/A mode N/A N/A name N/A N/A N/A 
    Verifies the mode SELinux is running in, can be set to enforcing,
    permissive, or disabled
        Note: A change to or from disabled mode requires a system reboot.
            You will need to perform this yourself.

    name
        The mode to run SELinux in, permissive, enforcing, or disabled.
     N/A ret N/A name result comment changes name False N/A N/A tmode N/A _refine_mode name N/A N/A tmode unknown N/A N/A N/A ret N/A comment N/A N/A {0} is not an accepted mode format name N/A ret N/A mode N/A N/A __salt__ N/A selinux.getenforce N/A N/A mode tmode N/A N/A N/A ret N/A result True N/A N/A ret N/A comment N/A N/A SELinux is already in {0} mode format tmode N/A ret N/A N/A __opts__ N/A test N/A N/A N/A ret N/A comment N/A N/A SELinux mode is set to be changed to {0} format tmode N/A N/A ret N/A result None N/A ret N/A mode N/A N/A __salt__ N/A selinux.setenforce tmode N/A N/A mode tmode N/A N/A N/A ret N/A result True N/A N/A ret N/A comment N/A N/A SELinux has been set to {0} mode format tmode N/A ret N/A N/A ret N/A comment N/A N/A Failed to set SELinux to {0} mode format tmode N/A ret N/A boolean N/A N/A name value persist N/A False N/A N/A 
    Set up an SELinux boolean

    name
        The name of the boolean to set

    value
        The value to set on the boolean

    persist
        Defaults to False, set persist to true to make the boolean apply on a
        reboot
     N/A ret N/A name result comment changes name True N/A N/A bools N/A N/A __salt__ N/A selinux.list_sebool N/A N/A name bools N/A N/A N/A ret N/A comment N/A N/A Boolean {0} is not available format name N/A N/A ret N/A result False N/A ret N/A rvalue N/A _refine_value value N/A N/A rvalue None N/A N/A N/A ret N/A comment N/A N/A {0} is not a valid value for the boolean format value N/A N/A ret N/A result False N/A ret N/A state N/A N/A N/A bools N/A name N/A State rvalue N/A default N/A N/A N/A bools N/A name N/A Default rvalue N/A persist N/A N/A N/A state default N/A N/A N/A ret N/A comment Boolean is in the correct state N/A ret N/A N/A state N/A N/A N/A ret N/A comment Boolean is in the correct state N/A ret N/A N/A __opts__ N/A test N/A N/A N/A ret N/A result None N/A N/A ret N/A comment N/A N/A Boolean {0} is set to be changed to {1} format name rvalue N/A ret N/A N/A N/A __salt__ N/A selinux.setsebool name rvalue persist N/A N/A N/A ret N/A comment N/A N/A Boolean {0} has been set to {1} format name rvalue N/A ret N/A N/A ret N/A comment N/A N/A Failed to set the boolean {0} to {1} format name rvalue N/A ret N/A module N/A N/A name module_state version N/A Enabled any N/A N/A 
    Enable/Disable and optionally force a specific version for an SELinux module

    name
        The name of the module to control

    module_state
        Should the module be enabled or disabled?

    version
        Defaults to no preference, set to a specified value if required.
        Currently can only alert if the version is incorrect.

    .. versionadded:: 2016.3.0
     N/A ret N/A name result comment changes name True N/A N/A modules N/A N/A __salt__ N/A selinux.list_semod N/A N/A name modules N/A N/A N/A ret N/A comment N/A N/A Module {0} is not available format name N/A N/A ret N/A result False N/A ret N/A rmodule_state N/A _refine_module_state module_state N/A N/A rmodule_state unknown N/A N/A N/A ret N/A comment N/A N/A {0} is not a valid state for the {1} module. format module_state module N/A N/A ret N/A result False N/A ret N/A N/A version any N/A N/A installed_version N/A N/A modules N/A name N/A Version N/A N/A N/A installed_version version N/A N/A N/A ret N/A comment N/A N/A Module version is {0} and does not match the desired version of {1} format installed_version version N/A N/A ret N/A result False N/A ret N/A current_module_state N/A _refine_module_state N/A N/A modules N/A name N/A Enabled N/A N/A rmodule_state current_module_state N/A N/A N/A ret N/A comment N/A N/A Module {0} is in the desired state format name N/A ret N/A N/A __opts__ N/A test N/A N/A N/A ret N/A result None N/A N/A ret N/A comment N/A N/A Module {0} is set to be togggled to {1} format name module_state N/A ret N/A N/A N/A __salt__ N/A selinux.setsemod name rmodule_state N/A N/A N/A ret N/A comment N/A N/A Module {0} has been set to {1} format name module_state N/A ret N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Failed to set the Module {0} to {1} format name module_state N/A ret N/A