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

route53: Skip zone listing when hosted_zone_id is set #60102

Closed
bkmeneguello opened this issue Aug 5, 2019 · 3 comments · Fixed by #60437
Closed

route53: Skip zone listing when hosted_zone_id is set #60102

bkmeneguello opened this issue Aug 5, 2019 · 3 comments · Fixed by #60437
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. performance support:community This issue/PR relates to code supported by the Ansible community.

Comments

@bkmeneguello
Copy link
Contributor

SUMMARY

Improve route53 module performance when ZoneID is know

ISSUE TYPE
  • Bug Report
COMPONENT NAME

route53

ANSIBLE VERSION
ansible 2.8.3
  config file = /home/bruno/.ansible.cfg
  configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.15+ (default, Nov 27 2018, 23:36:35) [GCC 7.3.0]
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
  • Define a long list of DNS records
  • Use a loop with route53 module to update them
route53:
  state: present
  zone: example.com  # should not be required when hosted_zone_id is present
  private_zone: true  # should not be needed when hosted_zone_id is present
  hosted_zone_id: "XXXXXXXXXXX"
  record: "{{ item.name }}"
  ttl: "{{ item.ttl }}"
  type: "{{ item.type }}"
  value: "{{ item.value }}"
  overwrite: true
with_items: "{{ dns_records }}"
EXPECTED RESULTS

Since hosted_zone_id is provided, this should be a simple request to Route53 API

ACTUAL RESULTS

Currently the code in route53.py do a zone lookup witch may lead to a full listing with (possibly) pagination by boto.
This lookup returns a zone reference but only it's id attribute is read.
So, since the hosted_zone_id is the same id obtained above, and is developer responsibility to ensure it's correct, this lookup should be ignored and the provided hosted_zone_id used in place.

@ansibot
Copy link
Contributor

ansibot commented Aug 5, 2019

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Aug 5, 2019

@ansibot
Copy link
Contributor

ansibot commented Aug 5, 2019

@bkmeneguello, just so you are aware we have a dedicated Working Group for aws.
You can find other people interested in this in #ansible-aws on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. performance support:community This issue/PR relates to code supported by the Ansible community. labels Aug 5, 2019
@ansibot ansibot added the has_pr This issue has an associated PR. label Aug 22, 2019
@sivel sivel removed the needs_triage Needs a first human triage before being processed. label Aug 27, 2019
@ansible ansible locked and limited conversation to collaborators Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 aws bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. performance support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants