From afd64caebdb564a184fe74e708ff2bd82ef9887f Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 11 Feb 2024 15:10:38 -0800 Subject: [PATCH] Moving setup into its own role, where we just set up the system configuuration for running k3s' --- .../{ => roles}/setup/defaults/main.yml | 0 .../{ => roles}/setup/files/default.lablad | 0 docker-host/roles/setup/files/etc/hosts | 18 ++++++++++++++++++ .../{ => roles}/setup/files/files.lablad | 0 docker-host/{ => roles}/setup/files/git.lablad | 0 .../{ => roles}/setup/files/home.lablad | 0 .../{ => roles}/setup/files/metrics.lablad | 0 .../{ => roles}/setup/files/music.lablad | 0 .../setup/files/services/node_exporter.service | 0 .../{ => roles}/setup/files/todo.lablad | 0 .../{ => roles}/setup/files/vault-config.json | 0 .../{ => roles}/setup/files/vault.lablad | 0 .../setup/handlers/docker-cleanup.yml | 0 .../{ => roles}/setup/handlers/nginx.yml | 0 docker-host/{ => roles}/setup/meta/main.yml | 0 docker-host/{ => roles}/setup/tasks/dns.yml | 0 .../{ => roles}/setup/tasks/file-server.yml | 0 docker-host/{ => roles}/setup/tasks/fresh.yml | 0 .../{ => roles}/setup/tasks/git-stack.yml | 0 .../{ => roles}/setup/tasks/grafana.yml | 0 .../{ => roles}/setup/tasks/install-docker.yml | 0 .../setup/tasks/install-loki-logger.yml | 0 .../{ => roles}/setup/tasks/kanboard.yml | 0 .../{ => roles}/setup/tasks/landing-page.yml | 0 docker-host/{ => roles}/setup/tasks/nginx.yml | 0 .../{ => roles}/setup/tasks/prometheus.yml | 0 .../{ => roles}/setup/tasks/subsonic.yml | 0 .../{ => roles}/setup/tasks/system-update.yml | 0 docker-host/{ => roles}/setup/tasks/vault.yml | 0 .../setup/templates/prometheus.yml.j2 | 0 .../{ => roles}/setup/templates/proxy.conf.j2 | 0 .../setup/templates/vault-config.json.j2 | 0 docker-host/{ => roles}/setup/tests/test.yml | 0 docker-host/{ => roles}/setup/vars/main.yml | 0 docker-host/roles/setup/vars/private.yml | 4 ++++ 35 files changed, 22 insertions(+) rename docker-host/{ => roles}/setup/defaults/main.yml (100%) rename docker-host/{ => roles}/setup/files/default.lablad (100%) create mode 100644 docker-host/roles/setup/files/etc/hosts rename docker-host/{ => roles}/setup/files/files.lablad (100%) rename docker-host/{ => roles}/setup/files/git.lablad (100%) rename docker-host/{ => roles}/setup/files/home.lablad (100%) rename docker-host/{ => roles}/setup/files/metrics.lablad (100%) rename docker-host/{ => roles}/setup/files/music.lablad (100%) rename docker-host/{ => roles}/setup/files/services/node_exporter.service (100%) rename docker-host/{ => roles}/setup/files/todo.lablad (100%) rename docker-host/{ => roles}/setup/files/vault-config.json (100%) rename docker-host/{ => roles}/setup/files/vault.lablad (100%) rename docker-host/{ => roles}/setup/handlers/docker-cleanup.yml (100%) rename docker-host/{ => roles}/setup/handlers/nginx.yml (100%) rename docker-host/{ => roles}/setup/meta/main.yml (100%) rename docker-host/{ => roles}/setup/tasks/dns.yml (100%) rename docker-host/{ => roles}/setup/tasks/file-server.yml (100%) rename docker-host/{ => roles}/setup/tasks/fresh.yml (100%) rename docker-host/{ => roles}/setup/tasks/git-stack.yml (100%) rename docker-host/{ => roles}/setup/tasks/grafana.yml (100%) rename docker-host/{ => roles}/setup/tasks/install-docker.yml (100%) rename docker-host/{ => roles}/setup/tasks/install-loki-logger.yml (100%) rename docker-host/{ => roles}/setup/tasks/kanboard.yml (100%) rename docker-host/{ => roles}/setup/tasks/landing-page.yml (100%) rename docker-host/{ => roles}/setup/tasks/nginx.yml (100%) rename docker-host/{ => roles}/setup/tasks/prometheus.yml (100%) rename docker-host/{ => roles}/setup/tasks/subsonic.yml (100%) rename docker-host/{ => roles}/setup/tasks/system-update.yml (100%) rename docker-host/{ => roles}/setup/tasks/vault.yml (100%) rename docker-host/{ => roles}/setup/templates/prometheus.yml.j2 (100%) rename docker-host/{ => roles}/setup/templates/proxy.conf.j2 (100%) rename docker-host/{ => roles}/setup/templates/vault-config.json.j2 (100%) rename docker-host/{ => roles}/setup/tests/test.yml (100%) rename docker-host/{ => roles}/setup/vars/main.yml (100%) create mode 100644 docker-host/roles/setup/vars/private.yml diff --git a/docker-host/setup/defaults/main.yml b/docker-host/roles/setup/defaults/main.yml similarity index 100% rename from docker-host/setup/defaults/main.yml rename to docker-host/roles/setup/defaults/main.yml diff --git a/docker-host/setup/files/default.lablad b/docker-host/roles/setup/files/default.lablad similarity index 100% rename from docker-host/setup/files/default.lablad rename to docker-host/roles/setup/files/default.lablad diff --git a/docker-host/roles/setup/files/etc/hosts b/docker-host/roles/setup/files/etc/hosts new file mode 100644 index 0000000..aae17f8 --- /dev/null +++ b/docker-host/roles/setup/files/etc/hosts @@ -0,0 +1,18 @@ +# WARN: this should never be committed to source control +# The following is used because we +# use DNSMasq for its dead simple nature + +127.0.0.1 localhost +127.0.1.1 recycled-lab-host + +# Sugma +192.168.1.23 git.lablad +192.168.1.23 files.lablad +192.168.1.23 main.lablad +192.168.1.23 music.lablad +192.168.1.1 router + +# The following lines are desirable for IPv6 capable hosts +::1 localhost ip6-localhost ip6-loopback +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters diff --git a/docker-host/setup/files/files.lablad b/docker-host/roles/setup/files/files.lablad similarity index 100% rename from docker-host/setup/files/files.lablad rename to docker-host/roles/setup/files/files.lablad diff --git a/docker-host/setup/files/git.lablad b/docker-host/roles/setup/files/git.lablad similarity index 100% rename from docker-host/setup/files/git.lablad rename to docker-host/roles/setup/files/git.lablad diff --git a/docker-host/setup/files/home.lablad b/docker-host/roles/setup/files/home.lablad similarity index 100% rename from docker-host/setup/files/home.lablad rename to docker-host/roles/setup/files/home.lablad diff --git a/docker-host/setup/files/metrics.lablad b/docker-host/roles/setup/files/metrics.lablad similarity index 100% rename from docker-host/setup/files/metrics.lablad rename to docker-host/roles/setup/files/metrics.lablad diff --git a/docker-host/setup/files/music.lablad b/docker-host/roles/setup/files/music.lablad similarity index 100% rename from docker-host/setup/files/music.lablad rename to docker-host/roles/setup/files/music.lablad diff --git a/docker-host/setup/files/services/node_exporter.service b/docker-host/roles/setup/files/services/node_exporter.service similarity index 100% rename from docker-host/setup/files/services/node_exporter.service rename to docker-host/roles/setup/files/services/node_exporter.service diff --git a/docker-host/setup/files/todo.lablad b/docker-host/roles/setup/files/todo.lablad similarity index 100% rename from docker-host/setup/files/todo.lablad rename to docker-host/roles/setup/files/todo.lablad diff --git a/docker-host/setup/files/vault-config.json b/docker-host/roles/setup/files/vault-config.json similarity index 100% rename from docker-host/setup/files/vault-config.json rename to docker-host/roles/setup/files/vault-config.json diff --git a/docker-host/setup/files/vault.lablad b/docker-host/roles/setup/files/vault.lablad similarity index 100% rename from docker-host/setup/files/vault.lablad rename to docker-host/roles/setup/files/vault.lablad diff --git a/docker-host/setup/handlers/docker-cleanup.yml b/docker-host/roles/setup/handlers/docker-cleanup.yml similarity index 100% rename from docker-host/setup/handlers/docker-cleanup.yml rename to docker-host/roles/setup/handlers/docker-cleanup.yml diff --git a/docker-host/setup/handlers/nginx.yml b/docker-host/roles/setup/handlers/nginx.yml similarity index 100% rename from docker-host/setup/handlers/nginx.yml rename to docker-host/roles/setup/handlers/nginx.yml diff --git a/docker-host/setup/meta/main.yml b/docker-host/roles/setup/meta/main.yml similarity index 100% rename from docker-host/setup/meta/main.yml rename to docker-host/roles/setup/meta/main.yml diff --git a/docker-host/setup/tasks/dns.yml b/docker-host/roles/setup/tasks/dns.yml similarity index 100% rename from docker-host/setup/tasks/dns.yml rename to docker-host/roles/setup/tasks/dns.yml diff --git a/docker-host/setup/tasks/file-server.yml b/docker-host/roles/setup/tasks/file-server.yml similarity index 100% rename from docker-host/setup/tasks/file-server.yml rename to docker-host/roles/setup/tasks/file-server.yml diff --git a/docker-host/setup/tasks/fresh.yml b/docker-host/roles/setup/tasks/fresh.yml similarity index 100% rename from docker-host/setup/tasks/fresh.yml rename to docker-host/roles/setup/tasks/fresh.yml diff --git a/docker-host/setup/tasks/git-stack.yml b/docker-host/roles/setup/tasks/git-stack.yml similarity index 100% rename from docker-host/setup/tasks/git-stack.yml rename to docker-host/roles/setup/tasks/git-stack.yml diff --git a/docker-host/setup/tasks/grafana.yml b/docker-host/roles/setup/tasks/grafana.yml similarity index 100% rename from docker-host/setup/tasks/grafana.yml rename to docker-host/roles/setup/tasks/grafana.yml diff --git a/docker-host/setup/tasks/install-docker.yml b/docker-host/roles/setup/tasks/install-docker.yml similarity index 100% rename from docker-host/setup/tasks/install-docker.yml rename to docker-host/roles/setup/tasks/install-docker.yml diff --git a/docker-host/setup/tasks/install-loki-logger.yml b/docker-host/roles/setup/tasks/install-loki-logger.yml similarity index 100% rename from docker-host/setup/tasks/install-loki-logger.yml rename to docker-host/roles/setup/tasks/install-loki-logger.yml diff --git a/docker-host/setup/tasks/kanboard.yml b/docker-host/roles/setup/tasks/kanboard.yml similarity index 100% rename from docker-host/setup/tasks/kanboard.yml rename to docker-host/roles/setup/tasks/kanboard.yml diff --git a/docker-host/setup/tasks/landing-page.yml b/docker-host/roles/setup/tasks/landing-page.yml similarity index 100% rename from docker-host/setup/tasks/landing-page.yml rename to docker-host/roles/setup/tasks/landing-page.yml diff --git a/docker-host/setup/tasks/nginx.yml b/docker-host/roles/setup/tasks/nginx.yml similarity index 100% rename from docker-host/setup/tasks/nginx.yml rename to docker-host/roles/setup/tasks/nginx.yml diff --git a/docker-host/setup/tasks/prometheus.yml b/docker-host/roles/setup/tasks/prometheus.yml similarity index 100% rename from docker-host/setup/tasks/prometheus.yml rename to docker-host/roles/setup/tasks/prometheus.yml diff --git a/docker-host/setup/tasks/subsonic.yml b/docker-host/roles/setup/tasks/subsonic.yml similarity index 100% rename from docker-host/setup/tasks/subsonic.yml rename to docker-host/roles/setup/tasks/subsonic.yml diff --git a/docker-host/setup/tasks/system-update.yml b/docker-host/roles/setup/tasks/system-update.yml similarity index 100% rename from docker-host/setup/tasks/system-update.yml rename to docker-host/roles/setup/tasks/system-update.yml diff --git a/docker-host/setup/tasks/vault.yml b/docker-host/roles/setup/tasks/vault.yml similarity index 100% rename from docker-host/setup/tasks/vault.yml rename to docker-host/roles/setup/tasks/vault.yml diff --git a/docker-host/setup/templates/prometheus.yml.j2 b/docker-host/roles/setup/templates/prometheus.yml.j2 similarity index 100% rename from docker-host/setup/templates/prometheus.yml.j2 rename to docker-host/roles/setup/templates/prometheus.yml.j2 diff --git a/docker-host/setup/templates/proxy.conf.j2 b/docker-host/roles/setup/templates/proxy.conf.j2 similarity index 100% rename from docker-host/setup/templates/proxy.conf.j2 rename to docker-host/roles/setup/templates/proxy.conf.j2 diff --git a/docker-host/setup/templates/vault-config.json.j2 b/docker-host/roles/setup/templates/vault-config.json.j2 similarity index 100% rename from docker-host/setup/templates/vault-config.json.j2 rename to docker-host/roles/setup/templates/vault-config.json.j2 diff --git a/docker-host/setup/tests/test.yml b/docker-host/roles/setup/tests/test.yml similarity index 100% rename from docker-host/setup/tests/test.yml rename to docker-host/roles/setup/tests/test.yml diff --git a/docker-host/setup/vars/main.yml b/docker-host/roles/setup/vars/main.yml similarity index 100% rename from docker-host/setup/vars/main.yml rename to docker-host/roles/setup/vars/main.yml diff --git a/docker-host/roles/setup/vars/private.yml b/docker-host/roles/setup/vars/private.yml new file mode 100644 index 0000000..b6412b8 --- /dev/null +++ b/docker-host/roles/setup/vars/private.yml @@ -0,0 +1,4 @@ +FILES_UID: 1004 +FILES_GID: 1004 +FILES_HOME: /home/files +PRIVATE_IP: 192.168.1.23 \ No newline at end of file