From 1d997d3c33e57f15ce4268a3c36691da4bbf249d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 27 Mar 2021 18:42:06 +0000 Subject: [PATCH] Remove separate private and protected IP --- ansible/group_vars/all/network.yml | 1 - ansible/group_vars/all/pve.yml | 17 +++++++---------- ansible/host_vars/forrest.yml | 2 +- ansible/host_vars/pve-docker.yml | 1 - ansible/host_vars/pve.yml | 1 - .../roles/duplicati/files/docker-compose.yml | 2 +- .../forrest/files/grafana/docker-compose.yml | 2 +- .../forrest/files/influxdb/docker-compose.yml | 2 +- .../forrest/files/prometheus/docker-compose.yml | 2 +- ansible/roles/pve_nebula_route/tasks/main.yml | 2 +- ansible/roles/telegraf/files/telegraf.conf | 2 +- .../traefik/files/file-provider-grafana.yml | 2 +- .../traefik/files/file-provider-jellyfin.yml | 2 +- 13 files changed, 16 insertions(+), 22 deletions(-) diff --git a/ansible/group_vars/all/network.yml b/ansible/group_vars/all/network.yml index 83675d4..66a2abc 100644 --- a/ansible/group_vars/all/network.yml +++ b/ansible/group_vars/all/network.yml @@ -1,2 +1 @@ private_ip: "{{ nebula.clients[ansible_hostname].ip }}" -protected_ip: "{{ private_ip }}" diff --git a/ansible/group_vars/all/pve.yml b/ansible/group_vars/all/pve.yml index e0c9cde..73a896b 100644 --- a/ansible/group_vars/all/pve.yml +++ b/ansible/group_vars/all/pve.yml @@ -1,20 +1,17 @@ pve_hosts: internal_cidr: 10.23.1.0/24 ingress: - ip: 192.168.2.201 - internal_ip: 10.23.1.88 + ip: 10.23.1.88 jellyfin: - ip: 192.168.2.46 - internal_ip: 10.23.1.29 + ip: 10.23.1.29 pve_docker: - ip: 192.168.2.47 - internal_ip: 10.23.1.7 + ip: 10.23.1.7 homeassistant: ip: 192.168.2.41 forrest: - internal_ip: 10.23.1.99 + ip: 10.23.1.99 deluge: - internal_ip: 10.23.1.52 + ip: 10.23.1.52 pve: - internal_ip: 10.23.1.1 - ip: 192.168.2.200 + ip: 10.23.1.1 + external_ip: 192.168.2.200 diff --git a/ansible/host_vars/forrest.yml b/ansible/host_vars/forrest.yml index 65e9214..21f600f 100644 --- a/ansible/host_vars/forrest.yml +++ b/ansible/host_vars/forrest.yml @@ -1 +1 @@ -protected_ip: "{{ pve_hosts.forrest.internal_ip }}" +private_ip: "{{ pve_hosts.forrest.ip }}" diff --git a/ansible/host_vars/pve-docker.yml b/ansible/host_vars/pve-docker.yml index a71b000..a6dbb2c 100644 --- a/ansible/host_vars/pve-docker.yml +++ b/ansible/host_vars/pve-docker.yml @@ -1,5 +1,4 @@ private_ip: "{{ pve_hosts.pve_docker.ip }}" -protected_ip: "{{ pve_hosts.pve_docker.internal_ip }}" traefik_provider_jellyfin: true traefik_provider_homeassistant: true diff --git a/ansible/host_vars/pve.yml b/ansible/host_vars/pve.yml index a9db0a6..d5435c3 100644 --- a/ansible/host_vars/pve.yml +++ b/ansible/host_vars/pve.yml @@ -1,5 +1,4 @@ private_ip: "{{ pve_hosts.pve.ip }}" -protected_ip: "{{ pve_hosts.pve.internal_ip }}" zpools_to_scrub: - tank diff --git a/ansible/roles/duplicati/files/docker-compose.yml b/ansible/roles/duplicati/files/docker-compose.yml index 5ea67db..0cb58f6 100644 --- a/ansible/roles/duplicati/files/docker-compose.yml +++ b/ansible/roles/duplicati/files/docker-compose.yml @@ -13,4 +13,4 @@ services: - /:/source:ro restart: unless-stopped ports: - - "{{ protected_ip }}:8200:8200" + - "{{ private_ip }}:8200:8200" diff --git a/ansible/roles/forrest/files/grafana/docker-compose.yml b/ansible/roles/forrest/files/grafana/docker-compose.yml index 15f3fa4..865100a 100644 --- a/ansible/roles/forrest/files/grafana/docker-compose.yml +++ b/ansible/roles/forrest/files/grafana/docker-compose.yml @@ -24,7 +24,7 @@ services: - grafana restart: unless-stopped ports: - - "{{ protected_ip }}:3000:3000" + - "{{ private_ip }}:3000:3000" depends_on: - db - renderer diff --git a/ansible/roles/forrest/files/influxdb/docker-compose.yml b/ansible/roles/forrest/files/influxdb/docker-compose.yml index 0aafbbc..1ab30c9 100644 --- a/ansible/roles/forrest/files/influxdb/docker-compose.yml +++ b/ansible/roles/forrest/files/influxdb/docker-compose.yml @@ -22,7 +22,7 @@ services: volumes: - ./chronograf:/var/lib/chronograf ports: - - "{{ protected_ip }}:8888:8888" + - "{{ private_ip }}:8888:8888" networks: grafana: diff --git a/ansible/roles/forrest/files/prometheus/docker-compose.yml b/ansible/roles/forrest/files/prometheus/docker-compose.yml index 005f06a..75398dc 100644 --- a/ansible/roles/forrest/files/prometheus/docker-compose.yml +++ b/ansible/roles/forrest/files/prometheus/docker-compose.yml @@ -12,7 +12,7 @@ services: - prometheus - grafana ports: - - "{{ protected_ip }}:9090:9090" + - "{{ private_ip }}:9090:9090" networks: prometheus: diff --git a/ansible/roles/pve_nebula_route/tasks/main.yml b/ansible/roles/pve_nebula_route/tasks/main.yml index f5d6a78..85f32a5 100644 --- a/ansible/roles/pve_nebula_route/tasks/main.yml +++ b/ansible/roles/pve_nebula_route/tasks/main.yml @@ -17,6 +17,6 @@ - add - "{{ nebula.cidr }}" - via - - "{{ pve_hosts.ingress.internal_ip }}" + - "{{ pve_hosts.ingress.ip }}" become: true when: nebula.cidr not in routes.stdout diff --git a/ansible/roles/telegraf/files/telegraf.conf b/ansible/roles/telegraf/files/telegraf.conf index 24d2da9..b4c078d 100644 --- a/ansible/roles/telegraf/files/telegraf.conf +++ b/ansible/roles/telegraf/files/telegraf.conf @@ -85,7 +85,7 @@ ############################################################################### [[outputs.prometheus_client]] - listen = "{{ protected_ip }}:9273" + listen = "{{ private_ip }}:9273" metric_version = 2 ############################################################################### diff --git a/ansible/roles/traefik/files/file-provider-grafana.yml b/ansible/roles/traefik/files/file-provider-grafana.yml index 9abd82b..872a420 100644 --- a/ansible/roles/traefik/files/file-provider-grafana.yml +++ b/ansible/roles/traefik/files/file-provider-grafana.yml @@ -9,4 +9,4 @@ http: service-grafana: loadBalancer: servers: - - url: http://{{ pve_hosts.forrest.internal_ip }}:3000 + - url: http://{{ pve_hosts.forrest.ip }}:3000 diff --git a/ansible/roles/traefik/files/file-provider-jellyfin.yml b/ansible/roles/traefik/files/file-provider-jellyfin.yml index 18e6f8c..0b7c1a5 100644 --- a/ansible/roles/traefik/files/file-provider-jellyfin.yml +++ b/ansible/roles/traefik/files/file-provider-jellyfin.yml @@ -9,4 +9,4 @@ http: service-jellyfin: loadBalancer: servers: - - url: http://{{ pve_hosts.jellyfin.internal_ip }}:8096 + - url: http://{{ pve_hosts.jellyfin.ip }}:8096