prepare for mastodon
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Torma Kristóf 2022-11-23 15:17:59 +01:00
parent 21f0843995
commit 85e0b9f978
8 changed files with 55 additions and 6 deletions

View File

@ -26,6 +26,8 @@ steps:
environment:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
settings:
playbook: nightly.yaml
galaxy: requirements.yaml
@ -37,6 +39,8 @@ steps:
environment:
ANSIBLE_HOST_KEY_CHECKING: "False"
ANSIBLE_PRIVATE_KEY_FILE: "/drone/src/id_rsa"
ARTIFACTORY_APT_PASSWORD:
from_secret: ARTIFACTORY_APT_PASSWORD
settings:
playbook: nightly.yaml
galaxy: requirements.yaml

View File

@ -2,7 +2,11 @@
ansible_host: mastodon.intra.tormakris.dev
webserver:
- domain: "mastodon.tormakristof.eu"
port: 8080
bigrequests: false
port: 3000
bigrequests: true
https: false
additionallocations:
- location: "/api/v1/streaming"
https: false
port: 4000
...

View File

@ -3,10 +3,14 @@ ansible_host: matrix.intra.tormakris.dev
webserver:
- domain: "matrix.tormakristof.eu"
port: 8080
bigrequests: false
bigrequests: true
https: false
- domain: "chat.tormakristof.eu"
port: 8181
bigrequests: false
bigrequests: true
https: false
firewall:
- port: "9000"
proto: tcp
interface: "eth0"
...

View File

@ -1,4 +1,21 @@
---
- name: "Use custom Ubuntu mirror"
replace:
path: /etc/apt/sources.list
regexp: 'http://hu.archive.ubuntu.com'
replace: 'https://tormakris.jfrog.io/artifactory/ubuntu-mirror'
backup: yes
- name: "Get JFrog password from local environment variable"
ansible.builtin.set_fact:
artifactory_password: "{{ lookup('env', 'ARTIFACTORY_APT_PASSWORD') }}"
delegate_to: localhost
- name: "Render JFrog credentials configuration"
template:
src: jrog.conf.template
dest: /etc/apt/auth.conf.d/jfrog.conf
- name: "Remove Ubuntu bloatware"
apt:
state: absent
@ -35,4 +52,5 @@
- tcpdump
- xxd
- git
- ncdu
...

View File

@ -0,0 +1,3 @@
machine tormakris.jfrog.io
login apt
password {{ artifactory_password }}

View File

@ -132,6 +132,10 @@ http {
location /.well-known{
try_files $uri $uri/ =404;
}
location /.well-known/webfinger {
return 301 https://mastodon.tormakristof.eu$request_uri;
}
}
server {

View File

@ -4,8 +4,8 @@ proxy:
- {domain: drone.kmlabz.com, ip: drone.intra.tormakris.dev, bigrequests: false}
- {domain: git.kmlabz.com, ip: git.intra.tormakris.dev, bigrequests: false}
- {domain: guacamole.tormakristof.eu, ip: guacamole.intra.tormakris.dev, bigrequests: false}
- {domain: matrix.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: false}
- {domain: chat.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: false}
- {domain: matrix.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: true}
- {domain: chat.tormakristof.eu, ip: matrix.intra.tormakris.dev, bigrequests: true}
- {domain: nexus.kmlabz.com, ip: nexus.intra.tormakris.dev, bigrequests: true}
- {domain: registry.kmlabz.com, ip: nexus.intra.tormakris.dev, bigrequests: true}
- {domain: swagger.kmlabz.com, ip: swagger.intra.tormakris.dev, bigrequests: false}
@ -15,6 +15,7 @@ proxy:
- {domain: sharepoint.tormakristof.eu, ip: sharepoint.intra.tormakris.dev, bigrequests: true}
- {domain: onedrive.tormakristof.eu, ip: sharepoint.intra.tormakris.dev, bigrequests: true}
- {domain: yt.tormakristof.eu, ip: ytmirror.intra.tormakris.dev, bigrequests: true}
- {domain: mastodon.tormakristof.eu, ip: mastodon.intra.tormakris.dev, bigrequests: true}
static:
[]

View File

@ -88,6 +88,17 @@ http {
allow 192.168.69.0/24;
deny all;
}
{%- if server.additionallocations is defined %}
{%- for location in server.additionallocations %}
location {{location.location}}{
{% if location.https %}
proxy_pass https://127.0.0.1:{{ location.port }};
{% else %}
proxy_pass http://127.0.0.1:{{ location.port }};
{% endif %}
}
{%- endfor %}
{%- endif %}
}
{% endfor %}