move to /srv

This commit is contained in:
Pim Kunis 2023-01-07 19:08:49 +01:00
parent 5331d25c4a
commit 5bf6d7acbc
13 changed files with 44 additions and 46 deletions

View file

@ -1,8 +1,6 @@
# Ansible scripts for our private Intel NUC servers
## TODO
- Move to /srv directory?
### nsd
- ZSK rollover.

View file

@ -9,9 +9,9 @@
file:
path: /data
state: directory
- name: Create /apps directory
- name: Create /srv directory
file:
path: /apps
path: /srv
state: directory
- name: Disable systemd-resolved
systemd:

View file

@ -16,7 +16,7 @@ services:
- traefik
volumes:
- /data/forgejo:/data
- /apps/forgejo/conf:/data/gitea/conf
- /srv/forgejo/conf:/data/gitea/conf
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
labels:

View file

@ -1,11 +1,11 @@
- name: Create app directory
file:
path: /apps/forgejo
path: /srv/forgejo
state: directory
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/forgejo/docker-compose.yml
dest: /srv/forgejo/docker-compose.yml
- name: Create data directory
file:
path: /data/forgejo
@ -14,18 +14,18 @@
group: 1000
- name: Copy conf directory
file:
path: /apps/forgejo/conf
path: /srv/forgejo/conf
state: directory
owner: 1000
group: 1000
- name: Copy app.ini
template:
src: "{{ role_path }}/templates/app.ini"
dest: /apps/forgejo/conf/app.ini
dest: /srv/forgejo/conf/app.ini
register: config
- name: Start the Docker Compose
community.docker.docker_compose:
project_src: /apps/forgejo
docker_compose:
project_src: /srv/forgejo
pull: true
remove_orphans: true
restarted: "{{ config.changed }}"

View file

@ -1,14 +1,14 @@
- name: Create app directory
file:
path: /apps/kms
path: /srv/kms
state: directory
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/kms/docker-compose.yml
dest: /srv/kms/docker-compose.yml
- name: Start the Docker Compose
community.docker.docker_compose:
project_src: /apps/kms
docker_compose:
project_src: /srv/kms
pull: true
remove_orphans: true

View file

@ -1,15 +1,15 @@
- name: Create Mastodon app directory
file:
path: /apps/mastodon
path: /srv/mastodon
state: directory
- name: Copy .env.production
copy:
src: "{{ role_path }}/files/.env.production"
dest: /apps/mastodon/.env.production
dest: /srv/mastodon/.env.production
- name: Copy Docker Compose script
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: /apps/mastodon/docker-compose.yml
dest: /srv/mastodon/docker-compose.yml
- name: Create Mastodon data directory
file:
path: /data/mastodon
@ -17,6 +17,6 @@
mode: 0777
- name: Start Docker Compose
docker_compose:
project_src: /apps/mastodon
project_src: /srv/mastodon
pull: true
remove_orphans: true

View file

@ -1,9 +1,9 @@
- name: Clone pizzeria repository
git:
repo: "{{ pizzeria.git_origin }}"
dest: /apps/pizzeria
dest: /srv/pizzeria
- name: Start the Docker Compose
community.docker.docker_compose:
project_src: /apps/pizzeria
docker_compose:
project_src: /srv/pizzeria
pull: true
remove_orphans: true

View file

@ -10,7 +10,7 @@ services:
image: mailu/radicale:1.9
volumes:
- /data/radicale:/data
- /apps/radicale/config:/radicale
- /srv/radicale/config:/radicale
command: radicale -S -C /radicale/radicale.conf
networks:
- traefik

View file

@ -1,29 +1,29 @@
- name: Create Radicale app directory
file:
path: /apps/radicale
path: /srv/radicale
state: directory
- name: Copy docker-compose.yml file
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/radicale/docker-compose.yml
dest: /srv/radicale/docker-compose.yml
- name: Create Radicale config directory
file:
path: /apps/radicale/config
path: /srv/radicale/config
state: directory
- name: Copy radicale.conf
copy:
src: "{{ role_path }}/files/radicale.conf"
dest: /apps/radicale/config/radicale.conf
dest: /srv/radicale/config/radicale.conf
- name: Copy users file
copy:
src: "{{ role_path }}/files/users"
dest: /apps/radicale/config/users
dest: /srv/radicale/config/users
- name: Create Radicale data directory
file:
path: /data/radicale
state: directory
- name: Start Docker Compose
docker_compose:
project_src: /apps/radicale
project_src: /srv/radicale
pull: true
remove_orphans: true

View file

@ -10,7 +10,7 @@ services:
- PGID=1000
- TZ=Europe/Amsterdam
volumes:
- /apps/syncthing/config:/config
- /srv/syncthing/config:/config
- /data/syncthing:/data
ports:
- 8384:8384

View file

@ -1,23 +1,23 @@
- name: Create Syncthing app directory
file:
path: /apps/syncthing
path: /srv/syncthing
state: directory
- name: Create Syncthing configuration directory
file:
path: /apps/syncthing/config
path: /srv/syncthing/config
state: directory
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
dest: /apps/syncthing/config/key.pem
dest: /srv/syncthing/config/key.pem
- name: Copy Syncthing certificate
copy:
src: "{{ role_path }}/files/cert.pem"
dest: /apps/syncthing/config/cert.pem
dest: /srv/syncthing/config/cert.pem
- name: Copy Syncthing configuration
template:
src: "{{ role_path }}/templates/config.xml.j2"
dest: /apps/syncthing/config/config.xml
dest: /srv/syncthing/config/config.xml
- name: Create Syncthing data directory
file:
path: /data/syncthing
@ -26,9 +26,9 @@
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/syncthing/docker-compose.yml
dest: /srv/syncthing/docker-compose.yml
- name: Start Docker Compose
docker_compose:
project_src: /apps/syncthing
project_src: /srv/syncthing
pull: true
remove_orphans: true

View file

@ -20,9 +20,9 @@ services:
- "56287:56287"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /apps/traefik/traefik.toml:/etc/traefik/traefik.toml
- /apps/traefik/services.toml:/etc/traefik/services.toml
- /apps/traefik/acme.json:/acme.json
- /srv/traefik/traefik.toml:/etc/traefik/traefik.toml
- /srv/traefik/services.toml:/etc/traefik/services.toml
- /srv/traefik/acme.json:/acme.json
networks:
- traefik
labels:

View file

@ -1,30 +1,30 @@
- name: Create traefik app directory
file:
path: /apps/traefik
path: /srv/traefik
state: directory
- name: Create acme file
copy:
content: ""
dest: /apps/traefik/acme.json
dest: /srv/traefik/acme.json
force: no
mode: 0600
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/traefik/docker-compose.yml
dest: /srv/traefik/docker-compose.yml
- name: Copy traefik.toml
copy:
src: "{{ role_path }}/files/traefik.toml"
dest: /apps/traefik/traefik.toml
dest: /srv/traefik/traefik.toml
- name: Copy services.toml
copy:
src: "{{ role_path }}/files/services.toml"
dest: /apps/traefik/services.toml
dest: /srv/traefik/services.toml
- name: Create traefik network
docker_network:
name: "traefik"
- name: Start Docker Compose
docker_compose:
project_src: /apps/traefik
project_src: /srv/traefik
pull: true
remove_orphans: true