Giter VIP home page Giter VIP logo

Comments (8)

petertavenier avatar petertavenier commented on July 24, 2024

might be useful to add the error;

Traceback (most recent call last):
  File "/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/module_utils/network/meraki/meraki.py", line 92, in inner
ansible.module_utils.network.meraki.meraki.HTTPError: HTTP error 400 - None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py", line 102, in <module>
    _ansiballz_main()
  File "/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.network.meraki.meraki_device', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/modules/network/meraki/meraki_device.py", line 430, in <module>
  File "/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/modules/network/meraki/meraki_device.py", line 388, in main
  File "/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/module_utils/network/meraki/meraki.py", line 116, in inner
ansible.module_utils.network.meraki.meraki.HTTPError: HTTP error 400 - None
Trying secret FileVaultSecret(filename='/home/peter/repositories/ansible/vault_password') for vault_id=default
failed: [localhost] (REMOVED SENSITIVE INFO) => {
    "ansible_loop_var": "item",
    "changed": false,
    "item": [
        (REMOVED SENSITIVE INFO)
    ],
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/module_utils/network/meraki/meraki.py\", line 92, in inner\nansible.module_utils.network.meraki.meraki.HTTPError: HTTP error 400 - None\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File \"/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py\", line 102, in <module>\n    _ansiballz_main()\n  File \"/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py\", line 94, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/peter/.ansible/tmp/ansible-tmp-1592480055.1857505-281351811665172/AnsiballZ_meraki_device.py\", line 40, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.network.meraki.meraki_device', init_globals=None, run_name='__main__', alter_sys=True)\n  File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/modules/network/meraki/meraki_device.py\", line 430, in <module>\n  File \"/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/modules/network/meraki/meraki_device.py\", line 388, in main\n  File \"/tmp/ansible_meraki_device_payload_0f_b_n2h/ansible_meraki_device_payload.zip/ansible/module_utils/network/meraki/meraki.py\", line 116, in inner\nansible.module_utils.network.meraki.meraki.HTTPError: HTTP error 400 - None\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}

from ansible-meraki.

kbreit avatar kbreit commented on July 24, 2024

@petertavenier Thank you for the bug report. Give me a little time to look into this and I'll let you know what I find.

from ansible-meraki.

kbreit avatar kbreit commented on July 24, 2024

@petertavenier I ran the integration test and it worked, but that doesn't mean everything is good. I'd like to start with a few basics. What version of Ansible are you using and are you using the Meraki collection?

from ansible-meraki.

petertavenier avatar petertavenier commented on July 24, 2024

@kbreit The integration test is this file is suppose? I already looked into this playbook, but only the state: query is used in combination with hostname. hostname: "bla-bla-device" is not used together with state: present.

version:

ansible-playbook 2.9.5
  config file = /home/peter/repositories/ansible/ansible.cfg
  configured module search path = ['/home/peter/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]

(virtualenv) peter@hostname:~/repositories/ansible$ ansible-galaxy collection install -r requirements.yml
Process install dependency map
Starting collection install process
Skipping 'cisco.meraki' as it is already installed
(virtualenv) peter@hostname:~/repositories/ansible$ cat requirements.yml
collections:
# Install a collection from Ansible Galaxy.
  - name: cisco.meraki
    version: 1.3.0
    source: https://galaxy.ansible.com``` 

from ansible-meraki.

kbreit avatar kbreit commented on July 24, 2024

I have an alias for hostname of name and there is a task which uses name.

Does this task generally match what you're looking for?

from ansible-meraki.

kbreit avatar kbreit commented on July 24, 2024

I've done a little more testing and definitely have seen some quirks with how it acts. It's not crashing like it is for you but it's also not applying the hostname if I'm just applying hostname. I will troubleshoot this but consider the bug confirmed.

from ansible-meraki.

kbreit avatar kbreit commented on July 24, 2024

@petertavenier I created a pull request to fix this bug tonight. #101 is what you should try but see if you can do it against a test environment and not production. This is a pretty large rewrite of the module and I don't know if I'm missing corner cases. Overall this is a more straight forward code base but still may not be right or have bugs I haven't found.

from ansible-meraki.

petertavenier avatar petertavenier commented on July 24, 2024

I tested it see comment in #101

from ansible-meraki.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.