??????????????
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 Z d d l m
Z
d d
l m Z d d l m Z m Z m Z d d l m Z m Z d d d „ ƒ YZ d „ Z d „ 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 previewt statust communityt supported_bys
---
module: asa_og
version_added: "2.8"
author:
- "Federico Olivieri (@Federico87)"
short_description: Manage object groups on a Cisco ASA
description:
- This module allows you to create and update object-group network/service on Cisco ASA device.
options:
name:
description:
- Name of the object group.
required: true
group_type:
description:
- The object group type.
choices: ['network-object', 'service-object', 'port-object']
required: true
protocol:
description:
- The protocol for object-group service with port-object.
choices: ['udp', 'tcp', 'tcp-udp']
host_ip:
description:
- The host IP address for object-group network.
type: list
description:
description:
- The description for the object-group.
group_object:
description:
- The group-object for network object-group.
type: list
ip_mask:
description:
- The IP address and mask for network object-group.
type: list
port_range:
description:
- The port range for port-object.
port_eq:
description:
- The single port for port-object.
service_cfg:
description:
- The service-object configuration protocol, direction, range or port.
state:
description:
- Manage the state of the resource.
default: present
choices: ['present', 'absent', 'replace']
s”
---
- name: configure network object-group
asa_og:
name: ansible_test_0
group_type: network-object
state: present
description: ansible_test object-group description
host_ip:
- 8.8.8.8
- 8.8.4.4
ip_mask:
- 10.0.0.0 255.255.255.0
- 192.168.0.0 255.255.0.0
group_object:
- awx_lon
- awx_ams
- name: configure port-object object-group
asa_og:
name: ansible_test_1
group_type: port-object
state: replace
description: ansible_test object-group description
protocol: tcp-udp
port_eq:
- 1025
- kerberos
port_range:
- 1025 5201
- 0 1024
- name: configure service-object object-group
asa_og:
name: ansible_test_2
group_type: service-object
state: absent
description: ansible_test object-group description
service_cfg:
- tcp destination eq 8080
- tcp destination eq www
sÒ
commands:
description: command sent to the device
returned: always
type: list
sample: [
"object-group network ansible_test_0",
"description ansible_test object-group description",
"network-object host 8.8.8.8",
"network-object host 8.8.4.4",
"network-object 10.0.0.0 255.255.255.0",
"network-object 192.168.0.0 255.255.0.0",
"network-object 192.168.0.0 255.255.0.0",
"group-object awx_lon",
"group-object awx_ams",
]
N( t
AnsibleModule( t
check_args( t
get_configt load_configt run_commands( t
NetworkConfigt dumpst Parserc B` s_ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z
d „ Z RS(
s Regex class for outputs parsingc C` s | | _ | | _ d S( s Parser __init__ methodN( t configt protocol( t selfR R ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt __init__Œ s c C` sÈ t ƒ } t j d | j t j ƒ } | rÄ | j d ƒ rX | j t | j d ƒ ƒ ƒ n
| j t ƒ | j d ƒ r“ | j t | j d ƒ ƒ ƒ n | j d ƒ rÄ | j t | j d ƒ ƒ ƒ qÄ n | S( NsA (?:object-group\s)(network\s|service\s)(\w+)\s?(tcp-udp|tcp|udp)?i i i ( t listt ret searchR t Mt groupt appendt strt False( R t list_returnt match( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt parse_obj_grp_name‘ s
"c C` s8 t j d | j t j ƒ } | r4 | j d ƒ } | Sd S( Ns (description\s)(.*)i ( R R R R R ( R R t description( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt parse_description£ s c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns (host\s)(\d+\.\d+\.\d+\.\d+)i ( R R t findallR R R R ( R R R t i( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt
parse_hostª s
!c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns (group-object\s)(.*)i ( R R R! R R R R ( R R R R" ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt parse_group_objectµ s
!c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns: (network-object\s)(\d+\.\d+\.\d+\.\d+\s\d+\.\d+\.\d+\.\d+)i ( R R R! R R R R ( R R R R" ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt
parse_addressÀ s
!c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns
(range\s)(.*)i ( R R R! R R R R ( R R R R" ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt parse_port_rangeË s
!c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns
(eq\s)(.*)i ( R R R! R R R R ( R R R R" ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt
parse_port_eqÖ s
!c C` sf t ƒ } t j d | j t j ƒ } | rb x5 | D]* } | d r1 | j t | d ƒ ƒ q1 q1 Wn | S( Ns (service-object\s)(.*)i ( R R R! R R R R ( R R R R" ( ( sF /usr/lib/python2.7/site-packages/ansible/modules/network/asa/asa_og.pyt parse_service_cfgá s
!( t __name__t
__module__t __doc__R R R R# R$ R% R&