This commit is contained in:
2026-08-27 05:38:32 +00:00
parent 2a29dc9195
commit 43204e8441
78 changed files with 904 additions and 1235 deletions
+13 -13
View File
@@ -59,15 +59,15 @@
line: "{{ terminus_key }}"
when: terminuskey_test.stdout == "0"
- name: Check rohan public key
shell: "grep -c \"{{ rohan_key }}\" /home/{{ user }}/.ssh/authorized_keys || true"
register: rohankey_test
- name: Check clair public key
shell: "grep -c \"{{ clair_key }}\" /home/{{ user }}/.ssh/authorized_keys || true"
register: clairkey_test
- name: Add Rohan public key
- name: Add clair public key
lineinfile:
dest: "/home/{{ user }}/.ssh/authorized_keys"
line: "{{ rohan_key }}"
when: rohankey_test.stdout == "0"
line: "{{ clair_key }}"
when: clairkey_test.stdout == "0"
- name: Check Anjin public key
shell: "grep -c \"{{ anjin_key }}\" /home/{{ user }}/.ssh/authorized_keys || true"
@@ -146,21 +146,21 @@
groups: lp
append: yes
- name: install rohan-redis-tunnel systemd unit file
- name: install nats-tunnel systemd unit file
template:
src: "files/rohan-redis-tunnel.service"
dest: "/etc/systemd/system/rohan-redis-tunnel.service"
src: "files/nats-tunnel.service"
dest: "/etc/systemd/system/nats-tunnel.service"
- name: enable service rohan-redis-tunnel and ensure it is not masked
- name: enable service nats-tunnel and ensure it is not masked
systemd:
name: rohan-redis-tunnel
name: nats-tunnel
enabled: yes
masked: no
- name: Make sure rohan-redis-tunnel service is running
- name: Make sure nats-tunnel service is running
systemd:
state: started
name: rohan-redis-tunnel
name: nats-tunnel
- name: install leardal systemd unit file
template:
+2 -2
View File
@@ -1,4 +1,4 @@
Host rohan rohan.tanshu.com
HostName rohan.tanshu.com
Host {{ server }} {{ server }}.tanshu.com
HostName {{ server }}.tanshu.com
IdentityFile ~/.ssh/id_ed25519
User tanshu
+4 -4
View File
@@ -1,9 +1,9 @@
[Unit]
Description=Frank container service
After=docker.service rohan-redis-tunnel.service
Wants=network-online.target docker.socket rohan-redis-tunnel.service
Requires=docker.socket rohan-redis-tunnel.service
PartOf=rohan-redis-tunnel.service
After=docker.service {{ server }}-redis-tunnel.service
Wants=network-online.target docker.socket {{ server }}-redis-tunnel.service
Requires=docker.socket {{ server }}-redis-tunnel.service
PartOf={{ server }}-redis-tunnel.service
[Service]
Restart=always
+1 -1
View File
@@ -6,7 +6,7 @@ After=network.target
Type=simple
User={{ user }}
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -R {{ ssh_port }}:localhost:22 tanshu@rohan.tanshu.com
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -R {{ ssh_port }}:localhost:22 tanshu@{{ server }}.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
Restart=always
@@ -5,7 +5,7 @@ After=network.target
[Service]
User={{ user }}
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -L 6379:localhost:6379 tanshu@rohan.tanshu.com
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -L 4222:localhost:4222 tanshu@{{ server }}.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5
-39
View File
@@ -1,39 +0,0 @@
server {
listen 80;
server_name {{ http_host }};
# Allow large attachments
client_max_body_size 128M;
location /api {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /token {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /refresh {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /db-image {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location / {
root /var/lib/{{ host_directory }}/frontend;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
+2 -1
View File
@@ -3,5 +3,6 @@ hostname: "moz2"
ssh_port: "22542"
user: "vari"
terminus_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK8WQHla0uCcNwmN0DUE49lbjNWa6+7A6OxrX3WEPQH0 tanshu@terminus 2023.01.08"
rohan_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKk6HHpwGQTfciXFaKOBWg+zh09XtTYvYxFZaaW3yMln tanshu@rohan 2023.08.06"
clair_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBeTz3weHvjJRTlBg+ovP3KfQNDvyn9mVsekAGwX1HMn tanshu@clair 2025-06-30"
anjin_key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMlvalE0JqKyjpEsGTgtf/N1d9QK2MgNFJib+e8O2h9M tanshu@anjin 2024.09.28"
server: "clair"