Migrate to new apps role
This commit is contained in:
@@ -37,7 +37,7 @@ quadlets:
|
||||
PROWLARR__AUTH__REQUIRED: "{{ PROWLARR__AUTH__REQUIRED | default('DisabledForLocalAddresses') }}"
|
||||
PROWLARR__AUTH__APIKEY: "{{ PROWLARR__AUTH__APIKEY | default(lookup('password', '/dev/null length=32 chars=ascii_letters,digits')) }}"
|
||||
PROWLARR__SERVER__ENABLESSL: "{{ PROWLARR__SERVER__ENABLESSL | default(false) }}"
|
||||
PROWLARR__SERVER__SSLPORT: "{{ PROWLARR__SERVER__PORT | default('6969') }}"
|
||||
PROWLARR__SERVER__SSLPORT: "{{ PROWLARR__SERVER__SSLPORT | default('6969') }}"
|
||||
PROWLARR__SERVER__PORT: "{{ PROWLARR__SERVER__PORT | default('9696') }}"
|
||||
PROWLARR__SERVER__BINDADDRESS: "{{ PROWLARR__SERVER__BINDADDRESS | default('*') }}"
|
||||
PROWLARR__LOG__ANALYTICSENABLED: "{{ PROWLARR__LOG__ANALYTICSENABLED | default(false) }}"
|
||||
|
||||
@@ -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