chore 📦: Update setupacdc.yml to include Ubuntu release upgrade and kernel reboot steps
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user