??????????????
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
m Z d d l m
Z
m Z d d
l m Z m Z m Z d d l m Z m 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 previewt statust communityt supported_bysÐ
---
module: asa_acl
version_added: "2.2"
author: "Patrick Ogenstad (@ogenstad)"
short_description: Manage access-lists on a Cisco ASA
description:
- This module allows you to work with access-lists on a Cisco ASA device.
extends_documentation_fragment: asa
options:
lines:
description:
- The ordered set of commands that should be configured in the
section. The commands must be the exact same commands as found
in the device running-config. Be sure to note the configuration
command syntax as some commands are automatically modified by the
device config parser.
required: true
aliases: [commands]
before:
description:
- The ordered set of commands to push on to the command stack if
a change needs to be made. This allows the playbook designer
the opportunity to perform configuration commands prior to pushing
any changes without affecting how the set of commands are matched
against the system.
after:
description:
- The ordered set of commands to append to the end of the command
stack if a changed needs to be made. Just like with I(before) this
allows the playbook designer to append a set of commands to be
executed after the command set.
match:
description:
- Instructs the module on the way to perform the matching of
the set of commands against the current device config. If
match is set to I(line), commands are matched line by line. If
match is set to I(strict), command lines are matched with respect
to position. Finally if match is set to I(exact), command lines
must be an equal match.
default: line
choices: ['line', 'strict', 'exact']
replace:
description:
- Instructs the module on the way to perform the configuration
on the device. If the replace argument is set to I(line) then
the modified lines are pushed to the device in configuration
mode. If the replace argument is set to I(block) then the entire
command block is pushed to the device in configuration mode if any
line is not correct.
default: line
choices: ['line', 'block']
force:
description:
- The force argument instructs the module to not consider the
current devices running-config. When set to true, this will
cause the module to push the contents of I(src) into the device
without first checking if already configured.
type: bool
default: 'no'
config:
description:
- The module, by default, will connect to the remote device and
retrieve the current running-config to use as a base for comparing
against the contents of source. There are times when it is not
desirable to have the task get the current running-config for
every task in a playbook. The I(config) argument allows the
implementer to pass in the configuration to use as the base
config for comparison.
s·
# Note: examples below use the following provider dict to handle
# transport and authentication to the node.
---
vars:
cli:
host: "{{ inventory_hostname }}"
username: cisco
password: cisco
transport: cli
authorize: yes
auth_pass: cisco
---
- asa_acl:
lines:
- access-list ACL-ANSIBLE extended permit tcp any any eq 82
- access-list ACL-ANSIBLE extended permit tcp any any eq www
- access-list ACL-ANSIBLE extended permit tcp any any eq 97
- access-list ACL-ANSIBLE extended permit tcp any any eq 98
- access-list ACL-ANSIBLE extended permit tcp any any eq 99
before: clear configure access-list ACL-ANSIBLE
match: strict
replace: block
provider: "{{ cli }}"
- asa_acl:
lines:
- access-list ACL-OUTSIDE extended permit tcp any any eq www
- access-list ACL-OUTSIDE extended permit tcp any any eq https
context: customer_a
provider: "{{ cli }}"
s¿
updates:
description: The set of commands that will be pushed to the remote device
returned: always
type: list
sample: ['access-list ACL-OUTSIDE extended permit tcp any any eq www']
( t
AnsibleModule( t asa_argument_spect
check_args( t
get_configt load_configt run_commands( t
NetworkConfigt dumpsc C` s„ | j d } | s" t | ƒ } n t ƒ } x: | j d ƒ D]) } | j d | ƒ r; | j | ƒ q; q; Wt d d d d j | ƒ ƒ S( Nt configs
s access-list %s t indenti t contents( t paramsR t listt splitt
startswitht appendR t join( t modulet acl_nameR t filtered_configt item( ( sG /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_acl.pyt get_acl_config† s
c C` sÈ t } x» | j d D]¬ } | j ƒ } | d d k rQ | j d d | d ƒ n t | ƒ d k rv | j d d ƒ n | r‰ | d } n1 | | d k rº | j d d | d | f ƒ n t } q W| S( Nt linesi s access-listt msgsD All lines/commands must begin with "access-list" %s is not permittedi s; All lines/commands must contain the name of the access-lists= All lines/commands must use the same access-list %s is not %s( t TrueR R t fail_jsont lent False( R t
first_linet linet aceR ( ( sG /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_acl.pyt parse_acl_name“ s
!
c
C` s! t d t d d g d t d d ƒ d t d d ƒ d t d d ƒ d t d
d d d d
d g ƒ d t d
d d d d g ƒ d t d
t d d ƒ d t ƒ ƒ } | j t ƒ t d | d t ƒ } | j d } i t d 6} t d d ƒ } | j | ƒ t | ƒ } | j d s€t
| | ƒ } t d d d | ƒ } | j | ƒ } t | d ƒ j
d ƒ } g | D] } | r_t | ƒ ^ q_} n t | ƒ j
d ƒ } | r| j d r¼| j d | d *n | j d rà| j | j d ƒ n | j sùt | | ƒ n t | d