saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
571 stars 65 forks source link

TASK [dns : Cloudflare | Add DNS Record | Remove DNS CNAME Record] fail with 400 status #112

Closed btmarouane closed 1 year ago

btmarouane commented 1 year ago

Describe the bug TASK [dns : Cloudflare | Add DNS Record | Remove DNS CNAME Record] fail with 400 status

To Reproduce sb install sandbox-wordpress

Logs fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "account_api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "account_api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "account_email": "mycouldflareemail@mycloudflareemail.com", "algorithm": null, "api_token": null, "cert_usage": null, "hash_type": null, "key_tag": null, "port": null, "priority": 1, "proto": null, "proxied": false, "record": "wordpress", "selector": null, "service": null, "solo": null, "state": "absent", "timeout": 30, "ttl": 1, "type": "CNAME", "value": null, "weight": 1, "zone": "mydomainname.com" } }, "msg": "API bad request; Status: 400; Method: GET: Call: /zones?name=mydomainname.com" }

System Information

owine commented 1 year ago

Does this occur with all roles or wordpress only?

btmarouane commented 1 year ago

i was trying with wordpress but i think it will affect all the roles they use community.general.cloudflare_dns

owine commented 1 year ago
TASK [dns : Cloudflare | Add DNS Record | Remove DNS CNAME Record] *************
Monday 21 November 2022  14:12:25 -0600 (0:00:00.170)       0:03:57.818 *******
ok: [localhost]

This completes successfully for me so you will need to test a bit more and determine if this is role isolated or happening on all of your roles.

As this appears to be a support issue, the DIscord will be a more appropriate forum to troubleshoot this.

saltydk commented 1 year ago

Is this a new account on Cloudflare or has it been in use before (with this domain)?

btmarouane commented 1 year ago

this is a new account, i'm putting wrong api token and getting same error, that's weird !

saltydk commented 1 year ago

this is a new account, i'm putting wrong api token and getting same error, that's weird !

Not sure what this is saying.

btmarouane commented 1 year ago

I'm using a new cloudflare account Tried also with a wrong cloudflare api token to test my data

fatal: [localhost]: FAILED! => { "changed": false, "invocation": { "module_args": { "account_api_key": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "account_api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "account_email": "myemail", "algorithm": null, "api_token": null, "cert_usage": null, "hash_type": null, "key_tag": null, "port": null, "priority": 1, "proto": null, "proxied": false, "record": "tandoor", "selector": null, "service": null, "solo": null, "state": "absent", "timeout": 30, "ttl": 1, "type": "CNAME", "value": null, "weight": 1, "zone": "mydomain.com" } }, "msg": "API bad request; Status: 400; Method: GET: Call: /zones?name=mydomain.com" }

saltydk commented 1 year ago

You keep saying token but you need to use the global api key.

btmarouane commented 1 year ago

Oups that was my mistake. Thank u very much

btmarouane commented 1 year ago

closed