new-site/infra/ansible/playbooks/deploy.yml
justin f8cd37ac8c Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers,
document generators, FCC compliance tools, Canada CRTC formation,
Ansible infrastructure, and deployment scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 06:54:22 -05:00

39 lines
1.1 KiB
YAML

---
# Performance West — Code Deploy (no infrastructure changes)
# Usage: ansible-playbook playbooks/deploy.yml -i inventory/hosts.yml
- name: Deploy Performance West
hosts: pw
become: true
tasks:
- name: Sync project files
ansible.builtin.synchronize:
src: "{{ playbook_dir }}/../../"
dest: "{{ project_dir }}/"
delete: true
rsync_opts:
- "--exclude=node_modules"
- "--exclude=dist"
- "--exclude=.git"
- "--exclude=site-old"
- "--exclude=.env"
- name: Rebuild and restart containers
community.docker.docker_compose_v2:
project_src: "{{ project_dir }}"
build: always
state: present
register: compose_result
- name: Show compose output
ansible.builtin.debug:
var: compose_result.actions
- name: Wait for API health
ansible.builtin.uri:
url: "http://localhost:{{ api_port }}/api/v1/status"
return_content: true
register: health
retries: 10
delay: 3
until: health.status == 200