--- - name: "Create DO DNS entry for <{{ record_name }}.{{ domain }}> to <{{ record_data }}> if necessary" community.digitalocean.digital_ocean_domain_record: oauth_token: "{{ digitalocean_authentication_token }}" state: "{{ record_state | default('present') }}" domain: "{{ domain }}" type: A name: "{{ record_name }}" data: "{{ record_data }}" ttl: "{{ dns_ttl | default(1800) }}" delegate_to: localhost become: false when: - dns == 'digitalocean' tags: - update_dns - name: "Create Hetzner DNS entry for <{{ record_name }}.{{ domain }}> to <{{ record_data }}> if necessary" community.dns.hetzner_dns_record: hetzner_token: "{{ hetzner_dns_api_key }}" state: "{{ record_state | default('present') }}" zone: "{{ domain }}" type: A record: "{{ record_name }}.{{ domain }}" ttl: "{{ sma_digitalocean_ttl | default(1800) }}" value: "{{ stage_server_ip }}" delegate_to: localhost become: false when: - dns == 'hetzner' tags: - update_dns