From dab68012c7f879399a36bd8dfdb54e90b05ad752 Mon Sep 17 00:00:00 2001 From: jaydee Date: Fri, 15 Nov 2024 14:41:17 +0100 Subject: [PATCH] bitwarden --- playbooks/stop_containers.yaml | 7 ++++++- playbooks/sync_all.yaml | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/playbooks/stop_containers.yaml b/playbooks/stop_containers.yaml index f4f2344..501fe46 100644 --- a/playbooks/stop_containers.yaml +++ b/playbooks/stop_containers.yaml @@ -78,7 +78,12 @@ loop: - mosquitto-mosquitto-1" when: '"mosquitto" in selected_containers' - +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - mosquitto-mosquitto-1" + when: '"ha" in selected_containers' - debug: msg: "{{ docker_containers }}" - name: Stop mailu containers diff --git a/playbooks/sync_all.yaml b/playbooks/sync_all.yaml index b30ee0b..2d6dfcf 100644 --- a/playbooks/sync_all.yaml +++ b/playbooks/sync_all.yaml @@ -2,6 +2,8 @@ - name: import a task hosts: containers gather_facts: false + # vars: + # selected_containers: selected_containers|split(",") tasks: # - debug: # msg: "{{ inventory_hostname }}"