forked from Netz39_Admin/netz39-infra-ansible
Compare commits
14 commits
master
...
cac6cca105
Author | SHA1 | Date | |
---|---|---|---|
cac6cca105 | |||
85f2d98704 | |||
6f4ede5c5f | |||
babeef8226 | |||
639c1c6c52 | |||
d50247690a | |||
89df671708 | |||
4af65ede5a | |||
b04a9a0e2b | |||
3aced1fe46 | |||
18da9dc52e | |||
675d7a64e8 | |||
b5286cb6cb | |||
cc0b075d2c |
6 changed files with 213 additions and 138 deletions
13
.editorconfig
Normal file
13
.editorconfig
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# EditorConfig is awesome: https://EditorConfig.org
|
||||||
|
|
||||||
|
# top-most EditorConfig file
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# Unix-style newlines with a newline ending every file
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
|
@ -3,6 +3,7 @@
|
||||||
Currently including the following hosts:
|
Currently including the following hosts:
|
||||||
* tau.netz39.de
|
* tau.netz39.de
|
||||||
* pottwal.n39.eu
|
* pottwal.n39.eu
|
||||||
|
* unicorn.n39.eu
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -76,4 +76,5 @@ all:
|
||||||
31356239323439666632333033616366663762646366343839663463633665333863343437343334
|
31356239323439666632333033616366663762646366343839663463633665333863343437343334
|
||||||
3665386538393066380a383366346235343531306561643534663035646537666534383536333230
|
3665386538393066380a383366346235343531306561643534663035646537666534383536333230
|
||||||
34613761363237633865306332653631323366343232353666343165666664343838
|
34613761363237633865306332653631323366343232353666343165666664343838
|
||||||
|
unicorn.n39.eu:
|
||||||
|
server_admin: "admin+unicorn@netz39.de"
|
||||||
|
|
3
main.yml
3
main.yml
|
@ -39,3 +39,6 @@
|
||||||
|
|
||||||
- name: Pottwal specific setup
|
- name: Pottwal specific setup
|
||||||
import_playbook: pottwal.yml
|
import_playbook: pottwal.yml
|
||||||
|
|
||||||
|
- name: Specific setup for host unicorn
|
||||||
|
import_playbook: unicorn.yml
|
||||||
|
|
46
pottwal.yml
46
pottwal.yml
|
@ -14,6 +14,7 @@
|
||||||
openhab_configuration_source: https://github.com/netz39/n39-openhab.git
|
openhab_configuration_source: https://github.com/netz39/n39-openhab.git
|
||||||
openhab_configuration_version: master
|
openhab_configuration_version: master
|
||||||
|
|
||||||
|
gitea_host_port: 9091
|
||||||
uritools_host_port: 8080
|
uritools_host_port: 8080
|
||||||
entities_validation_svc_host_port: 8082
|
entities_validation_svc_host_port: 8082
|
||||||
shlink_host_port: 8083
|
shlink_host_port: 8083
|
||||||
|
@ -26,6 +27,50 @@
|
||||||
- role: apache
|
- role: apache
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- name: Check if gitea data dir exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "/srv/data/gitea"
|
||||||
|
register: gitea_dir
|
||||||
|
- name: Fail if gitea data dir does not exist
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "Gitea data dir is missing, please restore from the backup!"
|
||||||
|
when: not gitea_dir.stat.exists
|
||||||
|
|
||||||
|
# If port 2222 is changed here, it must also be adapted
|
||||||
|
# in the gitea config file (see application volume)!!
|
||||||
|
- name: Setup the docker container for gitea
|
||||||
|
docker_container:
|
||||||
|
name: gitea
|
||||||
|
image: "gitea/gitea:1.15.10"
|
||||||
|
pull: true
|
||||||
|
state: started
|
||||||
|
restart_policy: unless-stopped
|
||||||
|
detach: yes
|
||||||
|
ports:
|
||||||
|
# - 127.0.0.1:{{ gitea_host_port }}:3000
|
||||||
|
- "{{ gitea_host_port }}:3000"
|
||||||
|
- 2222:2222
|
||||||
|
env:
|
||||||
|
APP_NAME="Netz39 Gitea"
|
||||||
|
RUN_MODE="prod"
|
||||||
|
SSH_DOMAIN="gitea.n39.eu"
|
||||||
|
SSH_PORT="2222"
|
||||||
|
SSH_START_SERVER="false"
|
||||||
|
ROOT_URL="https://gitea.n39.eu"
|
||||||
|
DISABLE_REGISTRATION="true"
|
||||||
|
USER_UID=1000
|
||||||
|
USER_GID=1000
|
||||||
|
volumes:
|
||||||
|
- "/srv/data/gitea:/data:rw"
|
||||||
|
|
||||||
|
- name: Setup proxy site gitea.n39.eu
|
||||||
|
include_role:
|
||||||
|
name: setup-http-site-proxy
|
||||||
|
vars:
|
||||||
|
site_name: "gitea.n39.eu"
|
||||||
|
proxy_port: "{{ gitea_host_port }}"
|
||||||
|
|
||||||
- name: Ensure apt-cacher container is running
|
- name: Ensure apt-cacher container is running
|
||||||
docker_container:
|
docker_container:
|
||||||
name: apt_cacher_ng
|
name: apt_cacher_ng
|
||||||
|
@ -37,6 +82,7 @@
|
||||||
ports:
|
ports:
|
||||||
- 3142:3142
|
- 3142:3142
|
||||||
|
|
||||||
|
|
||||||
- name: Ensure the mosquitto directories exist
|
- name: Ensure the mosquitto directories exist
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item }}"
|
||||||
|
|
11
unicorn.yml
Normal file
11
unicorn.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
- hosts: unicorn.n39.eu
|
||||||
|
become: true
|
||||||
|
|
||||||
|
vars:
|
||||||
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- role: docker_setup
|
||||||
|
vars:
|
||||||
|
docker_data_root: "/srv/docker"
|
Loading…
Reference in a new issue