From d3516705ca7c64cab36e17fa81023861fcdd35ff Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 19 Nov 2022 16:36:52 +0100 Subject: ch-mimas: external_ip --- inventory/host_vars/ch-epimetheus.yml | 2 +- inventory/host_vars/ch-mimas.yml | 6 ++++-- inventory/host_vars/ch-pan.yml | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/inventory/host_vars/ch-epimetheus.yml b/inventory/host_vars/ch-epimetheus.yml index 0e583110..a4e233fa 100644 --- a/inventory/host_vars/ch-epimetheus.yml +++ b/inventory/host_vars/ch-epimetheus.yml @@ -139,7 +139,7 @@ zfs_syncoid_sources: recursive: yes skip_parent: yes 'ch-mimas': - ssh_hostname: "116.203.212.131" + ssh_hostname: "{{ hostvars['ch-mimas'].external_ip }}" ssh_port: "{{ hostvars['ch-mimas'].ansible_port }}" report_prometheus_textfile_path: "/var/lib/prometheus-node-exporter/textfile-collector" periodic: diff --git a/inventory/host_vars/ch-mimas.yml b/inventory/host_vars/ch-mimas.yml index a612565b..2bafafe1 100644 --- a/inventory/host_vars/ch-mimas.yml +++ b/inventory/host_vars/ch-mimas.yml @@ -5,6 +5,8 @@ install: token: "{{ vault_hcloud_api_token }}" server_name: "{{ host_name }}" +external_ip: "116.203.212.131" +external_ip6: "2a01:4f8:c2c:906c::2" apt_repo_provider: hetzner @@ -99,7 +101,7 @@ bind_slave_zones: - 151.33.193.in-addr.arpa -prometheus_scrape_endpoint: "116.203.212.131:9999" +prometheus_scrape_endpoint: "{{ external_ip }}:9999" prometheus_exporters_extra: - bind @@ -107,7 +109,7 @@ prometheus_exporters_extra: prometheus_job_multitarget_blackbox__probe: ch-mon: - instance: "ssh-{{ inventory_hostname }}" - target: "116.203.212.131:{{ ansible_port | default(22) }}" + target: "{{ external_ip }}:{{ ansible_port | default(22) }}" module: ssh_banner - instance: "https-mimas.chaos-at-home.org" target: "https://mimas.chaos-at-home.org" diff --git a/inventory/host_vars/ch-pan.yml b/inventory/host_vars/ch-pan.yml index c49f1401..9f18ed93 100644 --- a/inventory/host_vars/ch-pan.yml +++ b/inventory/host_vars/ch-pan.yml @@ -73,10 +73,10 @@ bind_option_empty_zones_enable: no bind_option_notify: explicit bind_option_also_notify: - - 116.203.212.131 + - "{{ hostvars['ch-mimas'].external_ip }}" bind_option_allow_transfer: - - 116.203.212.131 - - 2a01:4f8:c2c:906c::2 + - "{{ hostvars['ch-mimas'].external_ip }}" + - "{{ hostvars['ch-mimas'].external_ip6 }}" bind_option_allow_update: - none -- cgit v1.2.3