From c4d9e80c93b8249ea284aaf975e8639ff59024e8 Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 5 Nov 2025 19:11:44 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Update=20setupacdc.yml?= =?UTF-8?q?=20to=20include=20Ubuntu=20release=20upgrade=20and=20kernel=20r?= =?UTF-8?q?eboot=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added new steps to the setupacdc.yml file to ensure a more robust Ubuntu installation process, including running the `do-release-upgrade` command and rebooting if a kernel update occurs. This change aims to improve the overall stability of the Samba AD DC role deployment. --- tasks/setupacdc.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index 4276c86..a0f6d79 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -151,6 +151,26 @@ notify: Restart sshd tags: [timezone] + - name: Ensure update-manager-core is installed + ansible.builtin.apt: + name: update-manager-core + state: present + update_cache: true + + - name: Run Ubuntu release upgrade (non-interactive) + ansible.builtin.command: + cmd: do-release-upgrade -f DistUpgradeViewNonInteractive + register: upgrade_output + changed_when: "'No new release found' not in upgrade_output.stdout" + + - name: Reboot if kernel updated + ansible.builtin.reboot: + msg: "Rebooting after Ubuntu upgrade" + connect_timeout: 5 + reboot_timeout: 600 + when: upgrade_output is changed + + - name: Deploy the Samba AD DC role ansible.builtin.include_role: name: ansible_samba_ad_dc