refactor ♻️: Simplify setupacdc.yml by removing unnecessary tasks

Refactored the setupacdc.yml to remove redundant tasks and improve readability. This change simplifies the deployment process for Samba AD DC role.
This commit is contained in:
2025-11-05 19:19:15 +01:00
parent a50362b9cf
commit 495cf1c384

View File

@@ -168,23 +168,23 @@
when: ansible_facts.packages is not defined or
ansible_facts.packages['linux-image-generic'] is defined
- name: Ensure update-manager-core is installed
ansible.builtin.apt:
name: update-manager-core
state: present
# - name: Ensure update-manager-core is installed
# ansible.builtin.apt:
# name: update-manager-core
# state: present
- name: Perform Ubuntu release upgrade non-interactively
ansible.builtin.command:
cmd: do-release-upgrade -f DistUpgradeViewNonInteractive
register: upgrade_output
changed_when: "'No new release found' not in upgrade_output.stdout"
# - name: Perform Ubuntu release upgrade non-interactively
# 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: 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