ansible-meraki icon indicating copy to clipboard operation
ansible-meraki copied to clipboard

meraki_alert module issue - "ERROR! 'meraki_alert' is not a valid attribute for a Play

Open aaljawahiri opened this issue 2 years ago • 4 comments

I'm just doing some testing with the Ansible Meraki module using meraki_alert. Am I doing something wrong? I keep getting the below error:

image

"ERROR! couldn't resolve module/action 'meraki_alert'. This often indicates a misspelling, missing collection, or incorrect module path.

The error appears to be in '/home/beardwin/meraki-ansible/playbooks/alerts.yml': line 4, column 7, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

    tasks:
    - name: Query all settings
      ^ here"

Is there also a way to find out all the possible values the "type" parameter can take? For example, one of the values would be "gatewayDown" Is there a way to find all the possible values?

image

Using the below documentation.

https://docs.ansible.com/ansible/latest/collections/cisco/meraki/meraki_alert_module.html#parameters

By the way, Indentation seems to be fine, I can run the other Meraki Playbooks just fine with the same indentation, unless I'm being blind!

Thanks in advance for your help!

aaljawahiri avatar Apr 07 '22 05:04 aaljawahiri

To my mind this looks fine but obviously there's something off. It seems like a syntax error to me. I'd recommend putting your playbook into a YAML validated and seeing what it says. Online ones may have access to the content so don't put sensitive content in it.

Regarding your question about possible values, in this case I don't think so. I looked at the API documentation and they don't list all the options. I'll ask if that's something that can be linked.

kbreit avatar Apr 08 '22 01:04 kbreit

To my mind this looks fine but obviously there's something off. It seems like a syntax error to me. I'd recommend putting your playbook into a YAML validated and seeing what it says. Online ones may have access to the content so don't put sensitive content in it.

Regarding your question about possible values, in this case I don't think so. I looked at the API documentation and they don't list all the options. I'll ask if that's something that can be linked.

Thanks, do let me know if you find anything. Does the module look fine to you?

aaljawahiri avatar Apr 08 '22 02:04 aaljawahiri

My module tests execute just fine. Not to say they're perfect. Far from it. Did you try putting your playbook through a YAML validation

kbreit avatar Apr 11 '22 00:04 kbreit

@Beardwin1 Following up. Were you able to validate the YAML? I could continue looking into it if it's still a problem

kbreit avatar May 11 '22 21:05 kbreit