--- - name: Deploy Foxhunt HFT Trading System hosts: foxhunt_production become: yes vars: foxhunt_version: "{{ version | default('latest') }}" deployment_strategy: "{{ strategy | default('canary') }}" rollback_enabled: true foxhunt_user: foxhunt foxhunt_group: foxhunt foxhunt_home: /opt/foxhunt pre_tasks: - name: Validate deployment prerequisites include_tasks: tasks/pre-deployment-validation.yml - name: Setup performance optimizations include_tasks: tasks/performance-setup.yml - name: Backup current installation include_tasks: tasks/backup-current.yml when: rollback_enabled roles: - role: foxhunt-preparation tags: [preparation] - role: foxhunt-core tags: [core] - role: foxhunt-services tags: [services] - role: foxhunt-monitoring tags: [monitoring] post_tasks: - name: Validate deployment health include_tasks: tasks/health-validation.yml - name: Performance benchmark validation include_tasks: tasks/performance-validation.yml - name: Update deployment manifest include_tasks: tasks/update-manifest.yml handlers: - name: restart foxhunt services systemd: name: "{{ item }}" state: restarted daemon_reload: yes loop: - foxhunt-core - foxhunt-tli - foxhunt-ml - foxhunt-risk - foxhunt-data - name: update grub command: update-grub when: ansible_os_family == "Debian" - name: update grub centos command: grub2-mkconfig -o /boot/grub2/grub.cfg when: ansible_os_family == "RedHat"