Changes to vars, toml, task and playbook

This commit is contained in:
Jesse Beard 2019-04-10 08:46:47 -04:00
parent 344af161a0
commit 0701f71599
5 changed files with 77 additions and 0 deletions

View file

@ -59,6 +59,8 @@ timemachine_enabled: false
# IRC bouncer
znc_enabled: false
# Password Management
bitwarden_enabled: false
###
### General
@ -207,6 +209,14 @@ cloudflare_email: dave@awesomedomain.com
# Cloudflare 'Global API Key', can be found on the 'My Profile' page
cloudflare_api_key: abcdeabcdeabcdeabcde1234512345
###
### Bitwarden
###
# Keep this token secret, this is password to access admin area of your server!
# This token can be anything, but it's recommended to use a long, randomly generated string of characters,
# for example running openssl rand -base64 48
bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
##################################################################
###### You shouldn't need to edit anything below this point ######
##################################################################
@ -449,3 +459,8 @@ mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa"
### jackett
###
jackett_data_directory: "{{ docker_home }}/jackett"
###
### bitwarden
###
bitwarden_data_directory: "{{ docker_home }}/bitwarden"

View file

@ -138,3 +138,7 @@
- import_tasks: tasks/jackett.yml
when: (jackett_enabled | default(False))
tags: jackett
- import_tasks: tasks/bitwarden.yml
when: (bitwarden_enabled | default(False))
tags: bitwarden

41
tasks/bitwarden.yml Normal file
View file

@ -0,0 +1,41 @@
- name: Create Bitwarden Directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ bitwarden_data_directory }}"
- name: Bitwarden Docker Container
docker_container:
name: bitwarden
image: mprasil/bitwarden:latest
pull: true
ports:
#- "19080:80"
- "3012:3012"
volumes:
- "{{ bitwarden_data_directory }}:/data:rw"
env:
SIGNUPS_ALLOWED: "false"
ADMIN_TOKEN: "{{ bitwarden_admin_token }}"
LOG_FILE: "/data/bitwarden.log"
labels:
traefik.backend: "bitwarden"
traefik.web.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }}"
traefik.enable: "true"
traefik.web.port: "80"
#traefik.web.frontend.headers.customFrameOptionsValue: "ALLOW-FROM http://{{ ansible_nas_domain }}"
#traefik.web.frontend.headers.customFrameOptionsValue: "ALLOW-FROM https://{{ ansible_nas_domain }}"
#traefik.web.frontend.headers.SSLRedirect: "true"
traefik.hub.frontend.rule: "Host:bitwarden.{{ ansible_nas_domain }};Path:/notifications/hub"
traefik.hub.port: "3012"
restart_policy: unless-stopped
#memory: 1g
- name: Bitwarden Backup Container
docker_container:
name: bitwarden-backup
image: bruceforce/bw_backup:latest
pull: true
restart_policy: unless-stopped
volumes_from: bitwarden

View file

@ -180,6 +180,7 @@ onDemand = false # create certificate when container is created
# we request a certificate for everything, because why not.
sans = ["airsonic.{{ ansible_nas_domain }}",
"bitwarden.{{ ansible_nas_domain }}",
"couchpotato.{{ ansible_nas_domain }}",
"duplicati.{{ ansible_nas_domain }}",
"emby.{{ ansible_nas_domain }}",

View file

@ -59,6 +59,9 @@ timemachine_enabled: false
# IRC bouncer
znc_enabled: false
# Password Management
bitwarden_enabled: false
###
### General
###
@ -207,6 +210,14 @@ cloudflare_email: dave@awesomedomain.com
# Cloudflare 'Global API Key', can be found on the 'My Profile' page
cloudflare_api_key: abcdeabcdeabcdeabcde1234512345
###
### Bitwarden
###
# Keep this token secret, this is password to access admin area of your server!
# This token can be anything, but it's recommended to use a long, randomly generated string of characters,
# for example running openssl rand -base64 48
bitwarden_admin_token: qwertyuiop1234567890poiuytrewq0987654321
##################################################################
###### You shouldn't need to edit anything below this point ######
##################################################################
@ -449,3 +460,8 @@ mymediaforalexa_data_directory: "{{ docker_home }}/mymediaforalexa"
### jackett
###
jackett_data_directory: "{{ docker_home }}/jackett"
###
### bitwarden
###
bitwarden_data_directory: "{{ docker_home }}/bitwarden"