From 37e93cced23e0ee726309e841b1dac19e9ccdac4 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 26 Dec 2018 11:02:22 +0100 Subject: o Working borg setup. --- ansible/roles/linode-dns-update/templates/linode-dns-update.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ansible/roles/linode-dns-update/templates') diff --git a/ansible/roles/linode-dns-update/templates/linode-dns-update.j2 b/ansible/roles/linode-dns-update/templates/linode-dns-update.j2 index 97ab7c9..975c061 100644 --- a/ansible/roles/linode-dns-update/templates/linode-dns-update.j2 +++ b/ansible/roles/linode-dns-update/templates/linode-dns-update.j2 @@ -35,11 +35,12 @@ domain_resource_update "$DOMAIN_ID" "{{ linode_dns__ipv4_resource }}" "A" "[remo {% if linode_dns__ipv6_resource is defined %} q='' #q='map(select(.ifname=="wlx00e01d0808b2"))' -q='map(.addr_info) | flatten | map(select(.scope=="global" and .deprecated != true and .mngtmpaddr != true) | .local) | first' +q='map(.addr_info) | flatten | map(select(.scope=="global" and .deprecated != true and .mngtmpaddr != true and (.local|test("^fd")|not)) | .local) | first' ip=$(ip -6 -json addr | jq -r -c "$q") if [[ ! -z $ip ]] then + echo "Setting IPv6 to $ip." domain_resource_update "$DOMAIN_ID" "{{ linode_dns__ipv6_resource }}" "AAAA" "$ip" fi {% endif %} -- cgit v1.2.3