Compare commits
10 Commits
178b2f642b
...
5440bd68f8
Author | SHA1 | Date | |
---|---|---|---|
|
5440bd68f8 | ||
8d4be87e93 | |||
03081bf8c1 | |||
bceef910d2 | |||
c8f7d0ab5d | |||
|
9a68e9aa38 | ||
|
075352a94e | ||
|
70bff04856 | ||
|
307629fb28 | ||
|
27f1d18d34 |
3
hosts
3
hosts
@ -7,3 +7,6 @@ vps02.comprofix.com
|
||||
[docker]
|
||||
docker.comprofix.xyz
|
||||
|
||||
[omada]
|
||||
omada-lxc.comprofix.xyz ansible_user=root
|
||||
|
||||
|
35
main.yml
35
main.yml
@ -1,5 +1,4 @@
|
||||
---
|
||||
|
||||
- hosts: all
|
||||
name: Configure all servers
|
||||
tasks:
|
||||
@ -26,7 +25,6 @@
|
||||
tags: traefik_install
|
||||
|
||||
tasks:
|
||||
|
||||
- name: Deploy Vaultwarden
|
||||
import_tasks: tasks/vaultwarden.yml
|
||||
tags: vaultwarden_install
|
||||
@ -57,7 +55,6 @@
|
||||
traefik_host: traefik02.comprofix.xyz
|
||||
tags: traefik_install
|
||||
tasks:
|
||||
|
||||
- name: Deploy comprofix.com website
|
||||
import_tasks: tasks/comprofix.com.yml
|
||||
tags: comprofix_install
|
||||
@ -132,13 +129,27 @@
|
||||
|
||||
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 Dozzle Agent
|
||||
import_tasks: tasks/dozzle-agent.yml
|
||||
tags: dozzle_agent
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Deploy Omada
|
||||
import_tasks: tasks/omada.yml
|
||||
tags: omada_container_install
|
||||
tags: omada_install
|
||||
|
@ -16,7 +16,14 @@
|
||||
template:
|
||||
src: templates/traefik.yml.j2
|
||||
dest: "{{ data_folder }}/traefik/data/traefik.yml"
|
||||
mode: '0600'
|
||||
mode: "0600"
|
||||
|
||||
- name: Copy Traefik config
|
||||
template:
|
||||
src: templates/config.yml.j2
|
||||
dest: "{{ data_folder }}/traefik/data/config.yml"
|
||||
mode: "0600"
|
||||
when: traefik_host == "traefik02.comprofix.xyz"
|
||||
|
||||
- name: Check if {{ data_folder }}/traefik/data/acme.json exists
|
||||
ansible.builtin.stat:
|
||||
@ -29,7 +36,7 @@
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
mode: "0600"
|
||||
when: not file_status.stat.exists
|
||||
|
||||
- name: Check if {{ data_folder }}/traefik/data/traefik.json.log exists
|
||||
@ -43,7 +50,7 @@
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0600'
|
||||
mode: "0600"
|
||||
when: not file_status.stat.exists
|
||||
|
||||
- name: Create traefik Container
|
||||
@ -65,7 +72,7 @@
|
||||
- "{{ data_folder }}/traefik/data/traefik.yml:/traefik.yml:ro"
|
||||
- "{{ data_folder }}/traefik/data/acme.json:/acme.json"
|
||||
- "{{ data_folder }}/traefik/data/traefik.json.log:/traefik.json.log"
|
||||
# - ./data/config.yml:/config.yml:ro
|
||||
- "{{ data_folder }}/traefik/data/config.yml:/config.yml:ro"
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.traefik.entrypoints: "http"
|
||||
|
51
roles/traefik/templates/config.yml.j2
Normal file
51
roles/traefik/templates/config.yml.j2
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
http:
|
||||
routers:
|
||||
oc-router:
|
||||
entryPoints:
|
||||
- "https"
|
||||
service: oc-service
|
||||
rule: "Host(`omada.comprofix.xyz`)" # change it to actual address
|
||||
tls: {}
|
||||
middlewares:
|
||||
- default-headers
|
||||
- https-redirect
|
||||
|
||||
services:
|
||||
oc-service:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: https://omada-lxc.comprofix.xyz:8043 # change it to actual ip of the controller
|
||||
|
||||
middlewares:
|
||||
https-redirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
|
||||
default-headers:
|
||||
headers:
|
||||
frameDeny: true
|
||||
sslRedirect: true
|
||||
browserXssFilter: true
|
||||
contentTypeNosniff: true
|
||||
forceSTSHeader: true
|
||||
stsIncludeSubdomains: true
|
||||
stsPreload: true
|
||||
stsSeconds: 15552000
|
||||
customFrameOptionsValue: SAMEORIGIN
|
||||
customRequestHeaders:
|
||||
X-Forwarded-Proto: https
|
||||
|
||||
default-whitelist:
|
||||
IPAllowList:
|
||||
sourceRange:
|
||||
- "10.0.0.0/8"
|
||||
- "192.168.0.0/16"
|
||||
- "172.16.0.0/12"
|
||||
- "100.64.0.0/10"
|
||||
|
||||
secured:
|
||||
chain:
|
||||
middlewares:
|
||||
- default-headers
|
11
tasks/dozzle-agent.yml
Normal file
11
tasks/dozzle-agent.yml
Normal file
@ -0,0 +1,11 @@
|
||||
- name: Create the dozzle agent container
|
||||
docker_container:
|
||||
name: dozzle-agent
|
||||
image: amir20/dozzle:v8.8.0
|
||||
command: agent
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
ports:
|
||||
- 7007:7007
|
@ -10,7 +10,7 @@
|
||||
- name: Create the dozzle container
|
||||
docker_container:
|
||||
name: dozzle
|
||||
image: amir20/dozzle:v8.7.2
|
||||
image: amir20/dozzle:v8.8.0
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
@ -19,7 +19,7 @@
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
env:
|
||||
DOZZLE_LEVEL: "trace"
|
||||
DOZZLE_REMOTE_HOST: "tcp://omada.comprofix.xyz:2375,tcp://vps02.comprofix.com:2375"
|
||||
DOZZLE_REMOTE_AGENT: "omada-lxc.comprofix.xyz:7007"
|
||||
labels:
|
||||
traefik.enable: "true"
|
||||
traefik.http.routers.dozzle.rule: "Host(`dozzle.comprofix.xyz`)"
|
||||
|
@ -9,7 +9,7 @@
|
||||
IDRAC_HOST: "10.10.10.138"
|
||||
IDRAC_USERNAME: "root"
|
||||
IDRAC_PASSWORD: "calvin"
|
||||
FAN_SPEED: "35"
|
||||
FAN_SPEED: "50"
|
||||
CPU_TEMPERATURE_THRESHOLD: "80"
|
||||
CHECK_INTERVAL: "60"
|
||||
DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE: "true"
|
@ -10,7 +10,7 @@
|
||||
- name: Create the jellyseerr container
|
||||
docker_container:
|
||||
name: jellyseerr
|
||||
image: fallenbagel/jellyseerr:2.0.1
|
||||
image: fallenbagel/jellyseerr:2.1.0
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
@ -14,7 +14,7 @@
|
||||
- name: Create the lidarr container
|
||||
docker_container:
|
||||
name: lidarr
|
||||
image: ghcr.io/linuxserver/lidarr:latest@sha256:c4d9107e03efb0d73bd4491bdb3110fa497da8b53493f60404fbd53087ff0119
|
||||
image: ghcr.io/linuxserver/lidarr:latest@sha256:5c1f7a05944a1ceea242481801bbc5f908a4cc66e95ae0153b5a59f2d6224b17
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
24
tasks/omada.yml
Normal file
24
tasks/omada.yml
Normal 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"
|
@ -11,7 +11,7 @@
|
||||
- name: Create the speedtest container
|
||||
docker_container:
|
||||
name: speedtest
|
||||
image: lscr.io/linuxserver/speedtest-tracker:0.21.5
|
||||
image: lscr.io/linuxserver/speedtest-tracker:0.21.6
|
||||
restart_policy: unless-stopped
|
||||
recreate: true
|
||||
networks:
|
||||
|
Loading…
Reference in New Issue
Block a user