adjust pkg list generation
- add a custom pkg definition if it exists - if it doesn't exist, assume it's a package manager packge name
This commit is contained in:
11
tasks/addpkg.yml
Normal file
11
tasks/addpkg.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
- name: add custom pkg if available
|
||||||
|
ansible.builtin.include_tasks:
|
||||||
|
file: "pkgs/{{ ansible_os_family }}/{{ pkg }}.yml"
|
||||||
|
register: cadd_pkg
|
||||||
|
ignore_errors: true
|
||||||
|
tags:
|
||||||
|
- packages
|
||||||
|
|
||||||
|
- debug:
|
||||||
|
var: cadd_pkg
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: generate package installation lists
|
- name: generate package installation lists
|
||||||
ansible.builtin.include_tasks:
|
ansible.builtin.include_tasks:
|
||||||
file: "pkgs/{{ ansible_os_family }}/{{ pkg }}.yml"
|
file: addpkg.yml
|
||||||
loop: "{{ packages }}"
|
loop: "{{ packages }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
loop_var: pkg
|
loop_var: pkg
|
||||||
|
|||||||
4
tasks/pkgs/RedHat/kitty.yml
Normal file
4
tasks/pkgs/RedHat/kitty.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
- name: add to syspkgs
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
syspkgs: "{{ (syspkgs | default([])) + ['kitty', 'kitty-shell-integration'] }}"
|
||||||
Reference in New Issue
Block a user