cisco.asa.asa_acl – (deprecated, removed after 2022-06-01) Manage access-lists on a Cisco ASA

Note

This plugin is part of the cisco.asa collection (version 1.0.4).

To install it use: ansible-galaxy collection install cisco.asa.

To use it in a playbook, specify: cisco.asa.asa_acl.

New in version 1.0.0: of cisco.asa

DEPRECATED

Removed in

major release after 2022-06-01

Why

Newer and updated modules released with more functionality in Ansible 2.10

Alternative

asa_acl

Synopsis

  • This module allows you to work with access-lists on a Cisco ASA device.

Note

This module has a corresponding action plugin.

Parameters

Parameter Choices/Defaults Comments
after
list / elements=string
The ordered set of commands to append to the end of the command stack if a changed needs to be made. Just like with before this allows the playbook designer to append a set of commands to be executed after the command set.
authorize
boolean
    Choices:
  • no ←
  • yes
Deprecated
Starting with Ansible 2.5 we recommend using connection: network_cli and become: yes.
For more information please see the Network Guide.

Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_AUTHORIZE will be used instead.
before
list / elements=string
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.
config
string
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 config argument allows the implementer to pass in the configuration to use as the base config for comparison.
context
string
Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.
force
boolean
    Choices:
  • no ←
  • yes
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 src into the device without first checking if already configured.
lines
list / elements=string / required
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.

aliases: commands
match
string
    Choices:
  • line ←
  • strict
  • exact
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 line, commands are matched line by line. If match is set to strict, command lines are matched with respect to position. Finally if match is set to exact, command lines must be an equal match.
passwords
boolean
    Choices:
  • no
  • yes
Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to.
provider
dictionary
Deprecated
Starting with Ansible 2.5 we recommend using connection: network_cli.
For more information please see the Network Guide.

A dict object containing connection details.
auth_pass
string
Specifies the password to use if required to enter privileged mode on the remote device. If authorize is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_AUTH_PASS will be used instead.
authorize
boolean
    Choices:
  • no ←
  • yes
Instructs the module to enter privileged mode on the remote device before sending any commands. If not specified, the device will attempt to execute all commands in non-privileged mode. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_AUTHORIZE will be used instead.
host
string
Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport.
password
string
Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_PASSWORD will be used instead.
port
integer
Specifies the port to use when building the connection to the remote device.
ssh_keyfile
path
Specifies the SSH key to use to authenticate the connection to the remote device. This value is the path to the key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_SSH_KEYFILE will be used instead.
timeout
integer
Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations.
username
string
Configures the username to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable ANSIBLE_NET_USERNAME will be used instead.
replace
string
    Choices:
  • line ←
  • block
Instructs the module on the way to perform the configuration on the device. If the replace argument is set to line then the modified lines are pushed to the device in configuration mode. If the replace argument is set to block then the entire command block is pushed to the device in configuration mode if any line is not correct.

Notes

Note

Examples

- cisco.asa.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 }}'

- cisco.asa.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 }}'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
updates
list / elements=string
always
The set of commands that will be pushed to the remote device

Sample:
['access-list ACL-OUTSIDE extended permit tcp any any eq www']


Status

  • This module will be removed in a major release after 2022-06-01. [deprecated]

  • For more information see DEPRECATED.

Authors

  • Patrick Ogenstad (@ogenstad)