Developer

 View Only
last person joined: 2 days ago 

Expand all | Collapse all

ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found

This thread has been viewed 25 times
  • 1.  ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found

    Posted 22 days ago
    Hello,

    Error while trying to use backup module with aruba6000 (AOS 10_08)

    inventory :
    all:
      hosts:
        aoscx_1:
          ansible_host: xx.xx.xx.xx
          ansible_user: swadmin
          ansible_network_os: arubanetworks.aoscx.aoscx
          ansible_connection: network_cli # SSH connection method

    backup task :
    - hosts: all
      collections:
       - arubanetworks.aoscx
      vars:
       - ansible_connection: network_cli
      tasks:
       - name: Copy Running Config to local as JSON
         aoscx_backup_config:
           config_name: 'running-config'
           output_file: '/tmp/running-config.json'

    I launch :
    ansible-playbook -i inventory.yaml backup.yaml -vvv

    Output:
    ansible-playbook [core 2.13.5]
    config file = None
    configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
    ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
    executable location = /usr/local/bin/ansible-playbook
    python version = 3.9.7 (default, Apr 21 2022, 08:39:11) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
    jinja version = 3.1.2
    libyaml = True
    No config file found; using defaults
    host_list declined parsing /root/ADM_SCRIPTS/ANSIBLE/inventory.yaml as it did not pass its verify_file() method
    script declined parsing /root/ADM_SCRIPTS/ANSIBLE/inventory.yaml as it did not pass its verify_file() method
    Parsed /root/ADM_SCRIPTS/ANSIBLE/inventory.yaml inventory source with yaml plugin
    Skipping callback 'default', as we already have a stdout callback.
    Skipping callback 'minimal', as we already have a stdout callback.
    Skipping callback 'oneline', as we already have a stdout callback.

    PLAYBOOK: backup.yaml ************************************************************************************************
    1 plays in backup.yaml

    PLAY [all] ***********************************************************************************************************

    TASK [Gathering Facts] ***********************************************************************************************
    task path: /root/ADM_SCRIPTS/ANSIBLE/backup.yaml:1
    redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
    <xx.xx.xx.xx> ESTABLISH LOCAL CONNECTION FOR USER: root
    <xx.xx.xx.xx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-568622p6o40kq `"&& mkdi"` echo /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558448.3570573-56866-168699727837053 `" && echonsible-tmp-1667558448.3570573-56866-168699727837053="` echo /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp667558448.3570573-56866-168699727837053 `" ) && sleep 0'
    Using module file /usr/local/lib/python3.9/site-packages/ansible/modules/setup.py
    <xx.xx.xx.xx> PUT /root/.ansible/tmp/ansible-local-568622p6o40kq/tmpda997tdg TO /root/.ansible/tmp/ansible-local-568626o40kq/ansible-tmp-1667558448.3570573-56866-168699727837053/AnsiballZ_setup.py
    <xx.xx.xx.xx> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558448.35705736866-168699727837053/ /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558448.3570573-56866-1686997278373/AnsiballZ_setup.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c '/usr/bin/python3.9 /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558443570573-56866-168699727837053/AnsiballZ_setup.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558448.3570573-866-168699727837053/ > /dev/null 2>&1 && sleep 0'
    ok: [aoscx_1]
    META: ran handlers

    TASK [Copy Running Config to local as JSON] **************************************************************************
    task path: /root/ADM_SCRIPTS/ANSIBLE/backup.yaml:7
    redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
    <xx.xx.xx.xx> ESTABLISH LOCAL CONNECTION FOR USER: root
    <xx.xx.xx.xx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-568622p6o40kq `"&& mkdi"` echo /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319 `" && echonsible-tmp-1667558449.7980385-56921-132218506745319="` echo /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp667558449.7980385-56921-132218506745319 `" ) && sleep 0'
    Using module file /root/.ansible/collections/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_conf.py
    <xx.xx.xx.xx> PUT /root/.ansible/tmp/ansible-local-568622p6o40kq/tmpg7zhmds_ TO /root/.ansible/tmp/ansible-local-568626o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/AnsiballZ_aoscx_backup_config.py
    <xx.xx.xx.xx> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.79803856921-132218506745319/ /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-1322185067459/AnsiballZ_aoscx_backup_config.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c '/usr/bin/python3.9 /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558447980385-56921-132218506745319/AnsiballZ_aoscx_backup_config.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-921-132218506745319/ > /dev/null 2>&1 && sleep 0'
    The full traceback is:
    Traceback (most recent call last):
    File "/root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/AnsiballZ_scx_backup_config.py", line 107, in <module>
    _ansiballz_main()
    File "/root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/AnsiballZ_scx_backup_config.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
    File "/root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/AnsiballZ_scx_backup_config.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', init_globs=dict(_module_fqn='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', _modlib_path=modlib_th),
    File "/usr/lib64/python3.9/runpy.py", line 210, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
    File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
    File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/ubanetworks/aoscx/plugins/modules/aoscx_backup_config.py", line 225, in <module>
    File "/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/ubanetworks/aoscx/plugins/modules/aoscx_backup_config.py", line 156, in main
    File "/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/ubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py", line 82, in get_pyaoscx_session
    File "/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/ubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py", line 47, in __init__
    File "/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible/module_utilsonnection.py", line 200, in __rpc__
    ansible.module_utils.connection.ConnectionError: Method not found
    fatal: [aoscx_1]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-568622p6o40kq/ansie-tmp-1667558449.7980385-56921-132218506745319/AnsiballZ_aoscx_backup_config.py\", line 107, in <module>\n _ansibal_main()\n File \"/root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/siballZ_aoscx_backup_config.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARA)\n File \"/root/.ansible/tmp/ansible-local-568622p6o40kq/ansible-tmp-1667558449.7980385-56921-132218506745319/AnsibaZ_aoscx_backup_config.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.arubanetworkaoscx.plugins.modules.aoscx_backup_config', init_globals=dict(_module_fqn='ansible_collections.arubanetworks.aoscx.pluns.modules.aoscx_backup_config', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.9/runpy.py\", line 210, in rumodule\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.9/runpy.py\",ine 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.9/runpy.py\",ine 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_scx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py\", line 2, in <module>\n File \"/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansie_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py\", line 156, in main\n File \"/tmp/ansible_acx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugs/module_utils/aoscx_pyaoscx.py\", line 82, in get_pyaoscx_session\n File \"/tmp/ansible_aoscx_backup_config_payload_168uf6/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/module_utils/aoscx_pyaox.py\", line 47, in __init__\n File \"/tmp/ansible_aoscx_backup_config_payload_fi168uf6/ansible_aoscx_backup_config_pload.zip/ansible/module_utils/connection.py\", line 200, in __rpc__\nansible.module_utils.connection.ConnectionError: thod not found\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
    }

    PLAY RECAP ***********************************************************************************************************
    aoscx_1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0


    Can you help me?
    Thanks.


  • 2.  RE: ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found
    Best Answer

    Posted 20 days ago
    Hi, you need to use ansible_connection:  arubanetworks.aoscx.aoscx

    The aoscx_backup_config is using the API and not ssh. The api must be enabled on the device also.


    ------------------------------
    Arne Opdal
    ------------------------------



  • 3.  RE: ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found

    Posted 19 days ago
    Thank you for your answer but i already tested with httpapi and same issue with same error:
    Tried this :

    inventory :
    all:
    hosts:
    aoscx_1:
    ansible_host: xx.xx.xx.xx
    ansible_user: swadmin
    ansible_password: password
    ansible_network_os: arubanetworks.aoscx.aoscx
    ansible_connection: httpapi # REST API connection method
    ansible_httpapi_validate_certs: False
    ansible_httpapi_use_ssl: True
    ansible_acx_no_proxy: True

    backup playbook
    - hosts: all
    collections:
    - arubanetworks.aoscx
    vars:
    - ansible_connection: httpapi
    tasks:
    - name: Copy Running Config to local as JSON
    aoscx_backup_config:
    config_name: 'running-config'
    output_file: '/tmp/running-config.json'


    launched :
    ansible-playbook -i inv.yaml backup.yaml -u swadmin -vvv

    Output :
    ansible-playbook [core 2.13.5]
    config file = None
    configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/local/lib/python3.9/site-packages/ansible
    ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
    executable location = /usr/local/bin/ansible-playbook
    python version = 3.9.7 (default, Apr 21 2022, 08:39:11) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)]
    jinja version = 3.1.2
    libyaml = True
    No config file found; using defaults
    host_list declined parsing /root/ADM_SCRIPTS/ANSIBLE/inv.yaml as it did not pass its verify_file() method
    script declined parsing /root/ADM_SCRIPTS/ANSIBLE/inv.yaml as it did not pass its verify_file() method
    Parsed /root/ADM_SCRIPTS/ANSIBLE/inv.yaml inventory source with yaml plugin
    Skipping callback 'default', as we already have a stdout callback.
    Skipping callback 'minimal', as we already have a stdout callback.
    Skipping callback 'oneline', as we already have a stdout callback.

    PLAYBOOK: backup.yaml ***********************************************************************************************************************************************************************
    1 plays in backup.yaml

    PLAY [all] **********************************************************************************************************************************************************************************

    TASK [Gathering Facts] **********************************************************************************************************************************************************************
    task path: /root/ADM_SCRIPTS/ANSIBLE/backup.yaml:1
    redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi
    <xx.xx.xx.xx> ESTABLISH LOCAL CONNECTION FOR USER: root
    <xx.xx.xx.xx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111 `" && echo ansible-tmp-1667812491.9907389-59385-35978161742111="` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111 `" ) && sleep 0'
    Using module file /usr/local/lib/python3.9/site-packages/ansible/modules/setup.py
    <xx.xx.xx.xx> PUT /root/.ansible/tmp/ansible-local-59381bjs2rqlz/tmp06azre7y TO /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111/AnsiballZ_setup.py
    <xx.xx.xx.xx> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111/ /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111/AnsiballZ_setup.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c '/usr/bin/python3.9 /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111/AnsiballZ_setup.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812491.9907389-59385-35978161742111/ > /dev/null 2>&1 && sleep 0'
    ok: [aoscx_1]
    META: ran handlers

    TASK [Copy Running Config to local as JSON] *************************************************************************************************************************************************
    task path: /root/ADM_SCRIPTS/ANSIBLE/backup.yaml:7
    redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi
    <xx.xx.xx.xx> ESTABLISH LOCAL CONNECTION FOR USER: root
    <xx.xx.xx.xx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz `"&& mkdir "` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086 `" && echo ansible-tmp-1667812493.485115-59439-7877560799086="` echo /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086 `" ) && sleep 0'
    Using module file /root/.ansible/collections/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py
    <xx.xx.xx.xx> PUT /root/.ansible/tmp/ansible-local-59381bjs2rqlz/tmp5o0a4otk TO /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py
    <xx.xx.xx.xx> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/ /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c '/usr/bin/python3.9 /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py && sleep 0'
    <xx.xx.xx.xx> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/ > /dev/null 2>&1 && sleep 0'
    The full traceback is:
    Traceback (most recent call last):
    File "/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py", line 107, in <module>
    _ansiballz_main()
    File "/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
    File "/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py", line 47, in invoke_module
    runpy.run_module(mod_name='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', init_globals=dict(_module_fqn='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', _modlib_path=modlib_path),
    File "/usr/lib64/python3.9/runpy.py", line 210, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
    File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
    File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
    File "/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py", line 225, in <module>
    File "/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py", line 156, in main
    File "/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py", line 82, in get_pyaoscx_session
    File "/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py", line 47, in __init__
    File "/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc__
    ansible.module_utils.connection.ConnectionError: Method not found
    fatal: [aoscx_1]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py\", line 107, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-local-59381bjs2rqlz/ansible-tmp-1667812493.485115-59439-7877560799086/AnsiballZ_aoscx_backup_config.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', init_globals=dict(_module_fqn='ansible_collections.arubanetworks.aoscx.plugins.modules.aoscx_backup_config', _modlib_path=modlib_path),\n File \"/usr/lib64/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/lib64/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py\", line 225, in <module>\n File \"/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/modules/aoscx_backup_config.py\", line 156, in main\n File \"/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py\", line 82, in get_pyaoscx_session\n File \"/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible_collections/arubanetworks/aoscx/plugins/module_utils/aoscx_pyaoscx.py\", line 47, in __init__\n File \"/tmp/ansible_aoscx_backup_config_payload_edpp2zte/ansible_aoscx_backup_config_payload.zip/ansible/module_utils/connection.py\", line 200, in __rpc__\nansible.module_utils.connection.ConnectionError: Method not found\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
    }

    PLAY RECAP **********************************************************************************************************************************************************************************
    aoscx_1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0



  • 4.  RE: ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found

    Posted 19 days ago
    Hi @waaalex ! Use this as your inventory - you'll want to specify the connection method to be arubanetworks.aoscx.aoscx and NOT httpapi OR network_cli:
    all:
      hosts:
        aoscx_1:
          ansible_host: xx.xx.xx.xx
          ansible_user: swadmin
          ansible_network_os: arubanetworks.aoscx.aoscx
          ansible_connection: arubanetworks.aoscx.aoscx # API connection method using PYAOSCX​


    Also please ensure you have the Python requirements properly installed with the following command:
    python3 -m pip install -r https://raw.githubusercontent.com/aruba/aoscx-ansible-collection/master/requirements.txt​



  • 5.  RE: ANSIBLE : ansible.module_utils.connection.ConnectionError: Method not found

    Posted 18 days ago
    haaa thank you very much ! !
    It works now :)
    I put ArneO as answer and many thanks to Tiffany.
    I will mark you as answer in github :)
    https://github.com/aruba/aoscx-ansible-collection/issues/44

    thanks.