??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó
à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
Z d d l
Z
d d l m Z d
„ Z
d „ Z d „ Z d „ Z d „ Z e d k r± e ƒ n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont stableinterfacet statust communityt supported_bysð
---
module: awall
short_description: Manage awall policies
version_added: "2.4"
author: Ted Trask (@tdtrask)
description:
- This modules allows for enable/disable/activate of I(awall) policies.
- Alpine Wall (I(awall)) generates a firewall configuration from the enabled policy files
and activates the configuration on the system.
options:
name:
description:
- One or more policy names.
type: list
state:
description:
- Whether the policies should be enabled or disabled.
type: str
choices: [ disabled, enabled ]
default: enabled
activate:
description:
- Activate the new firewall rules.
- Can be run with other steps or on its own.
type: bool
default: no
s2
- name: Enable "foo" and "bar" policy
awall:
name: [ foo bar ]
state: enabled
- name: Disable "foo" and "bar" policy and activate new rules
awall:
name:
- foo
- bar
state: disabled
activate: no
- name: Activate currently enabled firewall rules
awall:
activate: yes
s # N( t
AnsibleModulec C` sR d t } | j | ƒ \ } } } | d k r2 t S| j d d d | d | ƒ d S( Ns %s activate --forcei t msgs could not activate new rulest stdoutt stderr( t
AWALL_PATHt run_commandt Truet fail_json( t modulet cmdt rcR
R ( ( s@ /usr/lib/python2.7/site-packages/ansible/modules/system/awall.pyt activateE s
c C` sF d t } | j | ƒ \ } } } t j d | | t j ƒ rB t St S( Ns %s lists
^%s\s+enabled( R R
t ret searcht MULTILINER t False( R t nameR R R
R ( ( s@ /usr/lib/python2.7/site-packages/ansible/modules/system/awall.pyt is_policy_enabledN s
c C` s g } x- | D]% } t | | ƒ s
| j | ƒ q
q
W| sU | j d t d d ƒ n d j | ƒ } | j rz d t } n d t | f } | j | ƒ \ } } } | d k rÑ | j d d | d | d
| ƒ n | rî | j rî t | ƒ n | j d t
d d | ƒ d S( Nt changedR s policy(ies) already enabledt s %s lists %s enable %si s failed to enable %sR
R s enabled awall policy(ies): %s( R t appendt exit_jsonR t joint
check_modeR R
R R R ( R t namest actt policiesR R R R
R ( ( s@ /usr/lib/python2.7/site-packages/ansible/modules/system/awall.pyt
enable_policyV s
#
c C` s g } x- | D]% } t | | ƒ r
| j | ƒ q
q
W| sU | j d t d d ƒ n d j | ƒ } | j rz d t } n d t | f } | j | ƒ \ } } } | d k rÑ | j d d | d | d
| ƒ n | rî | j rî t | ƒ n | j d t
d d | ƒ d S( NR R s policy(ies) already disabledR s %s lists
%s disable %si s failed to disable %sR
R s disabled awall policy(ies): %s( R R R R R R R R
R R R ( R R R! R" R R R R
R ( ( s@ /usr/lib/python2.7/site-packages/ansible/modules/system/awall.pyt disable_policyj s
#
c
C` s: t d t d t d d d d d d d g ƒ d t d d
ƒ d t d d d t ƒ ƒ d
d d g g d t ƒ } | j d d t ƒa | j } | d rí | d d k r¿ t | | d | d ƒ qí | d d k rí t | | d | d ƒ qí n | d r&| j s
t
| ƒ n | j d t d d ƒ n | j d d ƒ d S( Nt
argument_spect statet typet strt defaultt enabledt choicest disabledR t listR t boolt required_one_oft supports_check_modet awallt requiredR R s activated awall ruless no action defined(
R t dictR R t get_bin_pathR t paramsR# R$ R R R R ( R t p( ( s@ /usr/lib/python2.7/site-packages/ansible/modules/system/awall.pyt main~ s&