agent-governance/sandbox/ansible/rollback-service.yml
profit 77655c298c Initial commit: Agent Governance System Phase 8
Phase 8 Production Hardening with complete governance infrastructure:

- Vault integration with tiered policies (T0-T4)
- DragonflyDB state management
- SQLite audit ledger
- Pipeline DSL and templates
- Promotion/revocation engine
- Checkpoint system for session persistence
- Health manager and circuit breaker for fault tolerance
- GitHub/Slack integrations
- Architectural test pipeline with bug watcher, suggestion engine, council review
- Multi-agent chaos testing framework

Test Results:
- Governance tests: 68/68 passing
- E2E workflow: 16/16 passing
- Phase 2 Vault: 14/14 passing
- Integration tests: 27/27 passing

Coverage: 57.6% average across 12 phases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 22:07:06 -05:00

41 lines
1.2 KiB
YAML

---
# Sample Ansible Playbook: Rollback Docker Service
# =================================================
# Rollback playbook for undoing service deployments.
#
# Usage:
# ansible-playbook rollback-service.yml -e service_name=myapp
- name: Rollback Docker Service
hosts: localhost
connection: local
gather_facts: no
vars:
service_name: "{{ service_name | mandatory }}"
remove_volumes: "{{ remove_volumes | default(false) }}"
tasks:
- name: Check if container exists
command: "docker ps -a --filter name={{ service_name }} --format '{{ '{{' }}.Names{{ '}}' }}'"
register: container_check
changed_when: false
- name: Stop container
command: "docker stop {{ service_name }}"
when: container_check.stdout != ""
ignore_errors: yes
- name: Remove container
command: "docker rm {{ service_name }}"
when: container_check.stdout != ""
- name: Remove associated volumes (optional)
command: "docker volume rm {{ service_name }}-data"
when: remove_volumes | bool
ignore_errors: yes
- name: Confirm rollback
debug:
msg: "Service {{ service_name }} has been rolled back"