From bfce9e1cbfb9981825910004e9617567ad41bcd9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 26 Apr 2020 15:37:28 +0100 Subject: [PATCH] Host statping outside home --- ansible/main.yml | 1 + ansible/roles/intersect-docker/tasks/main.yml | 3 --- .../files}/docker-compose.yml | 15 --------------- .../statping.yml => statping/tasks/main.yml} | 8 ++++---- terraform/theorangeone.net.tf | 2 +- 5 files changed, 6 insertions(+), 23 deletions(-) rename ansible/roles/{intersect-docker/files/statping => statping/files}/docker-compose.yml (61%) rename ansible/roles/{intersect-docker/tasks/statping.yml => statping/tasks/main.yml} (79%) diff --git a/ansible/main.yml b/ansible/main.yml index 863f917..3992c84 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -34,3 +34,4 @@ - hosts: grimes roles: - website + - statping diff --git a/ansible/roles/intersect-docker/tasks/main.yml b/ansible/roles/intersect-docker/tasks/main.yml index 456a3fd..8282bb9 100644 --- a/ansible/roles/intersect-docker/tasks/main.yml +++ b/ansible/roles/intersect-docker/tasks/main.yml @@ -28,9 +28,6 @@ - name: Install quassel include: quassel.yml -- name: Install statping - include: statping.yml - - name: Install synapse include: synapse.yml diff --git a/ansible/roles/intersect-docker/files/statping/docker-compose.yml b/ansible/roles/statping/files/docker-compose.yml similarity index 61% rename from ansible/roles/intersect-docker/files/statping/docker-compose.yml rename to ansible/roles/statping/files/docker-compose.yml index adaf06c..da7f4ed 100644 --- a/ansible/roles/intersect-docker/files/statping/docker-compose.yml +++ b/ansible/roles/statping/files/docker-compose.yml @@ -21,18 +21,3 @@ services: environment: - POSTGRES_PASSWORD=statping - POSTGRES_USER=statping - - db-backups: - image: prodrigestivill/postgres-backup-local:12-alpine - restart: unless-stopped - volumes: - - /scratch/db-backups:/backups - depends_on: - - db - environment: - - POSTGRES_HOST=db - - POSTGRES_PASSWORD=statping - - POSTGRES_USER=statping - - POSTGRES_DB=statping - - BACKUP_KEEP_MONTHS=1 - - BACKUP_KEEP_WEEKS=1 diff --git a/ansible/roles/intersect-docker/tasks/statping.yml b/ansible/roles/statping/tasks/main.yml similarity index 79% rename from ansible/roles/intersect-docker/tasks/statping.yml rename to ansible/roles/statping/tasks/main.yml index 993ee81..5a06189 100644 --- a/ansible/roles/intersect-docker/tasks/statping.yml +++ b/ansible/roles/statping/tasks/main.yml @@ -1,4 +1,4 @@ -- name: Create statping directory +- name: Create install directory file: path: /opt/statping state: directory @@ -6,9 +6,9 @@ mode: "{{ docker_compose_directory_mask }}" become: true -- name: Install statping compose file +- name: Install compose file template: - src: files/statping/docker-compose.yml + src: files/docker-compose.yml dest: /opt/statping/docker-compose.yml mode: "{{ docker_compose_file_mask }}" owner: "{{ docker_user.name }}" @@ -16,7 +16,7 @@ register: compose_file become: true -- name: Cycle statping container +- name: Cycle container docker_compose: project_src: /opt/statping pull: true diff --git a/terraform/theorangeone.net.tf b/terraform/theorangeone.net.tf index 0a5f4bf..16c4e5a 100644 --- a/terraform/theorangeone.net.tf +++ b/terraform/theorangeone.net.tf @@ -21,7 +21,7 @@ resource "cloudflare_record" "theorangeonenet_go" { resource "cloudflare_record" "theorangeonenet_stats" { zone_id = cloudflare_zone.theorangeonenet.id name = "stats" - value = vultr_server.casey.main_ip + value = vultr_server.grimes.main_ip type = "A" ttl = 1 }