From 19d3e3d02cabf9787dc54e7a20ffb3a5a41e3040 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 13 Jan 2025 00:37:47 +0800 Subject: [PATCH 1/4] Update setup script --- inventory/hosts | 4 ++-- roles/tasks/debian/setup.yml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/inventory/hosts b/inventory/hosts index 790c142..99398b3 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -3,8 +3,8 @@ # 172.22.90.75 ansible_ssh_common_args="-o StrictHostKeyChecking=no" # Bare Metal Nodes 10.0.10.169 ansible_ssh_common_args="-o StrictHostKeyChecking=no" -# 10.0.10.4 ansible_ssh_common_args="-o StrictHostKeyChecking=no" -# 10.0.10.141 ansible_ssh_common_args="-o StrictHostKeyChecking=no" +10.0.10.4 ansible_ssh_common_args="-o StrictHostKeyChecking=no" +10.0.10.141 ansible_ssh_common_args="-o StrictHostKeyChecking=no" # 10.0.10.64 ansible_ssh_common_args="-o StrictHostKeyChecking=no" [openwrt] diff --git a/roles/tasks/debian/setup.yml b/roles/tasks/debian/setup.yml index e42b51a..0f3094d 100644 --- a/roles/tasks/debian/setup.yml +++ b/roles/tasks/debian/setup.yml @@ -62,6 +62,11 @@ state: latest - name: Install ACME shell: curl https://get.acme.sh | sh -s email="{{ ACME_EMAIL }}" + - name: Ensure ACME directory exists + file: + path: ~/.acme.sh/.ssh/ + state: directory + mode: "0700" - name: Enable Syncthing Service command: systemctl enable syncthing@root.service - name: Start Syncthing Service From 0021833b441cf039a5e0255031e9b7ab065c3e77 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 13 Jan 2025 00:49:33 +0800 Subject: [PATCH 2/4] Remove OpenWRT templating for playbooks and fix update playbook --- inventory/group_vars/openwrt.yml | 1 - inventory/hosts | 7 ------- roles/tasks/debian/update.yml | 1 + 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 inventory/group_vars/openwrt.yml diff --git a/inventory/group_vars/openwrt.yml b/inventory/group_vars/openwrt.yml deleted file mode 100644 index 3e28929..0000000 --- a/inventory/group_vars/openwrt.yml +++ /dev/null @@ -1 +0,0 @@ -# OpenWRT-specific variables go here diff --git a/inventory/hosts b/inventory/hosts index 99398b3..79d0a7c 100644 --- a/inventory/hosts +++ b/inventory/hosts @@ -5,10 +5,3 @@ 10.0.10.169 ansible_ssh_common_args="-o StrictHostKeyChecking=no" 10.0.10.4 ansible_ssh_common_args="-o StrictHostKeyChecking=no" 10.0.10.141 ansible_ssh_common_args="-o StrictHostKeyChecking=no" -# 10.0.10.64 ansible_ssh_common_args="-o StrictHostKeyChecking=no" - -[openwrt] -# Not enough storage space for these devices to support Ansible -# 10.0.10.1 -# 10.0.10.2 -# 10.0.10.3 \ No newline at end of file diff --git a/roles/tasks/debian/update.yml b/roles/tasks/debian/update.yml index 2f6a90b..5253cf1 100644 --- a/roles/tasks/debian/update.yml +++ b/roles/tasks/debian/update.yml @@ -14,6 +14,7 @@ notify: Restart Docker Containers - name: Update all packages apt: + name: "*" update_cache: false autoremove: true state: latest From e304e5af8bd4be281f1174c8677848a403ce0475 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 13 Jan 2025 00:51:28 +0800 Subject: [PATCH 3/4] Clean up update playbook --- roles/tasks/debian/update.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/tasks/debian/update.yml b/roles/tasks/debian/update.yml index 5253cf1..3bc35fb 100644 --- a/roles/tasks/debian/update.yml +++ b/roles/tasks/debian/update.yml @@ -6,8 +6,7 @@ tasks: - name: Update Docker apt: - name: - - docker + name: docker update_cache: true autoremove: true state: latest From 9cdf61ff0b9da61ff7f1ba45aa2c19f3adc7cbd9 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Mon, 13 Jan 2025 00:55:24 +0800 Subject: [PATCH 4/4] Rework update playbook --- roles/tasks/debian/update.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/roles/tasks/debian/update.yml b/roles/tasks/debian/update.yml index 3bc35fb..25bf1dc 100644 --- a/roles/tasks/debian/update.yml +++ b/roles/tasks/debian/update.yml @@ -10,7 +10,6 @@ update_cache: true autoremove: true state: latest - notify: Restart Docker Containers - name: Update all packages apt: name: "*" @@ -19,8 +18,5 @@ state: latest - name: Update ACME command: /root/.acme.sh/acme.sh --upgrade --auto-upgrade - - handlers: - # Restart Docker Containers on Docker Update - - name: Restart Docker Containers + - name: Restart All Services command: bash "/root/scripts/start_services.sh"