feat: add omada container
All checks were successful
Deploy / Prepare Build (push) Successful in 2m1s

This commit is contained in:
Matthew McKinnon 2024-11-16 16:13:44 +10:00
parent 9a68e9aa38
commit c8f7d0ab5d
3 changed files with 67 additions and 33 deletions

3
hosts
View File

@ -7,3 +7,6 @@ vps02.comprofix.com
[docker] [docker]
docker.comprofix.xyz docker.comprofix.xyz
[omada]
omada.comprofix.xyz ansible_user=root

View File

@ -1,11 +1,10 @@
--- ---
- hosts: all - hosts: all
name: Configure all servers name: Configure all servers
tasks: tasks:
- name: Gather facts if run with tags - name: Gather facts if run with tags
ansible.builtin.setup: ansible.builtin.setup:
when: ansible_run_tags | length when: ansible_run_tags | length
tags: always tags: always
- hosts: all - hosts: all
@ -16,17 +15,16 @@
- hosts: cloud - hosts: cloud
become: yes become: yes
roles: roles:
- role: docker - role: docker
tags: docker_install tags: docker_install
- name: traefik - name: traefik
vars: vars:
traefik_host: traefik01.comprofix.com traefik_host: traefik01.comprofix.com
tags: traefik_install tags: traefik_install
tasks: tasks:
- name: Deploy Vaultwarden - name: Deploy Vaultwarden
import_tasks: tasks/vaultwarden.yml import_tasks: tasks/vaultwarden.yml
tags: vaultwarden_install tags: vaultwarden_install
@ -48,16 +46,15 @@
tags: docker_install tags: docker_install
- role: nfs - role: nfs
mounts: mounts:
- name: Data share - name: Data share
path: /mnt/nfs/data path: /mnt/nfs/data
src: truenas.comprofix.xyz:/mnt/datapool/data src: truenas.comprofix.xyz:/mnt/datapool/data
tags: nfs_install tags: nfs_install
- role: traefik - role: traefik
vars: vars:
traefik_host: traefik02.comprofix.xyz traefik_host: traefik02.comprofix.xyz
tags: traefik_install tags: traefik_install
tasks: tasks:
- name: Deploy comprofix.com website - name: Deploy comprofix.com website
import_tasks: tasks/comprofix.com.yml import_tasks: tasks/comprofix.com.yml
tags: comprofix_install tags: comprofix_install
@ -65,19 +62,19 @@
- name: Deploy iDrac Fan Controller - name: Deploy iDrac Fan Controller
import_tasks: tasks/idrac.yml import_tasks: tasks/idrac.yml
tags: idrac_install tags: idrac_install
- name: Deploy MariaDB - name: Deploy MariaDB
import_tasks: tasks/mariadb.yml import_tasks: tasks/mariadb.yml
tags: mariadb_install tags: mariadb_install
- name: Deploy InvoiceNinja - name: Deploy InvoiceNinja
import_tasks: tasks/invoiceninja.yml import_tasks: tasks/invoiceninja.yml
tags: invoiceninja_install tags: invoiceninja_install
- name: Deploy Homepage - name: Deploy Homepage
import_tasks: tasks/homepage.yml import_tasks: tasks/homepage.yml
tags: homepage_install tags: homepage_install
# - name: Deploy osTicket # - name: Deploy osTicket
# import_tasks: tasks/osticket.yml # import_tasks: tasks/osticket.yml
# tags: osticket_install # tags: osticket_install
@ -89,19 +86,19 @@
- name: Deploy dozzle - name: Deploy dozzle
import_tasks: tasks/dozzle.yml import_tasks: tasks/dozzle.yml
tags: dozzle_install tags: dozzle_install
- name: Deploy jellyseerr - name: Deploy jellyseerr
import_tasks: tasks/jellyseerr.yml import_tasks: tasks/jellyseerr.yml
tags: jellyseerr_install tags: jellyseerr_install
- name: Deploy lidarr - name: Deploy lidarr
import_tasks: tasks/lidarr.yml import_tasks: tasks/lidarr.yml
tags: lidarr_install tags: lidarr_install
- name: Deploy prowlarr - name: Deploy prowlarr
import_tasks: tasks/prowlarr.yml import_tasks: tasks/prowlarr.yml
tags: prowlarr_install tags: prowlarr_install
- name: Deploy radarr - name: Deploy radarr
import_tasks: tasks/radarr.yml import_tasks: tasks/radarr.yml
tags: radarr_install tags: radarr_install
@ -109,7 +106,7 @@
- name: Deploy readarr - name: Deploy readarr
import_tasks: tasks/readarr.yml import_tasks: tasks/readarr.yml
tags: readarr_install tags: readarr_install
- name: Deploy sonarr - name: Deploy sonarr
import_tasks: tasks/sonarr.yml import_tasks: tasks/sonarr.yml
tags: sonarr_install tags: sonarr_install
@ -121,24 +118,34 @@
- name: Deploy mealie - name: Deploy mealie
import_tasks: tasks/mealie.yml import_tasks: tasks/mealie.yml
tags: mealie_install tags: mealie_install
- name: Deploy pyKMS - name: Deploy pyKMS
import_tasks: tasks/pykms.yml import_tasks: tasks/pykms.yml
tags: pykms_install tags: pykms_install
- name: Deploy gitea-runner-homelab - name: Deploy gitea-runner-homelab
import_tasks: tasks/gitea-runner-homelab.yml import_tasks: tasks/gitea-runner-homelab.yml
tags: gitea_runner_homelab_install tags: gitea_runner_homelab_install
tags: dockerserver_install tags: dockerserver_install
- hosts: omada
become: yes
pre_tasks:
- name: Update packages
import_tasks: tasks/base.yml
tags: base_install
roles:
- role: docker
tags: docker_install
- role: nfs
mounts:
- name: Data share
path: /data
src: truenas.comprofix.xyz:/mnt/datapool/docker
tags: nfs_install
tasks:
- name: Deploy Omada
import_tasks: tasks/omada.yml
tags: omada_container_install
tags: omada_install

24
tasks/omada.yml Normal file
View File

@ -0,0 +1,24 @@
---
- name: Create directories
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_folder }}/omada"
- "{{ data_folder }}/omada/data"
- "{{ data_folder }}/omada/logs"
- name: Create the omada container
docker_container:
name: omada
image: mbentley/omada-controller:5.14
restart_policy: unless-stopped
recreate: true
network_mode: host
volumes:
- "{{ data_folder }}/omada/data:/opt/tplink/EAPController/data"
- "{{ data_folder }}/omada/logs:/opt/tplink/EAPController/logs"
env:
PUID: "1000"
PGID: "1000"
TZ: "Australia/Brisbane"