yt-dlp-dags/ansible/playbooks/playbook-bgutils-stop.yml

20 lines
564 B
YAML

---
- name: Stop bgutil-provider service
hosts: all # Use --limit to target specific hosts, e.g., --limit management
become: true
gather_facts: false
vars:
container_name: "bgutil-provider"
tasks:
- name: "Ensure {{ container_name }} container is stopped"
community.docker.docker_container:
name: "{{ container_name }}"
state: stopped
register: container_status
- name: "Display container status"
ansible.builtin.debug:
msg: "{{ container_name }} was stopped."
when: container_status.changed