Include ssh port, country, isp and wiki page in inventory.yml

This commit is contained in:
Arya 2023-05-14 19:08:15 +08:00
parent 53b6a53168
commit c5c9f75cc8
Signed by: arya
GPG Key ID: 842D12BDA50DF120
6 changed files with 21 additions and 43 deletions

View File

@ -1,8 +1,4 @@
{% if inventory_hostname == 'eu' %} Port {{port}}
Port 222
{% else %}
Port 22
{% endif %}
PermitRootLogin prohibit-password PermitRootLogin prohibit-password
PasswordAuthentication no PasswordAuthentication no
PermitEmptyPasswords no PermitEmptyPasswords no

View File

@ -6,6 +6,7 @@ all:
ansible_host: soleil.projectsegfau.lt ansible_host: soleil.projectsegfau.lt
ansible_user: user ansible_user: user
ansible_port: 2270 ansible_port: 2270
port: 22
ansible_become: yes # Run everything as root ansible_become: yes # Run everything as root
privfrontends: privfrontends:
hosts: hosts:
@ -13,17 +14,29 @@ all:
ansible_host: pizza1.projectsegfau.lt ansible_host: pizza1.projectsegfau.lt
ansible_user: arya ansible_user: arya
ansible_port: 222 ansible_port: 222
port: 222
ansible_become: yes # Run everything as root ansible_become: yes # Run everything as root
caddy_extras_config: templates/1-extras.Caddyfile caddy_extras_config: templates/1-extras.Caddyfile
country: Luxembourg
isp: BuyVM
wiki_page: Pizza1
us: us:
ansible_host: us.projectsegfau.lt ansible_host: us.projectsegfau.lt
ansible_user: arya ansible_user: arya
ansible_port: 22 ansible_port: 22
port: 22
ansible_become: yes # Run everything as root ansible_become: yes # Run everything as root
caddy_extras_config: templates/2-extras.Caddyfile caddy_extras_config: templates/2-extras.Caddyfile
country: United States
isp: Digital Ocean
wiki_page: US_Node
in: in:
ansible_host: in.projectsegfau.lt ansible_host: in.projectsegfau.lt
ansible_user: root ansible_user: root
ansible_port: 6922 ansible_port: 6922
port: 22
caddy_extras_config: templates/3-extras.Caddyfile caddy_extras_config: templates/3-extras.Caddyfile
country: India
isp: Bharti Airtel
wiki_page: India_Node

View File

@ -14,16 +14,8 @@ services:
- GOTHUB_USER_AGENT_LOGGED=false - GOTHUB_USER_AGENT_LOGGED=false
- GOTHUB_DIAGNOSTIC_INFO_LOGGED=false - GOTHUB_DIAGNOSTIC_INFO_LOGGED=false
- GOTHUB_INSTANCE_PRIVACY_POLICY=https://projectsegfau.lt/legal/privacy-policy - GOTHUB_INSTANCE_PRIVACY_POLICY=https://projectsegfau.lt/legal/privacy-policy
{% if inventory_hostname == 'eu' %} - GOTHUB_INSTANCE_COUNTRY={{country}}
- GOTHUB_INSTANCE_COUNTRY=Luxembourg - GOTHUB_INSTANCE_PROVIDER={{isp}}
- GOTHUB_INSTANCE_PROVIDER=BuyVM
{% else if inventory_hostname == 'us' %}
- GOTHUB_INSTANCE_COUNTRY=United States
- GOTHUB_INSTANCE_PROVIDER=Digital Ocean
{% else if inventory_hostname == 'in' %}
- GOTHUB_INSTANCE_COUNTRY=India
- GOTHUB_INSTANCE_PROVIDER=Bharti Airtel
{% endif %}
- GOTHUB_INSTANCE_CLOUDFLARE=false - GOTHUB_INSTANCE_CLOUDFLARE=false
healthcheck: healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/version || exit 1 test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/version || exit 1

View File

@ -59,16 +59,8 @@ INSTANCE_PRIVACY:
DATA_COLLECTED_DEVICE: true DATA_COLLECTED_DEVICE: true
DATA_COLLECTED_DIAGNOSTIC_ONLY: false DATA_COLLECTED_DIAGNOSTIC_ONLY: false
{% if inventory_hostname == 'eu' %} INSTANCE_COUNTRY: "{{country}}"
INSTANCE_COUNTRY: "Luxembourg" INSTANCE_PROVIDER: "{{isp}}"
INSTANCE_PROVIDER: "BuyVM"
{% else if inventory_hostname == 'us' %}
INSTANCE_COUNTRY: "United States"
INSTANCE_PROVIDER: "Digital Ocean"
{% else if inventory_hostname == 'in' %}
INSTANCE_COUNTRY: "India"
INSTANCE_PROVIDER: "Bharti Airtel"
{% endif %}
# Cloudflare use is discouraged. You can set this to false if it is not proxied (gray cloud icon) # Cloudflare use is discouraged. You can set this to false if it is not proxied (gray cloud icon)
INSTANCE_CLOUDFLARE: false INSTANCE_CLOUDFLARE: false

View File

@ -10,16 +10,8 @@ services:
- IMGUR_CLIENT_ID=546c25a59c58ad7 - IMGUR_CLIENT_ID=546c25a59c58ad7
- PRIVACY_POLICY=https://projectsegfau.lt/legal/privacy-policy - PRIVACY_POLICY=https://projectsegfau.lt/legal/privacy-policy
- PRIVACY_MESSAGE= - PRIVACY_MESSAGE=
{% if inventory_hostname == 'eu' %} - PRIVACY_COUNTRY={{country}}
- PRIVACY_COUNTRY=Luxembourg - PRIVACY_PROVIDER={{isp}}
- PRIVACY_PROVIDER=BuyVM
{% else if inventory_hostname == 'us' %}
- PRIVACY_COUNTRY=USA
- PRIVACY_PROVIDER=Digital Ocean
{% else if inventory_hostname == 'in' %}
- PRIVACY_COUNTRY=India
- PRIVACY_PROVIDER=Bharti Airtel
{% endif %}
- PRIVACY_CLOUDFLARE=false - PRIVACY_CLOUDFLARE=false
- PRIVACY_NOT_COLLECTED=true - PRIVACY_NOT_COLLECTED=true
restart: unless-stopped restart: unless-stopped

View File

@ -54,14 +54,7 @@
{% endif %} {% endif %}
} }
{{inventory_hostname}}.projectsegfau.lt {% if inventory_hostname == 'eu' %} pizza1.projectsegfau.lt {% endif %} { {{inventory_hostname}}.projectsegfau.lt {% if inventory_hostname == 'eu' %} pizza1.projectsegfau.lt {% endif %} {
{% if inventory_hostname == 'eu' %} redir https://wiki.projectsegfau.lt/index.php?title={{wiki_page}}
redir https://wiki.projectsegfau.lt/index.php?title=Pizza1
{% elif inventory_hostname == 'us' %}
redir https://wiki.projectsegfau.lt/index.php?title=US_Node
{% elif inventory_hostname == 'in' %}
redir https://wiki.projectsegfau.lt/index.php?title=India_Node
{% else %}
{% endif %}
} }
cdn.projectsegfau.lt cdn.{{inventory_hostname}}.projectsegfau.lt { cdn.projectsegfau.lt cdn.{{inventory_hostname}}.projectsegfau.lt {
encode zstd gzip encode zstd gzip