Treat omitted host_apps.enabled as true so deploy works (#35).
Sync runner checkout / sync (pull_request) Successful in 7s

rejectattr('enabled') raised on every row that omitted the key, which
blocked all app deploys after #33 — including url_shortening_service.
This commit is contained in:
2026-09-16 10:20:48 -05:00
parent 726ad971cb
commit 08ea6dfb08
3 changed files with 26 additions and 4 deletions
+12 -1
View File
@@ -6,9 +6,20 @@
ansible.builtin.set_fact:
_node_names: "{{ app_catalog | dict2items | selectattr('value.type', 'equalto', 'node-static') | map(attribute='key') | list }}"
# rejectattr('enabled', …) raises when the key is omitted. Omit = enabled (#35).
- name: web-static | reset static apps
ansible.builtin.set_fact:
_static_apps: []
- name: web-static | this host's static apps
ansible.builtin.set_fact:
_static_apps: "{{ host_apps | default([]) | rejectattr('enabled', 'equalto', false) | selectattr('name', 'in', _node_names) | list }}"
_static_apps: "{{ _static_apps + [item] }}"
loop: "{{ host_apps | default([]) }}"
when:
- item.name in _node_names
- item.enabled | default(true)
loop_control:
label: "{{ item.name }}/{{ item.env }}"
- name: web-static | configure and run
when: _static_apps | length > 0