fix: fix os specific tasks
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/notify Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-09-25 22:27:12 +02:00
parent fc14afec55
commit 30612d3c82
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 30 additions and 19 deletions

12
tasks/debian.yml Normal file
View File

@ -0,0 +1,12 @@
---
- name: Uninstall packages
ansible.builtin.package:
name: "{{ item }}"
state: absent
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
- name: Install common packages
ansible.builtin.package:
name: "{{ item }}"
state: present
loop: "{{ packages_install + packages_install_extra }}"

View File

@ -6,24 +6,10 @@
loop: "{{ packages_uninstall_pre + packages_uninstall_pre_extra }}"
- name: Include OS specific tasks
ansible.builtin.include_tasks:
file: "{{ item }}"
with_first_found:
- paths:
- "tasks"
ansible.builtin.include_tasks: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_os_family | lower }}.yml"
skip: True
- name: Uninstall packages
ansible.builtin.package:
name: "{{ item }}"
state: absent
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
- name: Install packages
ansible.builtin.package:
name: "{{ item }}"
enablerepo: "{{ packages_enablerepo }}"
state: present
loop: "{{ packages_install + packages_install_extra }}"
paths:
- "tasks"

View File

@ -33,3 +33,16 @@
notify:
- __packages_upgrade
- __packages_clean_metadata
- name: Uninstall packages
ansible.builtin.package:
name: "{{ item }}"
state: absent
loop: "{{ packages_uninstall + packages_uninstall_extra }}"
- name: Install common packages
ansible.builtin.package:
name: "{{ item }}"
enablerepo: "{{ packages_enablerepo }}"
state: present
loop: "{{ packages_install + packages_install_extra }}"