Skip to content

Commit ba8f2ab

Browse files
authored
Merge pull request #11 from Diesel-Net/development
Promotion
2 parents 9000d37 + 2a1005f commit ba8f2ab

File tree

12 files changed

+51
-59
lines changed

12 files changed

+51
-59
lines changed

.ansible/ansible.cfg

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
[defaults]
22

3-
stdout_callback = debug
43
host_key_checking = True
54
retry_files_enabled = False
6-
7-
# Fixes ansible variable precedence issue: Makes inventory group_vars override playbook group_vars
8-
# https://github.com/ansible/ansible/issues/18154
9-
precedence = all_plugins_play, all_inventory, all_plugins_inventory, groups_plugins_play, groups_inventory, groups_plugins_inventory
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
signups_allowed: yes
22
admin_token: admin
3+
host: bitwarden.dev.diesel.net

.ansible/inventory/development/group_vars/tools/proxy.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
all:
22
children:
3+
34
tools:
45
hosts:
56
dev.diesel.net
7+
68
vars:
79
ansible_user: automation
810
ansible_python_interpreter: /usr/bin/python3
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
signups_allowed: no
2-
admin_token: !vault |
3-
$ANSIBLE_VAULT;1.1;AES256
4-
63353762613865376264346632316461666430653533353062363762393766383936303538663831
5-
6535613862376263623966663039626631313931336331320a376464633533353262373739323330
6-
62373336316365323964323665383137616132613364313239363736656236623630663061333838
7-
3633383966323731330a306535626637363034366362323738336235623239373064386536636361
8-
33613136346535323839396132636130373639613966346235396531636338646338316661343564
9-
65386330303032623163306131616333623931633139363334376332383463646233396664613339
10-
66623662643664366633396236313466663663353935353166383865356665393332653064643464
11-
64313437303036626330
1+
signups_allowed: yes
2+
admin_token: "{{ lookup('env', 'ADMIN_TOKEN') }}"
3+
host: bitwarden.diesel.net

.ansible/inventory/production/group_vars/tools/proxy.yaml

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
all:
22
children:
3+
34
tools:
45
hosts:
56
tools.diesel.net
7+
68
vars:
79
ansible_user: automation
810
ansible_python_interpreter: /usr/bin/python3

.ansible/roles/requirements.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
- name: docker
22
scm: git
33
src: "git@github.com:Diesel-Net/ansible-role-docker.git"
4-
version: 1.3.0
4+
version: 1.10.0
55

66
- name: common
77
scm: git
88
src: "git@github.com:Diesel-Net/ansible-role-common.git"
9-
version: 1.1.0
9+
version: 1.2.0

.ansible/templates/docker-compose.yaml.j2

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,31 @@ services:
55

66

77
main:
8-
image: vaultwarden/server:1.22.2
8+
image: vaultwarden/server:1.23.1
99
volumes:
10-
- /etc/localtime:/etc/localtime
11-
- {{ ssl_cert_dir }}/:/etc/ssl/certs/
12-
- {{ data_dir }}:/data/
10+
- {{ localtime_file }}:/etc/localtime
11+
- {{ ssl_cert_file }}:/etc/ssl/certs/ca-certificates.crt
12+
- {{ data_dir }}:/data
1313
environment:
1414
- SIGNUPS_ALLOWED={{ signups_allowed | string | lower }}
1515
- ADMIN_TOKEN={{ admin_token }}
16-
- DOMAIN=https://{{ proxy_domain }}
16+
- DOMAIN=https://{{ host }}
1717
deploy:
1818
labels:
1919
- traefik.enable=true
20-
- traefik.docker.network={{ docker_network }}
21-
- traefik.http.middlewares.redirect-https.redirectScheme.scheme=https
22-
- traefik.http.middlewares.redirect-https.redirectScheme.permanent=true
23-
- traefik.http.routers.bitwarden-ui-https.rule=Host(`{{ proxy_domain }}`)
24-
- traefik.http.routers.bitwarden-ui-https.entrypoints=websecure
25-
- traefik.http.routers.bitwarden-ui-https.tls=true
26-
- traefik.http.routers.bitwarden-ui-https.service=bitwarden-ui
27-
- traefik.http.routers.bitwarden-ui-http.rule=Host(`{{ proxy_domain }}`)
28-
- traefik.http.routers.bitwarden-ui-https.tls.certresolver=step-ca
29-
- traefik.http.routers.bitwarden-ui-http.entrypoints=web
30-
- traefik.http.routers.bitwarden-ui-http.middlewares=redirect-https
31-
- traefik.http.routers.bitwarden-ui-http.service=bitwarden-ui
20+
21+
# web interface
3222
- traefik.http.services.bitwarden-ui.loadbalancer.server.port=80
33-
- traefik.http.routers.bitwarden-websocket-https.rule=Host(`{{ proxy_domain }}`) && Path(`/notifications/hub`)
34-
- traefik.http.routers.bitwarden-websocket-https.entrypoints=websecure
35-
- traefik.http.routers.bitwarden-websocket-https.tls=true
36-
- traefik.http.routers.bitwarden-websocket-https.service=bitwarden-websocket
37-
- traefik.http.routers.bitwarden-websocket-http.rule=Host(`{{ proxy_domain }}`) && Path(`/notifications/hub`)
38-
- traefik.http.routers.bitwarden-websocket-http.entrypoints=web
39-
- traefik.http.routers.bitwarden-websocket-http.middlewares=redirect-https
40-
- traefik.http.routers.bitwarden-websocket-http.service=bitwarden-websocket
23+
- traefik.http.routers.bitwarden-ui.rule=Host(`{{ host }}`)
24+
- traefik.http.routers.bitwarden-ui.tls.certresolver=step-ca
25+
- traefik.http.routers.bitwarden-ui.service=bitwarden-ui
26+
27+
# websocket notifications
4128
- traefik.http.services.bitwarden-websocket.loadbalancer.server.port=3012
29+
- traefik.http.routers.bitwarden-websocket.rule=Host(`{{ host }}`) && Path(`/notifications/hub`)
30+
- traefik.http.routers.bitwarden-websocket.tls.certresolver=step-ca
31+
- traefik.http.routers.bitwarden-websocket.service=bitwarden-websocket
32+
4233
networks:
4334
- {{ docker_network }}
4435

.drone.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ steps:
1515
settings:
1616
playbook: .ansible/deploy.yaml
1717
galaxy: .ansible/roles/requirements.yaml
18-
inventory: .ansible/inventory/development/hosts
18+
inventory: .ansible/inventory/development
1919
private_key:
2020
from_secret: automation_id_rsa
2121
vault_password:
@@ -41,10 +41,12 @@ steps:
4141
image: plugins/ansible:3
4242
environment:
4343
ANSIBLE_CONFIG: .ansible/ansible.cfg
44+
ADMIN_TOKEN:
45+
from_secret: admin_token
4446
settings:
4547
playbook: .ansible/deploy.yaml
4648
galaxy: .ansible/roles/requirements.yaml
47-
inventory: .ansible/inventory/production/hosts
49+
inventory: .ansible/inventory/production
4850
private_key:
4951
from_secret: automation_id_rsa
5052
vault_password:

0 commit comments

Comments
 (0)