Hello Brice, First of all thanks for the DME ansible module. I'm hoping to get it working and manage our domain entries with Ansible.
However I'm currently facing the following problem when trying to list my domain entries: failed: [localhost] => {"failed": true} msg: The requested domain name is not accessible with this api_key; try using its ID if known. FATAL: all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/home/jacek/dns.retry localhost : ok=1 changed=0 unreachable=0 failed=1 I was getting 403 initially but after regenerating api key and secret key I've been hitting above mentioned issue. I've tried providing my domain name with and without double quotes, tried using numerical ID of domain with and without double quotes as well. It doesn't seem to make any difference. Any hints on what could be wrong or how I could find out more about the problem? I've tried sniffing with tshark but unfortunately the whole communication is passed via https. Thanks in advance! Jacek On Saturday, August 24, 2013 8:49:35 AM UTC+2, Brice Burgess wrote: > > Eric, > > Interesting. Admittedly I intended this module for "simple" use of basic > record management, at least to begin with. I'm totally happy to expand it > and test more features. Another missing feature is handling of HTTP > Redirection records. Performance can also be greatly increased by caching > the API returns for the duration of an ansible run. These are all possible > and perhaps we can work together on implementing them? > > I don't have a failover setup with DNSMadeEasy yet; were you able to > implement in your fork? > > Thanks, > > ~ Brice > > > > On Thursday, August 15, 2013 6:20:41 PM UTC-5, E.C. Raymond wrote: >> >> Hi Brice, >> >> I wanted to mention a few things after using this the other day: >> >> If you attempt to change a record that is setup for failover and >> monitored, it will go through, but then will revert back to the first ip1 >> in failover. I wasn't aware of this, and was confused after the DNS >> updated, then reverted back. Essentially, DO NOT USE ON FAILOVER records. >> The process to change failover records is different, and requires >> utilizing the /monitor url. The variable changes to use 'ip1' and 'ip2' >> instead of 'value'. Once this is changed, then it should it persist a >> record change using /dns/managed. >> >> It looks pretty simple to change the domain root record, but I was >> wondering why it wasn't implemented in the ansible module yet? I have been >> busy deconstructing and trying to add the changes in my own fork, but the >> lower level workings is harder to debug. >> >> Eric >> >> On Wednesday, August 7, 2013 3:52:22 PM UTC-7, Brice Burgess wrote: >>> >>> Eric, >>> >>> Interesting! Glad you got it working. I was not aware of their sandbox >>> API. Do you think adding sandbox=yes will be beneficial to other users of >>> this module? Or perhaps allow explicitly setting the endpoint; e.g. >>> endpoint="http://api.sandbox.dnsmadeeasy.com" >>> <http://api.sandbox.dnsmadeeasy.com> ? >>> >>> ~ Brice >>> >>> On 08/07/2013 04:47 PM, E.C. Raymond wrote: >>> >>> Hi Brice, >>> >>> Issue has been resolved. I had to change the endpoint for the API, as >>> I found we were using a sandbox API, so should be >>> http://api.sandbox.dnsmadeeasy.com. >>> >>> Thanks for the great module and your help! >>> >>> Eric >>> >>> On Wednesday, August 7, 2013 11:32:22 AM UTC-7, Brice Burgess wrote: >>>> >>>> Eric, >>>> >>>> A couple notes; >>>> >>>> 1. You should use mydomain.com for domain, not node1.mydomain.com >>>> a. If you are trying to get all the records for domain.com, just >>>> pass domain=mydomain.com (and result will be registered to response) >>>> b. If you want to get the current value of node1.mydomain.com, pass >>>> domain=mydomain.com record_name=node1 (and result will be registered >>>> to response) >>>> >>>> From the docs: >>>> + >>>> If record_name is not specified; all records for the domain will be >>>> returned as "result" regardless of state argument. >>>> >>>> + >>>> If record_value is not specified; no changes will be made and the record >>>> will be returned as "result" (e.g. can be used to fetch a record's current >>>> id, type, and ttl) >>>> >>>> 2. Make sure that you have an API enabled DNS Made Easy account >>>> (Business plan or above) and that you're using the correct API key. >>>> >>>> My thought is that their API is erring by passing node1.mydomain.com >>>> vs. mydomain.com. >>>> >>>> ~ Brice >>>> >>>> >>>> >>>> On Tuesday, August 6, 2013 11:51:14 PM UTC-5, E.C. Raymond wrote: >>>>> >>>>> Hi Brice, >>>>> >>>>> Perhaps I have misconfigured the playbook, but mine looks like this: >>>>> >>>>> # dns-test.yml >>>>> --- >>>>> - name: Check domain >>>>> hosts: localhost >>>>> >>>>> tasks: >>>>> - name: DNS check >>>>> dnsmadeeasy: account_key=my-key-hash >>>>> account_secret=my-secret-hash domain=node1.mydomain.com state=present >>>>> register: response >>>>> >>>>> >>>>> # ansible-playbook dns-test.yml -vvv --connection=local >>>>> >>>>> PLAY [Change DNS records] >>>>> ***************************************************** >>>>> >>>>> GATHERING FACTS >>>>> *************************************************************** >>>>> <localhost> EXEC ['/bin/sh', '-c', 'mkdir -p >>>>> $HOME/.ansible/tmp/ansible-1375850251.58-141557614580010 && echo >>>>> $HOME/.ansible/tmp/ansible-1375850251.58-141557614580010'] >>>>> <localhost> REMOTE_MODULE setup >>>>> <localhost> PUT /tmp/tmppbXWgg TO >>>>> /root/.ansible/tmp/ansible-1375850251.58-141557614580010/setup >>>>> <localhost> EXEC ['/bin/sh', '-c', '/usr/bin/python >>>>> /root/.ansible/tmp/ansible-1375850251.58-141557614580010/setup; rm -rf >>>>> /root/.ansible/tmp/ansible-1375850251.58-141557614580010/ >/dev/null >>>>> 2>&1'] >>>>> ok: [localhost] >>>>> >>>>> TASK: [DNS change] >>>>> ************************************************************ >>>>> <127.0.0.1> EXEC ['/bin/sh', '-c', 'mkdir -p >>>>> $HOME/.ansible/tmp/ansible-1375850251.78-249454490187651 && echo >>>>> $HOME/.ansible/tmp/ansible-1375850251.78-249454490187651'] >>>>> <127.0.0.1> REMOTE_MODULE dnsmadeeasy account_key=<<removed>> >>>>> account_secret=<<removed>> domain=node1.goniners.com state=present >>>>> <127.0.0.1> PUT /tmp/tmppbXWgg TO >>>>> /root/.ansible/tmp/ansible-1375850251.78-249454490187651/dnsmadeeasy >>>>> <127.0.0.1> EXEC ['/bin/sh', '-c', '/usr/bin/python >>>>> /root/.ansible/tmp/ansible-1375850251.78-249454490187651/dnsmadeeasy; rm >>>>> -rf /root/.ansible/tmp/ansible-1375850251.78-249454490187651/ >/dev/null >>>>> 2>&1'] >>>>> failed: [localhost] => {"failed": true} >>>>> msg: http://api.dnsmadeeasy.com/V2.0/dns/managed returned 403, with >>>>> body: {error: ["API key not found"]} >>>>> >>>>> FATAL: all hosts have already failed -- aborting >>>>> >>>>> PLAY RECAP >>>>> ******************************************************************** >>>>> to retry, use: --limit @/var/tmp/ansible/dns-test.retry >>>>> >>>>> localhost : ok=1 changed=0 unreachable=0 >>>>> failed=1 >>>>> >>>>> >>>>> >>>>> On Tuesday, August 6, 2013 7:09:08 PM UTC-7, Brice Burgess wrote: >>>>>> >>>>>> Eric, >>>>>> >>>>>> No problem. Have you passed the account_key argument? >>>>>> >>>>>> Show me an example of what you're trying to run and I can give you >>>>>> more info. >>>>>> >>>>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "Ansible Project" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/ansible-project/uT0dXCYh3VA/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, send an email to >>> ansible-proje...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> >>> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0c79c652-9958-4bde-a8f5-8b8badd8caa3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.