From 4da8c431f681d6b8009518c6766c638267d9c61a Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 28 Jan 2025 12:07:51 -0500 Subject: [PATCH] devconfig: install-deps is skipped in some configurations A recent commit replaced import_tasks with include_tasks in a few steps in the devconfig playbook. The Ansible "import_tasks" documentation says: > Tags are not interpreted for this action, they are applied to the > imported tasks Revert some of the import_tasks conversions to ensure those steps are run according to the command-line tag settings. For the original problem that I tripped on, add tags to ensure those sub-steps get run as needed. Reported-by: Joel Granados Closes: https://lore.kernel.org/kdevops/20250128112453.rawxqvpffxwupvco@AALNPWDAGOMEZ1.aal.scsc.local/T/#t Fixes: ec9a34eb6b8e ("devconfig: Replace import_tasks with include_tasks") Reviewed-by: Daniel Gomez Tested-by: Daniel Gomez Signed-off-by: Chuck Lever --- playbooks/roles/devconfig/tasks/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/playbooks/roles/devconfig/tasks/main.yml b/playbooks/roles/devconfig/tasks/main.yml index 51b89037..84c5fa1f 100644 --- a/playbooks/roles/devconfig/tasks/main.yml +++ b/playbooks/roles/devconfig/tasks/main.yml @@ -32,9 +32,10 @@ # Distro specific - name: Install dependencies ansible.builtin.include_tasks: install-deps/main.yml + tags: ['vars', 'vars_simple'] - name: Configure custom repositories and install packages - ansible.builtin.include_tasks: config-custom-repos-and-packages/main.yml + ansible.builtin.import_tasks: config-custom-repos-and-packages/main.yml when: - ansible_facts['os_family']|lower == 'redhat' @@ -447,7 +448,7 @@ tags: [ 'console' ] - name: Update your boot GRUB file if necessary - ansible.builtin.include_tasks: update-grub/main.yml + ansible.builtin.import_tasks: update-grub/main.yml when: - grub2_config_file.stat.exists - devconfig_enable_console|bool @@ -637,7 +638,7 @@ tags: [ 'sysctl' ] - name: Rev the kernel to the latest distribution kotd - ansible.builtin.include_tasks: kotd-rev-kernel/main.yml + ansible.builtin.import_tasks: kotd-rev-kernel/main.yml when: - devconfig_enable_kotd|bool tags: [ 'kotd' ]