diff --git a/ingress.tjo.cloud/root/usr/local/bin/dyndns b/ingress.tjo.cloud/root/usr/local/bin/dyndns index 56680ae..45d7d25 100755 --- a/ingress.tjo.cloud/root/usr/local/bin/dyndns +++ b/ingress.tjo.cloud/root/usr/local/bin/dyndns @@ -193,8 +193,8 @@ while (true); do log::info "type=A Checking for stale records..." echo "$domain_records" | jq -r ".data[] | select(.type == \"A\" and .name != \"$CLOUD_REGION\") | .id" | while read -r record_id; do - record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .name") - record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .content") + record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .name") + record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .content") log::info "type=A domain=$record_name ip=$record_ip Checking..." if ! healthcheck "$record_ip"; then log::warn "type=A domain=$record_name ip=$record_ip Unhealthy..." @@ -206,8 +206,8 @@ while (true); do log::info "type=AAAA Checking for stale records..." echo "$domain_records" | jq -r ".data[] | select(.type == \"AAAA\" and .name != \"$CLOUD_REGION\") | .id" | while read -r record_id; do - record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .name") - record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .content") + record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .name") + record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .content") log::info "type=AAAA domain=$record_name ip=$record_ip Checking..." if ! healthcheck "[$record_ip]"; then log::warn "type=AAAA domain=$record_name ip=$record_ip Unhealthy..." diff --git a/ingress.tjo.cloud/terraform/node.tf b/ingress.tjo.cloud/terraform/node.tf index 4a40e3c..a6ed385 100644 --- a/ingress.tjo.cloud/terraform/node.tf +++ b/ingress.tjo.cloud/terraform/node.tf @@ -62,6 +62,9 @@ resource "proxmox_virtual_environment_file" "userdata" { - qemu-guest-agent power_state: mode: reboot + swap: + filename: /swapfile + size: 512M runcmd: - git clone --depth 1 --no-checkout --filter=tree:0 https://github.com/tjo-space/tjo-cloud-infrastructure.git /srv - cd /srv && git sparse-checkout set --no-cone /ingress.tjo.cloud && git checkout