From fce52683fb2a93c81555e24db2e173982b54a51c Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 17 Apr 2022 16:42:39 -0700 Subject: [PATCH 1/2] + main.yml is now fresh.yml for clarity main.yml was really only ever going to be used in case of fresh installs anyway so this change aims to make that intention clear --- docker-host/setup/tasks/fresh.yml | 23 +++++++++++++++++++++++ docker-host/setup/tasks/main.yml | 11 ----------- 2 files changed, 23 insertions(+), 11 deletions(-) create mode 100644 docker-host/setup/tasks/fresh.yml delete mode 100644 docker-host/setup/tasks/main.yml diff --git a/docker-host/setup/tasks/fresh.yml b/docker-host/setup/tasks/fresh.yml new file mode 100644 index 0000000..99e0138 --- /dev/null +++ b/docker-host/setup/tasks/fresh.yml @@ -0,0 +1,23 @@ +# Setup a brand new system from the ground up. +--- +- hosts: leftcoastlab + tasks: + - name: Import Global Vars + include_vars: + dir: ../vars + + +# System pre-reqs +- import_playbook: 'system-update.yml' +- import_playbook: 'install-docker.yml' +- import_playbook: 'dns.yml' +# Logging stack +- import_playbook: 'install-loki-logger.yml' +- import_playbook: 'grafana.yml' +# For host metrics +- import_playbook: 'vector.yml' +# Containerized services +- import_playbook: 'file-server.yml' +- import_playbook: 'git-stack.yml' +- import_playbook: 'subsonic.yml' +- import_playbook: 'nginx.yml' diff --git a/docker-host/setup/tasks/main.yml b/docker-host/setup/tasks/main.yml deleted file mode 100644 index ab15c3c..0000000 --- a/docker-host/setup/tasks/main.yml +++ /dev/null @@ -1,11 +0,0 @@ -# ---- -- hosts: leftcoastlab - tasks: - - name: Import Global Vars - include_vars: - dir: ../vars - - -- import_playbook: 'system-update.yml' -- import_playbook: 'install-docker.yml' From ace457509cf2a247112548572360a0d76c802732 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 17 Apr 2022 16:43:02 -0700 Subject: [PATCH 2/2] + Loki logging plugin installation --- docker-host/setup/tasks/install-loki-logger.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docker-host/setup/tasks/install-loki-logger.yml diff --git a/docker-host/setup/tasks/install-loki-logger.yml b/docker-host/setup/tasks/install-loki-logger.yml new file mode 100644 index 0000000..b66df14 --- /dev/null +++ b/docker-host/setup/tasks/install-loki-logger.yml @@ -0,0 +1,12 @@ +# This playbook installs the loki docker plugin which allows other docker based +# services to do they're regular logging actions but centralize them +--- +- hosts: leftcoastlab + become: yes + tasks: + # --grant-all-permissions is the default for ansible + - name: Install Loki Docker Plugin + community.docker.docker_plugin: + plugin_name: grafana/loki-docker-driver:latest + state: enabled + alias: loki \ No newline at end of file