Developer Community

Reply
Occasional Contributor I

aaa authentication port-access / mac-based with CLI Ansible modules

Hi,

 

There are commands like

 

aaa authentication port-access eap-radius authorized
aaa authentication mac-based chap-radius authorized

 

Which require to answer Yes/No after the command:

 

The RADIUS connection timeout must be less than the
authentication server timeout for the switch to authenticate
automatically when the RADIUS server is unavailable.
Do you want to continue? [y/n]

 

Is it possible somehow to make it working with any of available CLI module?

If not, it would be very very kind if one could create a module for the aaa port-access stuff.

 

Thanks in advance.

MVP Expert

Re: aaa authentication port-access / mac-based with CLI Ansible modules

Hi Michaely

 

After a quick check, i don't found a API call for configure this parameter :(

 

https://h10145.www1.hpe.com/downloads/DownloadSoftware.aspx?SoftwareReleaseUId=26402&ProductNumber=JL557A&lang=&cc=&prodSeriesId=&SaidNumber=

 




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor I

Re: aaa authentication port-access / mac-based with CLI Ansible modules

Thanks Alexis.

 

Lets think about some creative solution :) that could fix that with cli module.

I'm pretty sure we could send Y,/n somehow.

MVP Expert

Re: aaa authentication port-access / mac-based with CLI Ansible modules

with API AnyCLI (or BatchCLI) no because interactive command is not supported...

 

Need to have a ssh session to the switch..




PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Occasional Contributor I

Re: aaa authentication port-access / mac-based with CLI Ansible modules

What about that one?

 

https://github.com/aruba/aruba-switch-ansible/tree/master/library

 

https://community.arubanetworks.com/t5/Developer-Community/How-to-install-use-CLI-modules-and-tasks-for-Switch-and-CX-in/td-p/534333

 

4. For ArubaOS-Switch and ArubaOS-CX, you can use the SSH CLI modules in the library/ directory to execute CLI commands as well as show commands. Remember this is using SSH to connect to your device, which means it may take more time to execute the command. Here are some examples below of how to use these modules for configuration and show commands. Keep in mind that in some of the examples I am passing Variables, but you're able to put information directly into the modules:

 

Example for Switch:

 

- name: Enable Interface 5
  arubaos_switch_ssh_cli:
    ip: "{{ansible_host}}"
    user: "{{ansible_user}}"
    password: "{{ansible_password}}"
    command_list: ["conf", "interface 5", "enable"]

- name: Get output of show vlans
arubaos_switch_ssh_cli:
ip: "{{ansible_host}}"
user: "{{ansible_user}}"
password: "{{ansible_password}}"
show_command: ["show vlans"]
register: ssh_output

 

Or that is part of the anycli?

MVP Expert

Re: aaa authentication port-access / mac-based with CLI Ansible modules

Yes, it will be work...

 

After a another check, there is a API call for mac-based (but not (yet) found for port-access

 

(Sorry using Powershell)

(Invoke-ArubaSWWebRequest -uri "rest/v7/authentication/mac_based").content | ConvertFrom-Json

uri                       auth_mac_based
---                       --------------
/authentication/mac_based @{primary_method=PAM_CHAP_RADIUS; secondary_method=SAM_AUTHORIZED; server_group=}



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info


PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info


PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)


PowerArubaIAP: Powershell Module to use Aruba Instant AP




ACMP 6.4 / ACMX #107 / ACCP 6.5
Highlighted
Occasional Contributor I

Re: aaa authentication port-access / mac-based with CLI Ansible modules

'aaa authentication port-access eap-radius authorized',
'y',

 

That one worked great.

 

Nice

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: