Migrate to new apps role
This commit is contained in:
@@ -2,18 +2,14 @@
|
||||
- name: Load all quadlet app definitions
|
||||
ansible.builtin.set_fact:
|
||||
quadlets_apps: "{{ quadlets_apps | default([]) + [lookup('file', item.path) | from_yaml] }}"
|
||||
loop: "{{ lookup('ansible.builtin.find', role_path, patterns='*.yml', excludes='quadlets.yml').files }}"
|
||||
loop: "{{ lookup('ansible.builtin.find', role_path, patterns='*.yml', excludes=['tasks']).files }}"
|
||||
|
||||
- name: Deploy app configs from metadata
|
||||
- name: Deploy app configs
|
||||
ansible.builtin.template:
|
||||
content: "{{ item.1.template }}"
|
||||
dest: "{{ target_root }}/{{ item.1.path }}"
|
||||
dest: "{{ item.1.path }}"
|
||||
mode: '0644'
|
||||
loop: "{{ quadlets_apps | subelements('configs', skip_missing=True) }}"
|
||||
vars:
|
||||
is_root_config: "{{ item.0.metadata.user | default('home') in ['service', 'root'] }}"
|
||||
target_root: "{{ is_root_config | ternary('', ansible_facts.env.HOME) }}"
|
||||
become: "{{ is_root_config }}"
|
||||
when: item.1.template is defined
|
||||
|
||||
- name: Initialize quadlet specs
|
||||
|
||||
Reference in New Issue
Block a user