diff --git a/inventory/hosts.yml b/inventory/hosts.yml index d7d0894..08049bd 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -10,6 +10,8 @@ all: ansible_host: 192.168.100.30 git: ansible_host: 192.168.180.20 + dashboard: + ansible_host: 192.168.180.220 timescaledb: ansible_host: 192.168.150.130 bankmanager: diff --git a/playbooks/lehmann-dashboard.yml b/playbooks/lehmann-dashboard.yml new file mode 100644 index 0000000..73f486c --- /dev/null +++ b/playbooks/lehmann-dashboard.yml @@ -0,0 +1,64 @@ +# +# +# Automated installation for bankmanager +# +# Project: playbooks +# Author: Tobias Lehmann +# License: MIT License (see LICENSE.md) +# +# Copyright (c) captica GmbH est. 2021 +# +- hosts: "leh01" + name: Create container + vars: + lxc_id: 110 + lxc_name: dashboard + lxc_domain: leh01.local + lxc_template: "local:vztmpl/debian-12-standard_12.2-1_amd64.tar.zst" + lxc_mac: CC:CC:CC:18:02:20 + lxc_bridge: vmbr180 + lxc_vlan: "" + lxc_disk: datapool:32 + lxc_cpu: 1 + lxc_memory: 1024 + lxc_swap: 1024 + lxc_mounts: '{"mp0":"lxc-dashboard:10,mp=/opt/dashboard"}' + lxc_ssh_pub_key: ~/.ssh/id_ed25519_ansible.pub + roles: + - lxc-container + +- hosts: "dashboard" + vars: + hostname: dashboard + tools_install_users: + - root + - ansible + ssh_pubkeys_root: + - "../files/ssh/root.pub" + ssh_pubkeys_ansible: + - "../files/ssh/id_ed25519_ansible.pub" + roles: + - linux-base-install + - zsh + - vim + - fzf + - linux-docker + +- hosts: "dashboard" + tags: + - dashboard + - install + vars: + service_name: dashboard + service_directory: /opt/dashboard + service_volume_dirs: + - appdata + - db + service_user_name: dashboard + service_user_id: 1020 + service_group_name: dashboard + service_group_id: 1020 + bankmanager_version: latest + tasks: + - name: "Install dashboard application" + include_tasks: setup-docker-application.yml \ No newline at end of file diff --git a/templates/dashboard/docker-compose.yml.j2 b/templates/dashboard/docker-compose.yml.j2 new file mode 100644 index 0000000..1775b31 --- /dev/null +++ b/templates/dashboard/docker-compose.yml.j2 @@ -0,0 +1,21 @@ +version: '3.9' + +services: + app: + image: git.lehmannhaus.de/tobiaslehmann/de.lehmann.dashboard:latest + restart: always + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - '80:80' + networks: + - default + +networks: + default: + ipam: + driver: default + config: + - subnet: 172.2.0.0/16 + gateway: 172.2.0.1 \ No newline at end of file