Note
This plugin is part of the dellemc.enterprise_sonic collection (version 1.1.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.enterprise_sonic
.
To use it in a playbook, specify: dellemc.enterprise_sonic.sonic_tacacs_server
.
New in version 1.1.0: of dellemc.enterprise_sonic
Note
This module has a corresponding action plugin.
Parameter | Choices/Defaults | Comments | |||
---|---|---|---|---|---|
config dictionary | Specifies the tacacs server related configuration. | ||||
auth_type string |
| Specifies the authentication type of the tacacs server. | |||
key string | Specifies the key of the tacacs server. | ||||
servers dictionary | Specifies the servers list of the tacacs server. | ||||
host list / elements=dictionary | Specifies the host details of the tacacs servers list. | ||||
auth_type string |
| Specifies the authentication type of the tacacs server host. | |||
key string | Specifies the key of the tacacs server host. | ||||
name string | Specifies the name of the tacacs server host. | ||||
port integer | Default: 49 | Specifies the port of the tacacs server host. | |||
priority integer | Default: 1 | Specifies the priority of the tacacs server host. | |||
timeout integer | Default: 5 | Specifies the timeout of the tacacs server host. | |||
vrf string | Default: "default" | Specifies the vrf of the tacacs server host. | |||
source_interface string | Specifies the source interface of the tacacs server. | ||||
timeout integer | Specifies the timeout of the tacacs server. | ||||
state string |
| Specifies the operation to be performed on the tacacs server configured on the device. In case of merged, the input mode configuration will be merged with the existing tacacs server configuration on the device. In case of deleted the existing tacacs server mode configuration will be removed from the device. |
Note
check_mode
.# Using deleted # # Before state: # ------------- # # do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- #source-interface : Ethernet12 #timeout : 10 #auth-type : login #key : login #------------------------------------------------------------------------------------------------ #HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF #------------------------------------------------------------------------------------------------ #1.2.3.4 pap ***** 50 2 10 mgmt #localhost pap 49 1 5 default # - name: Merge tacacs configurations dellemc.enterprise_sonic.sonic_tacacs_server: config: auth_type: login key: login source_interface: Ethernet 12 timeout: 10 servers: host: - name: 1.2.3.4 state: deleted # After state: # ------------ # #do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- #timeout : 5 #auth-type : pap #------------------------------------------------------------------------------------------------ #HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF #------------------------------------------------------------------------------------------------ #localhost pap 49 1 5 default # Using deleted # # Before state: # ------------- # # do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- #source-interface : Ethernet12 #timeout : 10 #auth-type : login #key : login #------------------------------------------------------------------------------------------------ #HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF #------------------------------------------------------------------------------------------------ #1.2.3.4 pap ***** 50 2 10 mgmt #localhost pap 49 1 5 default # - name: Merge tacacs configurations dellemc.enterprise_sonic.sonic_tacacs_server: config: state: deleted # After state: # ------------ # #do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- #timeout : 5 #auth-type : pap # Using merged # # Before state: # ------------- # #sonic(config)# do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- # - name: Merge tacacs configurations dellemc.enterprise_sonic.sonic_tacacs_server: config: auth_type: pap key: pap source_interface: Ethernet 12 timeout: 10 servers: host: - name: 1.2.3.4 auth_type: pap key: 1234 state: merged # After state: # ------------ # #sonic(config)# do show tacacs-server #--------------------------------------------------------- #TACACS Global Configuration #--------------------------------------------------------- #source-interface : Ethernet12 #timeout : 10 #auth-type : pap #key : pap #------------------------------------------------------------------------------------------------ #HOST AUTH-TYPE KEY PORT PRIORITY TIMEOUT VRF #------------------------------------------------------------------------------------------------ #1.2.3.4 pap 1234 49 1 5 default
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
after list / elements=string | when changed | The resulting configuration model invocation. Sample: The configuration returned will always be in the same format of the parameters above. |
before list / elements=string | always | The configuration prior to the model invocation. Sample: The configuration returned will always be in the same format of the parameters above. |
commands list / elements=string | always | The set of commands pushed to the remote device. Sample: ['command 1', 'command 2', 'command 3'] |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/dellemc/enterprise_sonic/sonic_tacacs_server_module.html