�
�Udac @` s� d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d d
l Z e
Z d
Z
y d d
l Z e Z Wn e k
r� e j � Z
n Xd d l m Z m Z d d l m Z d
� Z e d k r� e � n d
S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys�
---
module: selinux_permissive
short_description: Change permissive domain in SELinux policy
description:
- Add and remove a domain from the list of permissive domains.
version_added: "2.0"
options:
domain:
description:
- The domain that will be added or removed from the list of permissive domains.
type: str
required: true
default: ''
aliases: [ name ]
permissive:
description:
- Indicate if the domain should or should not be set as permissive.
type: bool
required: true
no_reload:
description:
- Disable reloading of the SELinux policy after making change to a domain's permissive setting.
- The default is C(no), which causes policy to be reloaded when a domain changes state.
- Reloading the policy does not work on older versions of the C(policycoreutils-python) library, for example in EL 6."
type: bool
default: no
store:
description:
- Name of the SELinux policy store to use.
type: str
notes:
- Requires a recent version of SELinux and C(policycoreutils-python) (EL 6 or newer).
requirements: [ policycoreutils-python ]
author:
- Michael Scherer (@mscherer) <[email protected]>
sn
- name: Change the httpd_t domain to permissive
selinux_permissive:
name: httpd_t
permissive: true
N( t
AnsibleModulet missing_required_lib( t to_nativec C` s� t d t d t d d d t d d g � d t d d d d
� d t d d d t � d
t d d d t � � d t � } t } | j d } | j d } | j d } | j d
} t s� | j d t d t d � d t � n y t j
| � } Wn; t k
r*} | j d | d t | � d t
j � � n Xd t | � k rN| j | � n y | j � } Wn; t k
r�} | j d | d t | � d t
j � � n X| r| | k r�| j s y | j | � Wq t k
r} | j d | d t | � d t
j � � q Xn t } q�np | | k r�| j s|y | j | � Wq|t k
rx} | j d | d t | � d t
j � � q|Xn t } n | j d | d | d | d | � d S( Nt
argument_spect domaint typet strt requiredt aliasest namet storet defaultt t
permissivet boolt no_reloadt supports_check_modet changedt msgs policycoreutils-pythont exceptiont
set_reload( R t dictt Truet Falset paramst
HAVE_SEOBJECTt fail_jsonR t SEOBJECT_IMP_ERRt seobjectt permissiveRecordst
ValueErrorR
t tracebackt
format_exct dirR t get_allt
check_modet addt deletet exit_json( t moduleR R R R R t permissive_domainst et all_domains( ( sM /usr/lib/python2.7/site-packages/ansible/modules/system/selinux_permissive.pyt mainJ sT
,, / / t __main__( t
__future__R R R R
t
__metaclass__t ANSIBLE_METADATAt
DOCUMENTATIONt EXAMPLESR'