---
- name: Create Route53 public zone
  route53_zone:
    comment: "{{ clusterid }}.{{ dns_domain }}"
    state: present
    vpc_region: "{{ aws_region }}"
    zone: "{{ clusterid }}.{{ dns_domain }}"
  register: r53zoneext

- name: Create Route53 private zone
  route53_zone:
    comment: "{{ clusterid }}.{{ dns_domain }}"
    state: present
    vpc_id: "{{ vpc.vpc.id }}"
    vpc_region: "{{ aws_region }}"
    zone: "{{ clusterid }}.{{ dns_domain }}"
  register: r53zoneint

- name: 'Set fact: arg for lookup query'
  set_fact:
    args:
      id: "{{ r53zoneext.result.zone_id }}"

- name: Fetch SOA records Route53 public zone
  set_fact:
    ns: "{{ lookup('route53_namservers', args).split(',') }}"
