17 lines
523 B
YAML
17 lines
523 B
YAML
---
|
|
- name: Destroy OTUS HW8 Jenkins infrastructure
|
|
hosts: local
|
|
gather_facts: false
|
|
vars:
|
|
hw8_root: "{{ playbook_dir }}/../.."
|
|
compose_dir: "{{ hw8_root }}/compose"
|
|
compose_file: "{{ compose_dir }}/docker-compose.yml"
|
|
compose_env_file: "{{ compose_dir }}/.env"
|
|
|
|
tasks:
|
|
- name: Stop and remove compose stack
|
|
ansible.builtin.command:
|
|
cmd: docker compose -f {{ compose_file }} --env-file {{ compose_env_file }} down -v --remove-orphans
|
|
args:
|
|
chdir: "{{ compose_dir }}"
|