From 32a0f305204d4f0c759688ed2b517c63df37d65e Mon Sep 17 00:00:00 2001 From: Jose Date: Wed, 5 Nov 2025 19:22:41 +0100 Subject: [PATCH] =?UTF-8?q?chore=20=F0=9F=93=A6:=20Refactored=20package=20?= =?UTF-8?q?installation=20and=20update=20logic=20for=20consistency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplified the setupacdc.yml file by removing redundant tasks and improving readability. This change ensures that all necessary packages are installed and updated correctly, making it easier to maintain the configuration. --- tasks/setupacdc.yml | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/tasks/setupacdc.yml b/tasks/setupacdc.yml index e2f3498..9e11dbc 100644 --- a/tasks/setupacdc.yml +++ b/tasks/setupacdc.yml @@ -129,28 +129,6 @@ # state: present # loop: '{{ ssh_public_keys }}' - - name: Install useful packages - ansible.builtin.package: - name: - - nano - - tzdata - # - openssh-server - state: present - - - name: Update all packages, autoclean, and autoremove - ansible.builtin.apt: - name: '*' - state: latest - autoclean: yes - autoremove: yes - purge: true - - - name: Set timezone to {{ localization_timezone }} - community.general.timezone: - name: '{{ localization_timezone }}' - notify: Restart sshd - tags: [timezone] - - name: Update apt cache ansible.builtin.apt: update_cache: true @@ -186,6 +164,29 @@ # reboot_timeout: 600 # when: upgrade_output is changed + - name: Install useful packages + ansible.builtin.package: + name: + - nano + - tzdata + # - openssh-server + state: present + + - name: Update all packages, autoclean, and autoremove + ansible.builtin.apt: + name: '*' + state: latest + autoclean: yes + autoremove: yes + purge: true + + - name: Set timezone to {{ localization_timezone }} + community.general.timezone: + name: '{{ localization_timezone }}' + notify: Restart sshd + tags: [timezone] + + - name: Deploy the Samba AD DC role ansible.builtin.include_role: