move to /srv
This commit is contained in:
parent
5331d25c4a
commit
5bf6d7acbc
13 changed files with 44 additions and 46 deletions
|
@ -1,8 +1,6 @@
|
||||||
# Ansible scripts for our private Intel NUC servers
|
# Ansible scripts for our private Intel NUC servers
|
||||||
## TODO
|
## TODO
|
||||||
|
|
||||||
- Move to /srv directory?
|
|
||||||
|
|
||||||
### nsd
|
### nsd
|
||||||
|
|
||||||
- ZSK rollover.
|
- ZSK rollover.
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
file:
|
file:
|
||||||
path: /data
|
path: /data
|
||||||
state: directory
|
state: directory
|
||||||
- name: Create /apps directory
|
- name: Create /srv directory
|
||||||
file:
|
file:
|
||||||
path: /apps
|
path: /srv
|
||||||
state: directory
|
state: directory
|
||||||
- name: Disable systemd-resolved
|
- name: Disable systemd-resolved
|
||||||
systemd:
|
systemd:
|
||||||
|
|
|
@ -16,7 +16,7 @@ services:
|
||||||
- traefik
|
- traefik
|
||||||
volumes:
|
volumes:
|
||||||
- /data/forgejo:/data
|
- /data/forgejo:/data
|
||||||
- /apps/forgejo/conf:/data/gitea/conf
|
- /srv/forgejo/conf:/data/gitea/conf
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
- /etc/localtime:/etc/localtime:ro
|
- /etc/localtime:/etc/localtime:ro
|
||||||
labels:
|
labels:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
- name: Create app directory
|
- name: Create app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/forgejo
|
path: /srv/forgejo
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy Docker Compose script
|
- name: Copy Docker Compose script
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/docker-compose.yml"
|
src: "{{ role_path }}/files/docker-compose.yml"
|
||||||
dest: /apps/forgejo/docker-compose.yml
|
dest: /srv/forgejo/docker-compose.yml
|
||||||
- name: Create data directory
|
- name: Create data directory
|
||||||
file:
|
file:
|
||||||
path: /data/forgejo
|
path: /data/forgejo
|
||||||
|
@ -14,18 +14,18 @@
|
||||||
group: 1000
|
group: 1000
|
||||||
- name: Copy conf directory
|
- name: Copy conf directory
|
||||||
file:
|
file:
|
||||||
path: /apps/forgejo/conf
|
path: /srv/forgejo/conf
|
||||||
state: directory
|
state: directory
|
||||||
owner: 1000
|
owner: 1000
|
||||||
group: 1000
|
group: 1000
|
||||||
- name: Copy app.ini
|
- name: Copy app.ini
|
||||||
template:
|
template:
|
||||||
src: "{{ role_path }}/templates/app.ini"
|
src: "{{ role_path }}/templates/app.ini"
|
||||||
dest: /apps/forgejo/conf/app.ini
|
dest: /srv/forgejo/conf/app.ini
|
||||||
register: config
|
register: config
|
||||||
- name: Start the Docker Compose
|
- name: Start the Docker Compose
|
||||||
community.docker.docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/forgejo
|
project_src: /srv/forgejo
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
restarted: "{{ config.changed }}"
|
restarted: "{{ config.changed }}"
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
- name: Create app directory
|
- name: Create app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/kms
|
path: /srv/kms
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy Docker Compose script
|
- name: Copy Docker Compose script
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/docker-compose.yml"
|
src: "{{ role_path }}/files/docker-compose.yml"
|
||||||
dest: /apps/kms/docker-compose.yml
|
dest: /srv/kms/docker-compose.yml
|
||||||
- name: Start the Docker Compose
|
- name: Start the Docker Compose
|
||||||
community.docker.docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/kms
|
project_src: /srv/kms
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
- name: Create Mastodon app directory
|
- name: Create Mastodon app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/mastodon
|
path: /srv/mastodon
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy .env.production
|
- name: Copy .env.production
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/.env.production"
|
src: "{{ role_path }}/files/.env.production"
|
||||||
dest: /apps/mastodon/.env.production
|
dest: /srv/mastodon/.env.production
|
||||||
- name: Copy Docker Compose script
|
- name: Copy Docker Compose script
|
||||||
template:
|
template:
|
||||||
src: "{{ role_path }}/templates/docker-compose.yml.j2"
|
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
|
- name: Create Mastodon data directory
|
||||||
file:
|
file:
|
||||||
path: /data/mastodon
|
path: /data/mastodon
|
||||||
|
@ -17,6 +17,6 @@
|
||||||
mode: 0777
|
mode: 0777
|
||||||
- name: Start Docker Compose
|
- name: Start Docker Compose
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/mastodon
|
project_src: /srv/mastodon
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
- name: Clone pizzeria repository
|
- name: Clone pizzeria repository
|
||||||
git:
|
git:
|
||||||
repo: "{{ pizzeria.git_origin }}"
|
repo: "{{ pizzeria.git_origin }}"
|
||||||
dest: /apps/pizzeria
|
dest: /srv/pizzeria
|
||||||
- name: Start the Docker Compose
|
- name: Start the Docker Compose
|
||||||
community.docker.docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/pizzeria
|
project_src: /srv/pizzeria
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
|
@ -10,7 +10,7 @@ services:
|
||||||
image: mailu/radicale:1.9
|
image: mailu/radicale:1.9
|
||||||
volumes:
|
volumes:
|
||||||
- /data/radicale:/data
|
- /data/radicale:/data
|
||||||
- /apps/radicale/config:/radicale
|
- /srv/radicale/config:/radicale
|
||||||
command: radicale -S -C /radicale/radicale.conf
|
command: radicale -S -C /radicale/radicale.conf
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
- name: Create Radicale app directory
|
- name: Create Radicale app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/radicale
|
path: /srv/radicale
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy docker-compose.yml file
|
- name: Copy docker-compose.yml file
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/docker-compose.yml"
|
src: "{{ role_path }}/files/docker-compose.yml"
|
||||||
dest: /apps/radicale/docker-compose.yml
|
dest: /srv/radicale/docker-compose.yml
|
||||||
- name: Create Radicale config directory
|
- name: Create Radicale config directory
|
||||||
file:
|
file:
|
||||||
path: /apps/radicale/config
|
path: /srv/radicale/config
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy radicale.conf
|
- name: Copy radicale.conf
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/radicale.conf"
|
src: "{{ role_path }}/files/radicale.conf"
|
||||||
dest: /apps/radicale/config/radicale.conf
|
dest: /srv/radicale/config/radicale.conf
|
||||||
- name: Copy users file
|
- name: Copy users file
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/users"
|
src: "{{ role_path }}/files/users"
|
||||||
dest: /apps/radicale/config/users
|
dest: /srv/radicale/config/users
|
||||||
- name: Create Radicale data directory
|
- name: Create Radicale data directory
|
||||||
file:
|
file:
|
||||||
path: /data/radicale
|
path: /data/radicale
|
||||||
state: directory
|
state: directory
|
||||||
- name: Start Docker Compose
|
- name: Start Docker Compose
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/radicale
|
project_src: /srv/radicale
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
|
@ -10,7 +10,7 @@ services:
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
- TZ=Europe/Amsterdam
|
- TZ=Europe/Amsterdam
|
||||||
volumes:
|
volumes:
|
||||||
- /apps/syncthing/config:/config
|
- /srv/syncthing/config:/config
|
||||||
- /data/syncthing:/data
|
- /data/syncthing:/data
|
||||||
ports:
|
ports:
|
||||||
- 8384:8384
|
- 8384:8384
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
- name: Create Syncthing app directory
|
- name: Create Syncthing app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/syncthing
|
path: /srv/syncthing
|
||||||
state: directory
|
state: directory
|
||||||
- name: Create Syncthing configuration directory
|
- name: Create Syncthing configuration directory
|
||||||
file:
|
file:
|
||||||
path: /apps/syncthing/config
|
path: /srv/syncthing/config
|
||||||
state: directory
|
state: directory
|
||||||
- name: Copy Syncthing private key
|
- name: Copy Syncthing private key
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/key.pem"
|
src: "{{ role_path }}/files/key.pem"
|
||||||
dest: /apps/syncthing/config/key.pem
|
dest: /srv/syncthing/config/key.pem
|
||||||
- name: Copy Syncthing certificate
|
- name: Copy Syncthing certificate
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/cert.pem"
|
src: "{{ role_path }}/files/cert.pem"
|
||||||
dest: /apps/syncthing/config/cert.pem
|
dest: /srv/syncthing/config/cert.pem
|
||||||
- name: Copy Syncthing configuration
|
- name: Copy Syncthing configuration
|
||||||
template:
|
template:
|
||||||
src: "{{ role_path }}/templates/config.xml.j2"
|
src: "{{ role_path }}/templates/config.xml.j2"
|
||||||
dest: /apps/syncthing/config/config.xml
|
dest: /srv/syncthing/config/config.xml
|
||||||
- name: Create Syncthing data directory
|
- name: Create Syncthing data directory
|
||||||
file:
|
file:
|
||||||
path: /data/syncthing
|
path: /data/syncthing
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
- name: Copy Docker Compose script
|
- name: Copy Docker Compose script
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/docker-compose.yml"
|
src: "{{ role_path }}/files/docker-compose.yml"
|
||||||
dest: /apps/syncthing/docker-compose.yml
|
dest: /srv/syncthing/docker-compose.yml
|
||||||
- name: Start Docker Compose
|
- name: Start Docker Compose
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/syncthing
|
project_src: /srv/syncthing
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
|
@ -20,9 +20,9 @@ services:
|
||||||
- "56287:56287"
|
- "56287:56287"
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- /apps/traefik/traefik.toml:/etc/traefik/traefik.toml
|
- /srv/traefik/traefik.toml:/etc/traefik/traefik.toml
|
||||||
- /apps/traefik/services.toml:/etc/traefik/services.toml
|
- /srv/traefik/services.toml:/etc/traefik/services.toml
|
||||||
- /apps/traefik/acme.json:/acme.json
|
- /srv/traefik/acme.json:/acme.json
|
||||||
networks:
|
networks:
|
||||||
- traefik
|
- traefik
|
||||||
labels:
|
labels:
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
- name: Create traefik app directory
|
- name: Create traefik app directory
|
||||||
file:
|
file:
|
||||||
path: /apps/traefik
|
path: /srv/traefik
|
||||||
state: directory
|
state: directory
|
||||||
- name: Create acme file
|
- name: Create acme file
|
||||||
copy:
|
copy:
|
||||||
content: ""
|
content: ""
|
||||||
dest: /apps/traefik/acme.json
|
dest: /srv/traefik/acme.json
|
||||||
force: no
|
force: no
|
||||||
mode: 0600
|
mode: 0600
|
||||||
- name: Copy Docker Compose script
|
- name: Copy Docker Compose script
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/docker-compose.yml"
|
src: "{{ role_path }}/files/docker-compose.yml"
|
||||||
dest: /apps/traefik/docker-compose.yml
|
dest: /srv/traefik/docker-compose.yml
|
||||||
- name: Copy traefik.toml
|
- name: Copy traefik.toml
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/traefik.toml"
|
src: "{{ role_path }}/files/traefik.toml"
|
||||||
dest: /apps/traefik/traefik.toml
|
dest: /srv/traefik/traefik.toml
|
||||||
- name: Copy services.toml
|
- name: Copy services.toml
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/files/services.toml"
|
src: "{{ role_path }}/files/services.toml"
|
||||||
dest: /apps/traefik/services.toml
|
dest: /srv/traefik/services.toml
|
||||||
- name: Create traefik network
|
- name: Create traefik network
|
||||||
docker_network:
|
docker_network:
|
||||||
name: "traefik"
|
name: "traefik"
|
||||||
- name: Start Docker Compose
|
- name: Start Docker Compose
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: /apps/traefik
|
project_src: /srv/traefik
|
||||||
pull: true
|
pull: true
|
||||||
remove_orphans: true
|
remove_orphans: true
|
||||||
|
|
Reference in a new issue