danvaida.route53

Status budowy Galaxy

Rola Ansible Route53

Tworzy, aktualizuje i usuwa strefy DNS oraz rekordy w Route53.

Wymagania

  • boto >= 2.24.0

Zmienne roli

  • route53_records_to_add: Lista rekordów strefy DNS do dodania. Różnice między rekordem CNAME a specyficznym dla Route53 rekordem alias można zobaczyć w oficjalnej dokumentacji tutaj

  • route53_records_to_remove: Lista rekordów strefy DNS do usunięcia.

  • route53_zones_to_add: Lista stref DNS do dodania.

  • route53_zones_to_remove: Lista stref DNS do usunięcia.

Zależności

Brak.

Przykładowy playbook

- hosts: localhost
  connection: local
  gather_facts: False
  become: False
  roles:
    - role: route53
      route53_zones_to_add:
        - zone: 'zone.xxx'
          comment: 'komentarz'
          vpc_id: vpc-12345678
          vpc_region: 'eu-central-1'

      route53_records_to_add:
        - zone: 'zone.xxx'
          private_zone: True
          comment: 'komentarz strefy'
          records:
            - record: 'in.the.zone.xxx'
              type: A
              ttl: 600
              value: '1.1.1.1'

            - record: 'by.the.zone.xxx'
              type: CNAME
              ttl: 300
              value: 'in.the.zone.xxx'

            - record: 'to.the.zone.xxx'
              type: A
              value: 'in.the.zone.xxx.'
              alias: True
              alias_hosted_zone_id: 'ABCD1234567890'

      route53_records_to_remove:
        - zone: 'zone.xxx'
          private_zone: True
          records:
            - record: 'in.the.zone.xxx'
              type: A
              ttl: 600
              value: '1.1.1.1'

            - record: 'by.the.zone.xxx'
              type: CNAME
              ttl: 300
              value: 'in.the.zone.xxx'

            - record: 'to.the.zone.xxx'
              type: A
              value: 'in.the.zone.xxx'
              alias: True
              alias_hosted_zone_id: 'ABCD1234567890'

      route53_zones_to_remove:
        - zone: 'zone.xxx'

Testowanie

Jeśli chcesz uruchomić testy w dostarczonym środowisku Docker, uruchom następujące komendy:

$ cd /ścieżka/do/ansible-roles/route53
$ docker build -t ansible-roles-test tests/support
$ docker run --rm -it \
  -v $PWD:/etc/ansible/roles/route53 \
  --env AWS_ACCESS_KEY=$AWS_ACCESS_KEY \
  --env AWS_SECRET_KEY=$AWS_SECRET_KEY \
  --env AWS_REGION=$AWS_REGION \
  --workdir /etc/ansible/roles/route53/tests \
  ansible-roles-test

Do zrobienia

  • Dodać testy integracyjne dla stref prywatnych
O projekcie

Creates, updates and deletes DNS records in Route53.

Zainstaluj
ansible-galaxy install danvaida.route53
Licencja
Unknown
Pobrania
751
Właściciel
sysadmin & solutions architect