cancelar
Mostrar resultados para 
Pesquisar em vez de 
Queria dizer: 
cancel
973
Apresentações
0
Útil
3
Respostas

Connecting Recent versions of Ansible to Cisco AireOS WLC

Alisson C
Level 1
Level 1

Hi all,

I am trying to connect Ansible to a WLC running AireOS, but it does not work at all.

It used to work when using

ansible_connection=local

But this is no longer supported in recent versions of ansible.

Using Network CLI does not connect to the WLC.

ansible_connection=network_cli
ansible_network_os=community.network.aireos
ansible_port=22

It doesn't work if I use the provider parameter for credentials.

---
legacy_credentials
:
host: "{{ inventory_hostname }}"
username: "{{ lookup('env', 'USERNAME') }}"
password: "{{ lookup('env', 'PASSWORD') }}"

 

My Playbook:

---
- hosts: all
gather_facts: False
tasks:
- name: Run show sysinfo on remote devices
community.network.aireos_command:
provider: "{{ legacy_credentials }}"
commands: show sysinfo

- name: Ensure we are running the script on a WLC and not other devices
community.network.aireos_command:
provider: "{{ legacy_credentials }}"
commands: show sysinfo
wait_for: result[0] contains 'Cisco Controller'

Just wondering if this is something I am missing or if there are any other parameters to set.

Would anyone have a working example of connecting to an AireOS WLC?

 

ansible --version
ansible [core 2.13.3]
python version = 3.9.6 (default, Mar 10 2023, 20:16:38) [Clang 14.0.3 (clang-1403.0.22.14.1)]
jinja version = 3.0.1
libyaml = False

 

ansible-galaxy collection list | grep network
community.network 4.0.1
f5networks.f5_modules 1.19.0
junipernetworks.junos 3.1.0

3 RESPOSTAS 3

Translator
Community Manager
Community Manager

Eu não acho que as WLCs AireOS suportem qualquer uma dessas automatizações

HTH
Rasika
*** Pls classificam todas as respostas úteis ***

Translator
Community Manager
Community Manager

Não tenho certeza se entendi sua resposta. Estou tendo um problema semelhante. Foi afirmado que funcionou antes de uma versão mais recente do Ansible. Eu tive muitos scripts Ansible trabalhar com controladores AireOS.

I managed to fix it by rolling back to an older version of Ansible that accepts connection=local.

This works for me now.

(env):ansible acurunzi$ ansible --version
ansible 2.9.27
...
python version = 3.9.6 (default, May 7 2023, 23:32:44) [Clang 14.0.3 (clang-1403.0.22.14.1)]