From 33cf371a0d4cb7726dcbbb29d037623d1b427b78 Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Mon, 1 Apr 2024 00:53:08 -0500 Subject: [PATCH] Updating roles --- roles/Node/tasks/main.yml | 8 ++++++++ roles/patching/tasks/main.yml | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/roles/Node/tasks/main.yml b/roles/Node/tasks/main.yml index d266b9c..26a4bb0 100644 --- a/roles/Node/tasks/main.yml +++ b/roles/Node/tasks/main.yml @@ -61,3 +61,11 @@ when: qemubr.changed or br0.changed debug: msg: You may need to restart VMs on the Node. + + - name: Enable VMs + become: yes + with_items: "{{ active_vms }}" + service: + name: "{{ item }}-vm.service" + state: started + enabled: yes diff --git a/roles/patching/tasks/main.yml b/roles/patching/tasks/main.yml index a1b4a88..c048282 100644 --- a/roles/patching/tasks/main.yml +++ b/roles/patching/tasks/main.yml @@ -1,12 +1,12 @@ - name: Check /var free percentage - command: /bin/bash -c "df -m /var | tail -n 1 | awk '{ print $5; }' | sed 's/%//' " + command: /bin/bash -c "df -m /var | tail -n 1 | awk '{ print \$5; }' | sed 's/%//'" become: no register: df_output - name: Verify /var space assert: that: - - 90 > {{ df_output.stdout }} + - 90 > df_output.stdout|int fail_msg: "Not enough free space" - name: Update Archlinux Keyring @@ -31,4 +31,3 @@ when: '"linux" in updates.stdout or "kernel" in updates.stdout' reboot: reboot_timeout: 2 -