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

How to use network_cli+ssh to send commands to the console, without api? #43

Open
gaetanquentin opened this issue Apr 22, 2022 · 0 comments

Comments

@gaetanquentin
Copy link

gaetanquentin commented Apr 22, 2022

We want to use the network_cli connector with ssh to launch commands to the console directly, without using httpapi.

Is this possible?

My first tests seems to demonstrate that it is not possible:

Exemples:


tasks:
- name: run show version on remote devices
  ansible.netcommon.cli_command:
    command:  diagnose hardware info

with inventory vars:
ansible_network_os: fortinet.fortimanager
ansible_connection: ansible.netcommon.network_cli
results:
fatal: [MYDEVICE]: FAILED! => {
    "msg": "network os fortinet.fortimanager.fortimanager is not supported"
}

with inventory vars:

ansible_network_os: fortinet.fortimanager
ansible_connection: httpapi

results:

fatal: [MYDEVICE]: FAILED! => {
    "changed": false,
    "msg": "Connection type httpapi is not valid for this module"
}

So is there a solution?

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

1 participant