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

meraki_alert idempotency error #347

Open
oliverl-21 opened this issue Aug 29, 2022 · 0 comments
Open

meraki_alert idempotency error #347

oliverl-21 opened this issue Aug 29, 2022 · 0 comments

Comments

@oliverl-21
Copy link
Contributor

If you try to create alert settings and rerun the playbook you receive the following error.

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: object of type 'NoneType' has no len()
fatal: [localhost]: FAILED! => changed=false 
  module_stderr: |-
    Traceback (most recent call last):
      File "/Users/oliver/.ansible/tmp/ansible-tmp-1661765825.4653141-46321-195993778441786/AnsiballZ_meraki_alert.py", line 107, in <module>
        _ansiballz_main()
      File "/Users/oliver/.ansible/tmp/ansible-tmp-1661765825.4653141-46321-195993778441786/AnsiballZ_meraki_alert.py", line 99, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/Users/oliver/.ansible/tmp/ansible-tmp-1661765825.4653141-46321-195993778441786/AnsiballZ_meraki_alert.py", line 47, in invoke_module
        runpy.run_module(mod_name='ansible_collections.cisco.meraki.plugins.modules.meraki_alert', init_globals=dict(_module_fqn='ansible_collections.cisco.meraki.plugins.modules.meraki_alert', _modlib_path=modlib_path),
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 207, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py", line 353, in <module>
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/modules/meraki_alert.py", line 330, in main
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py", line 185, in is_update_required
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py", line 176, in is_update_required
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py", line 185, in is_update_required
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py", line 185, in is_update_required
      File "/var/folders/6g/cclk58y94dz5xwsmy4l28xq00000gn/T/ansible_cisco.meraki.meraki_alert_payload_81v94gug/ansible_cisco.meraki.meraki_alert_payload.zip/ansible_collections/cisco/meraki/plugins/module_utils/network/meraki/meraki.py", line 171, in is_update_required
    TypeError: object of type 'NoneType' has no len()
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1
#task
  - name: get alert settings
    cisco.meraki.meraki_alert:
      auth_key: "{{ auth_key }}"
      org_name: "{{ org_name }}"
      net_name: Home
      state: present
      alerts:
        - alert_destinations:
            all_admins: no
            snmp: no
          alert_type: "usageAlert"
          enabled: yes
          filters:
            period: 1200
            threshold: 104857600
@oliverl-21 oliverl-21 changed the title Alert idempotency error meraki_alert idempotency error Aug 29, 2022
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