From 0568c30c86d7d7dda8faa16e732ff9f9b63e6706 Mon Sep 17 00:00:00 2001 From: jaydee Date: Fri, 15 Nov 2024 13:57:18 +0100 Subject: [PATCH] bitwarden --- playbooks/start_containers.yaml | 7 ++-- playbooks/stop_containers.yaml | 71 ++++++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 5 deletions(-) diff --git a/playbooks/start_containers.yaml b/playbooks/start_containers.yaml index c0b5e19..f693b0f 100644 --- a/playbooks/start_containers.yaml +++ b/playbooks/start_containers.yaml @@ -1,5 +1,6 @@ --- -- name: Stop mailu containers - command: "docker start kestra-kestra-1 kestra-postgres-1 authentik-postgresql-1 authentik-worker-1 authentik-server-1 authentik-redis-1 gitlab semaphore-db-1 semaphore-app-1 nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1 webhub-web-1" +- name: Start mailu containers + command: "docker start {{ docker_containers|join(' ') }}" become: true - ignore_errors: true \ No newline at end of file + ignore_errors: true + \ No newline at end of file diff --git a/playbooks/stop_containers.yaml b/playbooks/stop_containers.yaml index ee1dc90..8001522 100644 --- a/playbooks/stop_containers.yaml +++ b/playbooks/stop_containers.yaml @@ -8,8 +8,75 @@ - semaphore-app-1 when: '"semaphore" in selected_containers' - -# kestra-kestra-1 kestra-postgres-1 authentik-postgresql-1 authentik-worker-1 authentik-server-1 authentik-redis-1 gitlab semaphore-db-1 semaphore-app-1 nginx-app-1 heimdall mailu2-admin-1 mailu2-antispam-1 mailu2-antivirus-1 mailu2-fetchmail-1 mailu2-front-1 mailu2-imap-1 mailu2-oletools-1 mailu2-redis-1 mailu2-resolver-1 mailu2-smtp-1 mailu2-webdav-1 mailu2-webmail-1 HomeAssistant mosquitto-mosquitto-1 webhub-web-1" +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - authentik-postgresql-1 + - authentik-worker-1 + - authentik-server-1 + - authentik-redis-1 + when: '"authentik" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - kestra-kestra-1 + - kestra-postgres-1 + when: '"kestra" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - gitlab + when: '"gitlab" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - nginx-app-1 + when: '"nginx" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - heimdall + when: '"heimdall" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - mailu3-admin-1 + - mailu3-antispam-1 + - mailu3-antivirus-1 + - mailu3-fetchmail-1 + - mailu3-front-1 + - mailu3-imap-1 + - mailu3-oletools-1 + - mailu3-redis-1 + - mailu3-resolver-1 + - mailu3-smtp-1 + - mailu3-webdav-1 + - mailu3-webmail-1 + when: '"mailu3" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - HomeAssistant + when: '"homeassistant" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - webhub-web-1" + when: '"webhub" in selected_containers' +- name: Add elements to a list + set_fact: + docker_containers: "{{ docker_containers | default([]) + [item] }}" + loop: + - mosquitto-mosquitto-1" + when: '"mosquitto" in selected_containers' - debug: msg: "{{ docker_containers }}"