From ca3c6760ba6ebb6e3a9da4336873e2a0e2852ec6 Mon Sep 17 00:00:00 2001 From: Michael Rennecke Date: Sun, 19 Apr 2020 21:22:19 +0200 Subject: [PATCH] add bitwarden --- common.yaml | 3 ++- hosts.yaml | 7 +++++++ roles/bitwarden/defaults/main.yaml | 4 ++++ roles/bitwarden/tasks/main.yaml | 20 ++++++++++++++++++++ 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 roles/bitwarden/defaults/main.yaml create mode 100644 roles/bitwarden/tasks/main.yaml diff --git a/common.yaml b/common.yaml index 5b7eedc..5006036 100644 --- a/common.yaml +++ b/common.yaml @@ -6,4 +6,5 @@ - hosts: mail.0rpheus.net roles: - - haproxy \ No newline at end of file + - haproxy + - bitwarden diff --git a/hosts.yaml b/hosts.yaml index 44bb967..10d53fb 100644 --- a/hosts.yaml +++ b/hosts.yaml @@ -13,6 +13,8 @@ all: # automated updates Unattended_Upgrade: 1 Update_Package_Lists: 1 + + bitwarden_version: 1.14.2-alpine certbot_domains: - "jabber.0rpheus.net" @@ -20,6 +22,7 @@ all: haproxy_domains: # : smokeping.0rpheus.net: smokeping + bitwarden.0rpheus.net: bitwarden seafile.0rpheus.net: odroid jabber.0rpheus.net: prosody tt-rss.0rpheus.net: odroid @@ -45,6 +48,10 @@ all: server_defs: - "odroid-docker 172.30.30.2:1080 check" + bitwarden: + server_defs: + - "mail-docker 127.0.0.1:2080 check" + gogs: server_defs: - "gogs-web-1 127.0.0.1:3000 check" diff --git a/roles/bitwarden/defaults/main.yaml b/roles/bitwarden/defaults/main.yaml new file mode 100644 index 0000000..a815d7b --- /dev/null +++ b/roles/bitwarden/defaults/main.yaml @@ -0,0 +1,4 @@ +--- + +bitwarden_data: /srv/bitwarden.0rpheus.net/data/ +bitwarden_version: latest diff --git a/roles/bitwarden/tasks/main.yaml b/roles/bitwarden/tasks/main.yaml new file mode 100644 index 0000000..8a3c397 --- /dev/null +++ b/roles/bitwarden/tasks/main.yaml @@ -0,0 +1,20 @@ +--- + +- name: bitwarden data + file: + path: "{{ bitwarden_data }}" + state: directory + recurse: yes + + +- name: bitwarden container + docker_container: + name: bitwarden.0rpheus.net + image: "bitwardenrs/server:{{ bitwarden_version }}" + pull: yes + restart_policy: always + + ports: + - 127.0.0.1:2080:80 + volumes: + - "{{ bitwarden_data }}:/data/:rw" \ No newline at end of file