From 50503b1435594f94e1248aeeb5e4803e3ea46f2e Mon Sep 17 00:00:00 2001 From: ilia Date: Tue, 26 Aug 2025 22:59:22 -0400 Subject: [PATCH] Update hosts file to include skip_reboot flag for debianDesktopVM and modify reboot condition in maintenance tasks to respect skip_reboot variable. --- hosts | 2 +- roles/maintenance/tasks/main.yml | 4 +++- roles/user/tasks/main.yml | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hosts b/hosts index 305305f..c1b5a9b 100644 --- a/hosts +++ b/hosts @@ -10,7 +10,7 @@ homepageVM ansible_host=10.0.10.30 [dev] devVM ansible_host=10.0.30.105 ansible_user=ladmin bottom ansible_host=10.0.10.156 ansible_user=beast -debianDesktopVM ansible_host=10.0.10.206 ansible_user=user +debianDesktopVM ansible_host=10.0.10.206 ansible_user=user skip_reboot=true [ansible] ansible-controlVM ansible_host=localhost ansible_user=master diff --git a/roles/maintenance/tasks/main.yml b/roles/maintenance/tasks/main.yml index c853b41..737ef29 100644 --- a/roles/maintenance/tasks/main.yml +++ b/roles/maintenance/tasks/main.yml @@ -18,4 +18,6 @@ - name: Reboot if tasks changed things reboot: msg: "Reboot triggered by Ansible after system changes." - when: ansible_facts['pkg_mgr'] == "apt" + when: + - ansible_facts['pkg_mgr'] == "apt" + - skip_reboot is not defined or skip_reboot != true diff --git a/roles/user/tasks/main.yml b/roles/user/tasks/main.yml index 5d94331..43258ac 100644 --- a/roles/user/tasks/main.yml +++ b/roles/user/tasks/main.yml @@ -4,4 +4,3 @@ name: "{{ ansible_user }}" state: present shell: /bin/bash -