--- # 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