change layout for better management

- instead of just `syspkgs` and `srcpkgs` add more lists
  - `appimages`, `flatpkgs` and others as they come up
This commit is contained in:
Matthew Stobbs
2025-02-11 17:51:10 -07:00
parent 9ec814257f
commit 275f5df722
19 changed files with 295 additions and 224 deletions

View File

@@ -1,23 +1,11 @@
# vim: set filetype=yaml.ansible :
---
- name: "check if task for {{pkg}} exists"
ansible.builtin.command: "test -f {{role_path}}/tasks/pkgs/{{ pkg }}.yml"
- name: "Check if task exists for {{ pkg }}"
ansible.builtin.stat:
path: "{{ role_path }}/tasks/pkgs/{{ pkg }}.yml"
register: cpkg_exists
ignore_errors: true
failed_when: not (cpkg_exists.rc != 0 or cpkg_exists.rc != 1)
- name: "add include task for {{pkg}}"
- name: "Add include task for {{ pkg }}"
when: cpkg_exists.exists
ansible.builtin.include_tasks:
file: "pkgs/{{ pkg }}.yml"
when: cpkg_exists.rc == 0
tags:
- packages
- name: "add {{pkg}} to syspkgs if task doesn't exist: {{assume_missing_is_syspkg}}"
ansible.builtin.set_fact:
syspkgs: "{{ syspkgs + [pkg] }}"
when:
- cpkg_exists.rc != 0
- assume_missing_is_syspkg
tags:
- packages