Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arubaoss_config throws error when trying to pull config #85

Open
bdbrassart opened this issue Sep 7, 2023 · 6 comments
Open

arubaoss_config throws error when trying to pull config #85

bdbrassart opened this issue Sep 7, 2023 · 6 comments

Comments

@bdbrassart
Copy link

Any usage of arubaoss_config module spawns the following error:

Unable to decode JSON from response to exec_command(show running-config). Received 'None'.

@tchiapuziowong
Copy link
Member

Could you provide some more information regarding the Ansible version and the aos-switch collection version you're using? Also if you could provide the switch model and firmware version?

Since you're using the SSH module arubaoss_config please ensure you have your ansible_connection variable set to network_cli and you have the proper environment variable set. Instructions to this can be found in the README here: https://github.com/aruba/aos-switch-ansible-collection/blob/master/README.md

@bdbrassart
Copy link
Author

bdbrassart commented Sep 8, 2023

ansible 2.13.11
arubanetworks.aos_switch 1.7.0

The switch is an Aruba JL075A 3810M-16SFP+
Code is 16.11.0013

My ansible_connection variable IS set to network_cli, and I have NETWORK_GROUP_MODULES=arubaoss in my ansible.cfg.

Playbooks using the REST modules work fine.

@tchiapuziowong
Copy link
Member

what about the host_key_checking=false in ansible.cfg?

@Sergey371
Copy link

Sergey371 commented Nov 24, 2023

I get a similar error even:

The full traceback is:
  File "/tmp/ansible_arubaoss_config_payload_ol3rfazk/ansible_arubaoss_config_payload.zip/ansible_collections/arubanetworks/aos_switch/plugins/module_utils/arubaoss.py", line 462, in get_cli_config
    return _DEVICE_CONFIGS[cmd]
fatal: [reserve-arubasw2.nms]: FAILED! => changed=false
  invocation:
    module_args:
      after: null
      api_version: None
      backup: false
      backup_options: null
      before: null
      diff_against: null
      diff_ignore_lines: null
      host: null
      intended_config: null
      lines:
      - logging 10.200.0.15 oobm
      - logging 10.200.0.15 udp 5514
      match: line
      parents: null
      password: null
      port: null
      provider:
        api_version: None
        host: 10.200.0.227
        password: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
        port: 80
        ssh_keyfile: null
        timeout: 30
        transport: aossapi
        use_proxy: false
        use_ssl: false
        username: remote_admin
        validate_certs: false
      replace: block
      running_config: null
      save_when: changed
      src: null
      ssh_keyfile: null
      timeout: null
      use_ssl: null
      username: null
      validate_certs: false
  msg: unable to retrieve current config
  stderr: Unable to decode JSON from response to exec_command('show running-config'). Received 'None'.
  stderr_lines: <omitted>

In ansible.cfg is set host_key_checking=false.

P.S. Switcj is Aruba 3810M-16SFP+-2-slot KB.16.10.0012

@Sergey371
Copy link

Probably the problem is that the parameters are not correct:

      provider:
...
        port: 80
...
        transport: aossapi

But if I specify:

    provider:
      port: 22
      transport: 'network_cli'

Then the new port parameter is accepted, and the transport parameter is ignored and left in the aossapi value.
It would be nice if the transport parameter took the value ansible_connection, which is already set to the network_cli value.

@Nihlus
Copy link

Nihlus commented Jan 21, 2024

I'm also experiencing this issue. It seems to affect the stock aruba_config module as well, which exhibits the same or a very similar fault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants