Hi jdsila,
Thanks for reply.
Yes the API key is correct. I use it in postman and ansible other playbooks. this is one of the feature that does not come from the ansbile existing module.
Ansible did offer convert curl into uri module. I follow it and failed. 😞
Just tried it and get same error.
This time, I will post the whole error message.
I don't think it is the " but not sure... if any one know ansible may help?
Antien
fatal: [api.meraki.com]: FAILED! => {
"cache_control": "no-cache",
"changed": false,
"connection": "close",
"content": " ",
"content_type": "text/html; charset=utf-8",
"date": "Tue, 30 Jul 2019 19:45:37 GMT",
"elapsed": 0,
"invocation": {
"module_args": {
"attributes": null,
"auth_key": """my key}}",
"backup": null,
"body": {
"enabled": true
},
"body_format": "json",
"client_cert": null,
"client_key": null,
"content": null,
"creates": null,
"delimiter": null,
"dest": null,
"directory_mode": null,
"follow": false,
"follow_redirects": "safe",
"force": false,
"force_basic_auth": false,
"group": null,
"headers": {
"Content-Type": "application/json"
},
"http_agent": "ansible-httpget",
"method": "PUT",
"mode": null,
"net_id": "{{netid}}",
"org_id": 370177,
"owner": null,
"regexp": null,
"remote_src": null,
"removes": null,
"return_content": false,
"selevel": null,
"serole": null,
"setype": null,
"seuser": null,
"src": null,
"status_code": [
200
],
"timeout": 30,
"unix_socket": null,
"unsafe_writes": null,
"url": "https://api.meraki.com/api/v0/networks/{{netid}}/vlansEnabledState",
"url_password": null,
"url_username": null,
"use_proxy": true,
"validate_certs": true
}
},
"msg": "Status code was 404 and not [200]: HTTP Error 404: Not Found",
"redirected": false,
"server": "nginx",
"status": 404,
"transfer_encoding": "chunked",
"url": "https://api.meraki.com/api/v0/networks/{{netid}}/vlansEnabledState",
"vary": "Accept-Encoding",
"x_request_id": "4fa13837f83d4303926fa94ab4910bba",
"x_runtime": "0.025126",
"x_ua_compatible": "IE=Edge,chrome=1"
}
PLAY RECAP ************************************************************************************************************************************************************
api.meraki.com : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0