From a395a4e018b02d1065aa9d1de03c09bb373c2462 Mon Sep 17 00:00:00 2001 From: rohitthakur2590 Date: Mon, 30 Oct 2023 18:27:27 +0530 Subject: [PATCH] Ansible-lint error fixtures Signed-off-by: rohitthakur2590 --- changelogs/fragments/lint_fixtures.yaml | 3 + docs/cisco.asa.asa_acls_module.rst | 278 +++++++++++------------ docs/cisco.asa.asa_command_module.rst | 10 +- docs/cisco.asa.asa_config_module.rst | 40 ++-- docs/cisco.asa.asa_facts_module.rst | 4 +- docs/cisco.asa.asa_ogs_module.rst | 128 +++++------ plugins/modules/asa_acls.py | 279 ++++++++++++------------ plugins/modules/asa_command.py | 10 +- plugins/modules/asa_config.py | 40 ++-- plugins/modules/asa_facts.py | 4 +- plugins/modules/asa_ogs.py | 129 ++++++----- 11 files changed, 463 insertions(+), 462 deletions(-) create mode 100644 changelogs/fragments/lint_fixtures.yaml diff --git a/changelogs/fragments/lint_fixtures.yaml b/changelogs/fragments/lint_fixtures.yaml new file mode 100644 index 00000000..d55abedd --- /dev/null +++ b/changelogs/fragments/lint_fixtures.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - Fix ansible-lint errors. diff --git a/docs/cisco.asa.asa_acls_module.rst b/docs/cisco.asa.asa_acls_module.rst index d991daa6..8fb386c7 100644 --- a/docs/cisco.asa.asa_acls_module.rst +++ b/docs/cisco.asa.asa_acls_module.rst @@ -2416,85 +2416,85 @@ Examples - name: temp_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.2.0 - netmask: 255.255.255.0 - destination: - address: 198.51.100.0 - netmask: 255.255.255.0 - port_protocol: - eq: www - log: default - - grant: deny - line: 2 - protocol_options: - igrp: true - source: - address: 198.51.100.0 - netmask: 255.255.255.0 - destination: - address: 198.51.110.0 - netmask: 255.255.255.0 - time_range: temp - - grant: deny - line: 3 - protocol_options: - tcp: true - source: - interface: management - destination: - interface: management - port_protocol: - eq: www - log: warnings - - grant: deny - line: 4 - protocol_options: - tcp: true - source: - object_group: test_og_network - destination: - object_group: test_network_og - port_protocol: - eq: www - log: default + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.2.0 + netmask: 255.255.255.0 + destination: + address: 198.51.100.0 + netmask: 255.255.255.0 + port_protocol: + eq: www + log: default + - grant: deny + line: 2 + protocol_options: + igrp: true + source: + address: 198.51.100.0 + netmask: 255.255.255.0 + destination: + address: 198.51.110.0 + netmask: 255.255.255.0 + time_range: temp + - grant: deny + line: 3 + protocol_options: + tcp: true + source: + interface: management + destination: + interface: management + port_protocol: + eq: www + log: warnings + - grant: deny + line: 4 + protocol_options: + tcp: true + source: + object_group: test_og_network + destination: + object_group: test_network_og + port_protocol: + eq: www + log: default - name: global_access acl_type: extended aces: - - line: 3 - remark: test global access - - grant: deny - line: 4 - protocol_options: - tcp: true - source: - any: true - destination: - any: true - port_protocol: - eq: www - log: errors + - line: 3 + remark: test global access + - grant: deny + line: 4 + protocol_options: + tcp: true + source: + any: true + destination: + any: true + port_protocol: + eq: www + log: errors - name: R1_traffic aces: - - line: 1 - remark: test_v6_acls - - grant: deny - line: 2 - protocol_options: - tcp: true - source: - address: 2001:db8:0:3::/64 - port_protocol: - eq: www - destination: - address: 2001:fc8:0:4::/64 - port_protocol: - eq: telnet - inactive: true + - line: 1 + remark: test_v6_acls + - grant: deny + line: 2 + protocol_options: + tcp: true + source: + address: 2001:db8:0:3::/64 + port_protocol: + eq: www + destination: + address: 2001:fc8:0:4::/64 + port_protocol: + eq: telnet + inactive: true state: merged # Commands fired: @@ -2617,20 +2617,20 @@ Examples - name: global_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.4.0 - netmask: 255.255.255.0 - port_protocol: - eq: telnet - destination: - address: 192.0.5.0 - netmask: 255.255.255.0 - port_protocol: - eq: www + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.4.0 + netmask: 255.255.255.0 + port_protocol: + eq: telnet + destination: + address: 192.0.5.0 + netmask: 255.255.255.0 + port_protocol: + eq: www state: replaced # Commands fired: @@ -2695,20 +2695,20 @@ Examples - name: global_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.4.0 - netmask: 255.255.255.0 - port_protocol: - eq: telnet - destination: - address: 192.0.5.0 - netmask: 255.255.255.0 - port_protocol: - eq: www + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.4.0 + netmask: 255.255.255.0 + port_protocol: + eq: telnet + destination: + address: 192.0.5.0 + netmask: 255.255.255.0 + port_protocol: + eq: www state: overridden # Commands fired: @@ -2789,7 +2789,7 @@ Examples # inactive (hitcnt=0) (inactive) 0xe922b432 # Using Deleted without any config passed - #"(NOTE: This will delete all of configured resource module attributes)" + # "(NOTE: This will delete all of configured resource module attributes)" # Before state: # ------------- @@ -3011,44 +3011,44 @@ Examples - name: temp_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.2.0 - netmask: 255.255.255.0 - destination: - address: 198.51.100.0 - netmask: 255.255.255.0 - port_protocol: - eq: www - log: default - - grant: deny - line: 2 - protocol_options: - igrp: true - source: - address: 198.51.100.0 - netmask: 255.255.255.0 - destination: - address: 198.51.110.0 - netmask: 255.255.255.0 - time_range: temp + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.2.0 + netmask: 255.255.255.0 + destination: + address: 198.51.100.0 + netmask: 255.255.255.0 + port_protocol: + eq: www + log: default + - grant: deny + line: 2 + protocol_options: + igrp: true + source: + address: 198.51.100.0 + netmask: 255.255.255.0 + destination: + address: 198.51.110.0 + netmask: 255.255.255.0 + time_range: temp - name: R1_traffic aces: - - grant: deny - protocol_options: - tcp: true - source: - address: 2001:db8:0:3::/64 - port_protocol: - eq: www - destination: - address: 2001:fc8:0:4::/64 - port_protocol: - eq: telnet - inactive: true + - grant: deny + protocol_options: + tcp: true + source: + address: 2001:db8:0:3::/64 + port_protocol: + eq: www + destination: + address: 2001:fc8:0:4::/64 + port_protocol: + eq: telnet + inactive: true state: rendered # Module Execution Result: diff --git a/docs/cisco.asa.asa_command_module.rst b/docs/cisco.asa.asa_command_module.rst index 41642641..b8a92091 100644 --- a/docs/cisco.asa.asa_command_module.rst +++ b/docs/cisco.asa.asa_command_module.rst @@ -173,20 +173,20 @@ Examples - name: Show the ASA version cisco.asa.asa_command: commands: - - show version + - show version - name: Show ASA drops and memory cisco.asa.asa_command: commands: - - show asp drop - - show memory + - show asp drop + - show memory - name: Send repeat pings and wait for the result to pass 100% cisco.asa.asa_command: commands: - - ping 8.8.8.8 repeat 20 size 350 + - ping 8.8.8.8 repeat 20 size 350 wait_for: - - result[0] contains 100 + - result[0] contains 100 retries: 2 diff --git a/docs/cisco.asa.asa_config_module.rst b/docs/cisco.asa.asa_config_module.rst index 3933190d..c3a2ed10 100644 --- a/docs/cisco.asa.asa_config_module.rst +++ b/docs/cisco.asa.asa_config_module.rst @@ -348,16 +348,16 @@ Examples - cisco.asa.asa_config: lines: - - network-object host 10.80.30.18 - - network-object host 10.80.30.19 - - network-object host 10.80.30.20 + - network-object host 10.80.30.18 + - network-object host 10.80.30.19 + - network-object host 10.80.30.20 parents: [object-group network OG-MONITORED-SERVERS] - cisco.asa.asa_config: host: '{{ inventory_hostname }}' lines: - - message-length maximum client auto - - message-length maximum 512 + - message-length maximum client auto + - message-length maximum 512 match: line parents: [policy-map type inspect dns PM-DNS, parameters] authorize: yes @@ -368,42 +368,42 @@ Examples - cisco.asa.asa_config: lines: - - ikev1 pre-shared-key MyS3cretVPNK3y + - ikev1 pre-shared-key MyS3cretVPNK3y parents: tunnel-group 1.1.1.1 ipsec-attributes passwords: yes - name: attach ASA acl on interface vlan13/nameif cloud13 cisco.asa.asa_config: lines: - - access-group cloud-acl_access_in in interface cloud13 + - access-group cloud-acl_access_in in interface cloud13 - name: configure ASA (>=9.2) default BGP cisco.asa.asa_config: lines: - - bgp log-neighbor-changes - - bgp bestpath compare-routerid + - bgp log-neighbor-changes + - bgp bestpath compare-routerid parents: - - router bgp 65002 + - router bgp 65002 register: bgp when: bgp_default_config is defined - name: configure ASA (>=9.2) BGP neighbor in default/single context mode cisco.asa.asa_config: lines: - - bgp router-id {{ bgp_router_id }} - - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }} - - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }} + - bgp router-id {{ bgp_router_id }} + - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }} + - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }} parents: - - router bgp 65002 - - address-family ipv4 unicast + - router bgp 65002 + - address-family ipv4 unicast register: bgp when: bgp_neighbor_as is defined - name: configure ASA interface with standby cisco.asa.asa_config: lines: - - description my cloud interface - - nameif cloud13 - - security-level 50 - - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2 + - description my cloud interface + - nameif cloud13 + - security-level 50 + - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2 parents: [interface Vlan13] register: interface - name: Show changes to interface from task above @@ -413,7 +413,7 @@ Examples - name: configurable backup path cisco.asa.asa_config: lines: - - access-group cloud-acl_access_in in interface cloud13 + - access-group cloud-acl_access_in in interface cloud13 backup: yes backup_options: filename: backup.cfg diff --git a/docs/cisco.asa.asa_facts_module.rst b/docs/cisco.asa.asa_facts_module.rst index 345c2e22..e6750767 100644 --- a/docs/cisco.asa.asa_facts_module.rst +++ b/docs/cisco.asa.asa_facts_module.rst @@ -129,12 +129,12 @@ Examples - name: Gather only the config and default facts cisco.asa.asa_facts: gather_subset: - - config + - config - name: Do not gather hardware facts cisco.asa.asa_facts: gather_subset: - - '!hardware' + - '!hardware' - name: Gather legacy and resource facts cisco.asa.asa_facts: diff --git a/docs/cisco.asa.asa_ogs_module.rst b/docs/cisco.asa.asa_ogs_module.rst index 80a46332..1d07f3ec 100644 --- a/docs/cisco.asa.asa_ogs_module.rst +++ b/docs/cisco.asa.asa_ogs_module.rst @@ -1163,70 +1163,70 @@ Examples - name: "Merge module attributes of given object-group" cisco.asa.asa_ogs: config: - - object_type: network - object_groups: - - name: group_network_obj - group_object: - - test_og_network - - name: test_og_network - description: test_og_network - network_object: - host: - - 192.0.2.1 - - 192.0.2.2 - address: - - 192.0.2.0 255.255.255.0 - - 198.51.100.0 255.255.255.0 - - name: test_network_og - description: test_network_og - network_object: - host: - - 198.51.100.1 - - 198.51.100.2 - ipv6_address: - - 2001:db8:3::/64 - - object_type: security - object_groups: - - name: test_og_security - description: test_security - security_group: - sec_name: - - test_1 - - test_2 - tag: - - 10 - - 20 - - object_type: service - object_groups: - - name: O-Worker - services_object: - - protocol: tcp - destination_port: - range: + - object_type: network + object_groups: + - name: group_network_obj + group_object: + - test_og_network + - name: test_og_network + description: test_og_network + network_object: + host: + - 192.0.2.1 + - 192.0.2.2 + address: + - 192.0.2.0 255.255.255.0 + - 198.51.100.0 255.255.255.0 + - name: test_network_og + description: test_network_og + network_object: + host: + - 198.51.100.1 + - 198.51.100.2 + ipv6_address: + - 2001:db8:3::/64 + - object_type: security + object_groups: + - name: test_og_security + description: test_security + security_group: + sec_name: + - test_1 + - test_2 + tag: + - 10 + - 20 + - object_type: service + object_groups: + - name: O-Worker + services_object: + - protocol: tcp + destination_port: + range: + start: 100 + end: 200 + - protocol: tcp-udp + source_port: + eq: 1234 + destination_port: + gt: nfs + - name: O-UNIX-TCP + protocol: tcp + port_object: + - eq: https + - range: start: 100 - end: 200 - - protocol: tcp-udp - source_port: - eq: 1234 - destination_port: - gt: nfs - - name: O-UNIX-TCP - protocol: tcp - port_object: - - eq: https - - range: - start: 100 - end: 400 - - object_type: user - object_groups: - - name: test_og_user - description: test_user - user_object: - user: - - name: new_user_1 - domain: LOCAL - - name: new_user_2 - domain: LOCAL + end: 400 + - object_type: user + object_groups: + - name: test_og_user + description: test_user + user_object: + user: + - name: new_user_1 + domain: LOCAL + - name: new_user_2 + domain: LOCAL state: merged # Commands fired: @@ -1566,7 +1566,7 @@ Examples # service-object tcp source eq 1234 destination gt nfs # Using DELETED without any config passed - #"(NOTE: This will delete all of configured resource module attributes)" + # "(NOTE: This will delete all of configured resource module attributes)" # Before state: # ------------- diff --git a/plugins/modules/asa_acls.py b/plugins/modules/asa_acls.py index 701af955..38fc89d1 100644 --- a/plugins/modules/asa_acls.py +++ b/plugins/modules/asa_acls.py @@ -460,85 +460,85 @@ - name: temp_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.2.0 - netmask: 255.255.255.0 - destination: - address: 198.51.100.0 - netmask: 255.255.255.0 - port_protocol: - eq: www - log: default - - grant: deny - line: 2 - protocol_options: - igrp: true - source: - address: 198.51.100.0 - netmask: 255.255.255.0 - destination: - address: 198.51.110.0 - netmask: 255.255.255.0 - time_range: temp - - grant: deny - line: 3 - protocol_options: - tcp: true - source: - interface: management - destination: - interface: management - port_protocol: - eq: www - log: warnings - - grant: deny - line: 4 - protocol_options: - tcp: true - source: - object_group: test_og_network - destination: - object_group: test_network_og - port_protocol: - eq: www - log: default + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.2.0 + netmask: 255.255.255.0 + destination: + address: 198.51.100.0 + netmask: 255.255.255.0 + port_protocol: + eq: www + log: default + - grant: deny + line: 2 + protocol_options: + igrp: true + source: + address: 198.51.100.0 + netmask: 255.255.255.0 + destination: + address: 198.51.110.0 + netmask: 255.255.255.0 + time_range: temp + - grant: deny + line: 3 + protocol_options: + tcp: true + source: + interface: management + destination: + interface: management + port_protocol: + eq: www + log: warnings + - grant: deny + line: 4 + protocol_options: + tcp: true + source: + object_group: test_og_network + destination: + object_group: test_network_og + port_protocol: + eq: www + log: default - name: global_access acl_type: extended aces: - - line: 3 - remark: test global access - - grant: deny - line: 4 - protocol_options: - tcp: true - source: - any: true - destination: - any: true - port_protocol: - eq: www - log: errors + - line: 3 + remark: test global access + - grant: deny + line: 4 + protocol_options: + tcp: true + source: + any: true + destination: + any: true + port_protocol: + eq: www + log: errors - name: R1_traffic aces: - - line: 1 - remark: test_v6_acls - - grant: deny - line: 2 - protocol_options: - tcp: true - source: - address: 2001:db8:0:3::/64 - port_protocol: - eq: www - destination: - address: 2001:fc8:0:4::/64 - port_protocol: - eq: telnet - inactive: true + - line: 1 + remark: test_v6_acls + - grant: deny + line: 2 + protocol_options: + tcp: true + source: + address: 2001:db8:0:3::/64 + port_protocol: + eq: www + destination: + address: 2001:fc8:0:4::/64 + port_protocol: + eq: telnet + inactive: true state: merged # Commands fired: @@ -661,20 +661,20 @@ - name: global_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.4.0 - netmask: 255.255.255.0 - port_protocol: - eq: telnet - destination: - address: 192.0.5.0 - netmask: 255.255.255.0 - port_protocol: - eq: www + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.4.0 + netmask: 255.255.255.0 + port_protocol: + eq: telnet + destination: + address: 192.0.5.0 + netmask: 255.255.255.0 + port_protocol: + eq: www state: replaced # Commands fired: @@ -739,20 +739,20 @@ - name: global_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.4.0 - netmask: 255.255.255.0 - port_protocol: - eq: telnet - destination: - address: 192.0.5.0 - netmask: 255.255.255.0 - port_protocol: - eq: www + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.4.0 + netmask: 255.255.255.0 + port_protocol: + eq: telnet + destination: + address: 192.0.5.0 + netmask: 255.255.255.0 + port_protocol: + eq: www state: overridden # Commands fired: @@ -833,7 +833,7 @@ # inactive (hitcnt=0) (inactive) 0xe922b432 # Using Deleted without any config passed -#"(NOTE: This will delete all of configured resource module attributes)" +# "(NOTE: This will delete all of configured resource module attributes)" # Before state: # ------------- @@ -1055,44 +1055,44 @@ - name: temp_access acl_type: extended aces: - - grant: deny - line: 1 - protocol_options: - tcp: true - source: - address: 192.0.2.0 - netmask: 255.255.255.0 - destination: - address: 198.51.100.0 - netmask: 255.255.255.0 - port_protocol: - eq: www - log: default - - grant: deny - line: 2 - protocol_options: - igrp: true - source: - address: 198.51.100.0 - netmask: 255.255.255.0 - destination: - address: 198.51.110.0 - netmask: 255.255.255.0 - time_range: temp + - grant: deny + line: 1 + protocol_options: + tcp: true + source: + address: 192.0.2.0 + netmask: 255.255.255.0 + destination: + address: 198.51.100.0 + netmask: 255.255.255.0 + port_protocol: + eq: www + log: default + - grant: deny + line: 2 + protocol_options: + igrp: true + source: + address: 198.51.100.0 + netmask: 255.255.255.0 + destination: + address: 198.51.110.0 + netmask: 255.255.255.0 + time_range: temp - name: R1_traffic aces: - - grant: deny - protocol_options: - tcp: true - source: - address: 2001:db8:0:3::/64 - port_protocol: - eq: www - destination: - address: 2001:fc8:0:4::/64 - port_protocol: - eq: telnet - inactive: true + - grant: deny + protocol_options: + tcp: true + source: + address: 2001:db8:0:3::/64 + port_protocol: + eq: www + destination: + address: 2001:fc8:0:4::/64 + port_protocol: + eq: telnet + inactive: true state: rendered # Module Execution Result: @@ -1203,7 +1203,6 @@ # ] # } # ] - """ RETURN = """ diff --git a/plugins/modules/asa_command.py b/plugins/modules/asa_command.py index 51a6c74b..4191a9d3 100644 --- a/plugins/modules/asa_command.py +++ b/plugins/modules/asa_command.py @@ -78,20 +78,20 @@ - name: Show the ASA version cisco.asa.asa_command: commands: - - show version + - show version - name: Show ASA drops and memory cisco.asa.asa_command: commands: - - show asp drop - - show memory + - show asp drop + - show memory - name: Send repeat pings and wait for the result to pass 100% cisco.asa.asa_command: commands: - - ping 8.8.8.8 repeat 20 size 350 + - ping 8.8.8.8 repeat 20 size 350 wait_for: - - result[0] contains 100 + - result[0] contains 100 retries: 2 """ diff --git a/plugins/modules/asa_config.py b/plugins/modules/asa_config.py index 76a8ca26..793844f8 100644 --- a/plugins/modules/asa_config.py +++ b/plugins/modules/asa_config.py @@ -170,16 +170,16 @@ EXAMPLES = """ - cisco.asa.asa_config: lines: - - network-object host 10.80.30.18 - - network-object host 10.80.30.19 - - network-object host 10.80.30.20 + - network-object host 10.80.30.18 + - network-object host 10.80.30.19 + - network-object host 10.80.30.20 parents: [object-group network OG-MONITORED-SERVERS] - cisco.asa.asa_config: host: '{{ inventory_hostname }}' lines: - - message-length maximum client auto - - message-length maximum 512 + - message-length maximum client auto + - message-length maximum 512 match: line parents: [policy-map type inspect dns PM-DNS, parameters] authorize: yes @@ -190,42 +190,42 @@ - cisco.asa.asa_config: lines: - - ikev1 pre-shared-key MyS3cretVPNK3y + - ikev1 pre-shared-key MyS3cretVPNK3y parents: tunnel-group 1.1.1.1 ipsec-attributes passwords: yes - name: attach ASA acl on interface vlan13/nameif cloud13 cisco.asa.asa_config: lines: - - access-group cloud-acl_access_in in interface cloud13 + - access-group cloud-acl_access_in in interface cloud13 - name: configure ASA (>=9.2) default BGP cisco.asa.asa_config: lines: - - bgp log-neighbor-changes - - bgp bestpath compare-routerid + - bgp log-neighbor-changes + - bgp bestpath compare-routerid parents: - - router bgp 65002 + - router bgp 65002 register: bgp when: bgp_default_config is defined - name: configure ASA (>=9.2) BGP neighbor in default/single context mode cisco.asa.asa_config: lines: - - bgp router-id {{ bgp_router_id }} - - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }} - - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }} + - bgp router-id {{ bgp_router_id }} + - neighbor {{ bgp_neighbor_ip }} remote-as {{ bgp_neighbor_as }} + - neighbor {{ bgp_neighbor_ip }} description {{ bgp_neighbor_name }} parents: - - router bgp 65002 - - address-family ipv4 unicast + - router bgp 65002 + - address-family ipv4 unicast register: bgp when: bgp_neighbor_as is defined - name: configure ASA interface with standby cisco.asa.asa_config: lines: - - description my cloud interface - - nameif cloud13 - - security-level 50 - - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2 + - description my cloud interface + - nameif cloud13 + - security-level 50 + - ip address 192.168.13.1 255.255.255.0 standby 192.168.13.2 parents: [interface Vlan13] register: interface - name: Show changes to interface from task above @@ -235,7 +235,7 @@ - name: configurable backup path cisco.asa.asa_config: lines: - - access-group cloud-acl_access_in in interface cloud13 + - access-group cloud-acl_access_in in interface cloud13 backup: yes backup_options: filename: backup.cfg diff --git a/plugins/modules/asa_facts.py b/plugins/modules/asa_facts.py index cec957e9..a0585260 100644 --- a/plugins/modules/asa_facts.py +++ b/plugins/modules/asa_facts.py @@ -70,12 +70,12 @@ - name: Gather only the config and default facts cisco.asa.asa_facts: gather_subset: - - config + - config - name: Do not gather hardware facts cisco.asa.asa_facts: gather_subset: - - '!hardware' + - '!hardware' - name: Gather legacy and resource facts cisco.asa.asa_facts: diff --git a/plugins/modules/asa_ogs.py b/plugins/modules/asa_ogs.py index c9b7a409..80ee453c 100644 --- a/plugins/modules/asa_ogs.py +++ b/plugins/modules/asa_ogs.py @@ -308,70 +308,70 @@ - name: "Merge module attributes of given object-group" cisco.asa.asa_ogs: config: - - object_type: network - object_groups: - - name: group_network_obj - group_object: - - test_og_network - - name: test_og_network - description: test_og_network - network_object: - host: - - 192.0.2.1 - - 192.0.2.2 - address: - - 192.0.2.0 255.255.255.0 - - 198.51.100.0 255.255.255.0 - - name: test_network_og - description: test_network_og - network_object: - host: - - 198.51.100.1 - - 198.51.100.2 - ipv6_address: - - 2001:db8:3::/64 - - object_type: security - object_groups: - - name: test_og_security - description: test_security - security_group: - sec_name: - - test_1 - - test_2 - tag: - - 10 - - 20 - - object_type: service - object_groups: - - name: O-Worker - services_object: - - protocol: tcp - destination_port: - range: + - object_type: network + object_groups: + - name: group_network_obj + group_object: + - test_og_network + - name: test_og_network + description: test_og_network + network_object: + host: + - 192.0.2.1 + - 192.0.2.2 + address: + - 192.0.2.0 255.255.255.0 + - 198.51.100.0 255.255.255.0 + - name: test_network_og + description: test_network_og + network_object: + host: + - 198.51.100.1 + - 198.51.100.2 + ipv6_address: + - 2001:db8:3::/64 + - object_type: security + object_groups: + - name: test_og_security + description: test_security + security_group: + sec_name: + - test_1 + - test_2 + tag: + - 10 + - 20 + - object_type: service + object_groups: + - name: O-Worker + services_object: + - protocol: tcp + destination_port: + range: + start: 100 + end: 200 + - protocol: tcp-udp + source_port: + eq: 1234 + destination_port: + gt: nfs + - name: O-UNIX-TCP + protocol: tcp + port_object: + - eq: https + - range: start: 100 - end: 200 - - protocol: tcp-udp - source_port: - eq: 1234 - destination_port: - gt: nfs - - name: O-UNIX-TCP - protocol: tcp - port_object: - - eq: https - - range: - start: 100 - end: 400 - - object_type: user - object_groups: - - name: test_og_user - description: test_user - user_object: - user: - - name: new_user_1 - domain: LOCAL - - name: new_user_2 - domain: LOCAL + end: 400 + - object_type: user + object_groups: + - name: test_og_user + description: test_user + user_object: + user: + - name: new_user_1 + domain: LOCAL + - name: new_user_2 + domain: LOCAL state: merged # Commands fired: @@ -711,7 +711,7 @@ # service-object tcp source eq 1234 destination gt nfs # Using DELETED without any config passed -#"(NOTE: This will delete all of configured resource module attributes)" +# "(NOTE: This will delete all of configured resource module attributes)" # Before state: # ------------- @@ -1019,7 +1019,6 @@ # "object_type": "service" # } # ] - """ RETURN = """