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

dnsmadeeasy module: regression in creating records #6457

Closed
mcornick opened this issue Mar 12, 2014 · 2 comments
Closed

dnsmadeeasy module: regression in creating records #6457

mcornick opened this issue Mar 12, 2014 · 2 comments
Labels
bug This issue/PR relates to a bug.

Comments

@mcornick
Copy link

Issue Type:

Bug Report

Ansible Version:

ansible 1.5.2 installed via pip

Environment:

running from Mac OS X 10.9.2, managing Centos 6.5

Summary:

There has been a regression in the dnsmadeeasy module since Ansible 1.5. A task which ensures that an A record is present raises an exception.

Steps To Reproduce:

Install Ansible 1.5.2 and dopy. Create a role using the files at https://gist.github.com/markcornick/9516792. Run a play using this role against localhost.

Expected Results:

The play completes without errors, and an A record is created in the specified zone on DNS Made Easy. (This is the behavior of Ansible 1.5.)

Actual Results:

The play does not complete without errors, and an A record is not created:

PLAY [localhost] ************************************************************** 

GATHERING FACTS *************************************************************** 
ok: [localhost]

TASK: [provisioning | create ansible ssh key] ********************************* 
ok: [localhost]

TASK: [provisioning | create ams2] ******************************************** 
ok: [localhost]

TASK: [provisioning | add ams2 to inventory] ********************************** 
ok: [localhost]

TASK: [provisioning | add ams2 to dns] **************************************** 
failed: [localhost] => {"failed": true, "item": "", "parsed": false}
invalid output was: Traceback (most recent call last):
  File "/Users/mcornick/.ansible/tmp/ansible-tmp-1394659215.01-276422353786404/dnsmadeeasy", line 1658, in <module>
    main()
  File "/Users/mcornick/.ansible/tmp/ansible-tmp-1394659215.01-276422353786404/dnsmadeeasy", line 265, in main
    current_record = DME.getRecordByName(record_name)
  File "/Users/mcornick/.ansible/tmp/ansible-tmp-1394659215.01-276422353786404/dnsmadeeasy", line 187, in getRecordByName
    self._instMap('record')
  File "/Users/mcornick/.ansible/tmp/ansible-tmp-1394659215.01-276422353786404/dnsmadeeasy", line 200, in _instMap
    for result in getattr(self, 'get' + type.title() + 's')():
  File "/Users/mcornick/.ansible/tmp/ansible-tmp-1394659215.01-276422353786404/dnsmadeeasy", line 192, in getRecords
    return self.query(self.record_url, 'GET')['data']
TypeError: 'bool' object has no attribute '__getitem__'


FATAL: all hosts have already failed -- aborting
@mpdehaan
Copy link
Contributor

This is likely related to the failure handling around URLs that we have fixed elsewhere.

@jimi-c can you look at the basics around this?

@jimi-c
Copy link
Member

jimi-c commented Mar 13, 2014

@markcornick the above patch should resolve the issue for you, and we will include it in 1.5.3. Please let us know if you continue having problems with this module. Thanks!

jimi-c added a commit that referenced this issue Mar 13, 2014
Also:
* changed this module to use https for requests to the API
* fixed a bug in which a traceback was caused when the domain wasn't found

Fixes #6457
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants