more fixs for packages

This commit is contained in:
Matthew Stobbs
2025-02-20 15:03:54 -07:00
parent c0400949c3
commit 41b1acc067
34 changed files with 181 additions and 201 deletions

View File

@@ -1,31 +1,11 @@
# vim: set filetype=yaml.ansible :
---
- name: "Check if task exists for {{ pkg }}"
ansible.builtin.stat:
path: "{{ role_path }}/tasks/pkgs/{{ pkg }}.yml"
register: stat_pkg
- name: Dump stat_pkg
ansible.builtin.debug:
var: stat_pkg
- name: "Check if specialized configuration exists for {{ pkg }}"
ansible.builtin.stat:
path: "{{ role_path }}/tasks/config/{{ pkg }}.yml"
register: stat_config
- name: Dump stat_config
ansible.builtin.debug:
var: stat_config
- name: "Load specialized configuration if it exists for {{ pkg }}"
when:
- stat_config.stat.exists
- pkgconfig[pkg] is defined
ansible.builtin.include_tasks:
file: "config/{{ pkg }}.yml"
- name: "Add include task for {{ pkg }}"
when:
- stat_pkg.stat.exists
ansible.builtin.include_tasks:
file: "pkgs/{{ pkg }}.yml"