Stop containers before updating the configuration

This commit is contained in:
2023-02-15 14:02:20 +01:00
parent e5a2075849
commit 7bc4235fd3
7 changed files with 73 additions and 0 deletions

View File

@@ -4,6 +4,16 @@
- hosts: all
name: Drone CI runner agent
tasks:
- name: Stop running containers
become_user: containers
become: true
ansible.builtin.systemd:
scope: user
name: container-{{ item }}.service
state: stopped
loop:
- drone-runner
- name: Get containers UID
ansible.builtin.command: "id -u containers"
register: uid_containers