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,5 +1,4 @@
--- ---
- hosts: all - hosts: all
name: Configure all servers name: Configure all servers
tasks: tasks:
@ -26,7 +25,6 @@
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
@ -57,7 +55,6 @@
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
@ -132,13 +129,23 @@
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"