mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-09 04:06:42 +00:00
make compose-role-sync runs only the role of one deployed application, with its proxy vhost and injected snippets. It marks every shared service of the stack as converged and skips the stack-wide service stop. With pw= it stages the Playwright spec of the role again, renders its env and runs it. make design-sync keeps re-rendering only the shared CSS, the role stylesheet and the branding assets. Both run through one playbook-sync.yml with a scope, which replaces playbook-design.yml. The host placement of the proxy and the shared services moves from the constructor stage into tasks/utils/constructor/placement.yml, so the role sync can include it. base='<hex>' on both targets passes DESIGN_BASE_COLOR. The development inventory references that variable for the design base color and keeps #FFA500 as its default, so a deployed role can be rendered and checked with another palette. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
---
|
|
- name: "🖥️ Auto-place single-host shared services on first manager (swarm mode)"
|
|
ansible.builtin.add_host:
|
|
name: "{{ (groups['svc-swarm-manager'] | default([]))[0] }}"
|
|
groups: "{{ role_id }}"
|
|
loop: "{{ lookup('roles_with_placement', 'manager') }}"
|
|
loop_control:
|
|
loop_var: role_id
|
|
label: "{{ role_id }}"
|
|
when:
|
|
- (groups['svc-swarm-manager'] | default([]) | length) > 0
|
|
- role_id in groups
|
|
- (groups[role_id] | default([]) | length) == 0
|
|
run_once: true
|
|
changed_when: false
|
|
|
|
- name: "🔧 auto-place svc-prx-openresty (swarm manager, first compose host) for vhosts"
|
|
ansible.builtin.add_host:
|
|
name: "{{ (groups['svc-swarm-manager'] | default([]))[0] | default(ansible_play_hosts | first) }}"
|
|
groups: svc-prx-openresty
|
|
vars:
|
|
_web_groups: >-
|
|
{{
|
|
groups
|
|
| dict2items
|
|
| selectattr('key', 'match', '^web-')
|
|
| rejectattr('value', 'equalto', [])
|
|
| list
|
|
}}
|
|
when:
|
|
- (groups['svc-prx-openresty'] | default([]) | length) == 0
|
|
- (_web_groups | length) > 0
|
|
run_once: true
|
|
changed_when: false
|