Compare commits
No commits in common. "57fe2ed42c45b1dfd0c1da01fa2f570dc3f4596f" and "d6c2dd419a9ca60e27986811603d8db15a89636b" have entirely different histories.
57fe2ed42c
...
d6c2dd419a
6 changed files with 3 additions and 142 deletions
|
@ -28,7 +28,7 @@ resource "healthchecksio_check" "backup" {
|
||||||
]
|
]
|
||||||
|
|
||||||
timeout = 86400
|
timeout = 86400
|
||||||
grace = 3600
|
grace = 1800
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "healthchecksio_check" "healthcheck" {
|
resource "healthchecksio_check" "healthcheck" {
|
||||||
|
|
|
@ -24,7 +24,7 @@ variable "services" {
|
||||||
})))
|
})))
|
||||||
ports = optional(list(object({
|
ports = optional(list(object({
|
||||||
description = string
|
description = string
|
||||||
port = string
|
port = number
|
||||||
protocol = string
|
protocol = string
|
||||||
type = string
|
type = string
|
||||||
})))
|
})))
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
---
|
|
||||||
- name: Set common facts
|
|
||||||
ansible.builtin.import_tasks: tasks/set-default-facts.yml
|
|
||||||
|
|
||||||
- name: Deploy {{ role_name }}
|
|
||||||
vars:
|
|
||||||
svc: "{{ factorio_svc }}"
|
|
||||||
env: "{{ factorio_env }}"
|
|
||||||
json: "{{ factorio_json }}"
|
|
||||||
compose: "{{ factorio_compose }}"
|
|
||||||
block:
|
|
||||||
- name: Import prepare tasks for common service
|
|
||||||
ansible.builtin.import_tasks: tasks/prepare-common-service.yml
|
|
||||||
|
|
||||||
- name: Set config path
|
|
||||||
ansible.builtin.set_fact:
|
|
||||||
config_path: "{{ (service_path, 'config') | path_join }}"
|
|
||||||
- name: Create config directory
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: "{{ config_path }}"
|
|
||||||
state: directory
|
|
||||||
mode: "0755"
|
|
||||||
owner: "{{ factorio_uid }}"
|
|
||||||
group: "{{ factorio_gid }}"
|
|
||||||
become: true
|
|
||||||
- name: Template the server settings
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: "json.j2"
|
|
||||||
dest: "{{ (config_path, 'server-settings.json') | path_join }}"
|
|
||||||
mode: "0644"
|
|
||||||
owner: "{{ factorio_uid }}"
|
|
||||||
group: "{{ factorio_gid }}"
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Import start tasks for common service
|
|
||||||
ansible.builtin.import_tasks: tasks/start-common-service.yml
|
|
|
@ -1,66 +0,0 @@
|
||||||
---
|
|
||||||
factorio_port: 34197
|
|
||||||
factorio_uid: 845
|
|
||||||
factorio_gid: 845
|
|
||||||
|
|
||||||
factorio_svc:
|
|
||||||
domain: "{{ all_services | service_get_domain(role_name) }}"
|
|
||||||
port: "{{ factorio_port }}"
|
|
||||||
|
|
||||||
factorio_env:
|
|
||||||
PORT: "{{ factorio_port }}"
|
|
||||||
USERNAME: "{{ vault_factorio.username }}"
|
|
||||||
TOKEN: "{{ vault_factorio.token }}"
|
|
||||||
|
|
||||||
factorio_json:
|
|
||||||
name: "StammtischOnAutomation"
|
|
||||||
description: "Private Server"
|
|
||||||
tags: []
|
|
||||||
|
|
||||||
max_players: 0
|
|
||||||
visibility:
|
|
||||||
public: true
|
|
||||||
lan: true
|
|
||||||
|
|
||||||
username: "{{ vault_factorio.username }}"
|
|
||||||
password: ""
|
|
||||||
token: "{{ vault_factorio.token }}"
|
|
||||||
|
|
||||||
game_password: "{{ vault_factorio.game_password }}"
|
|
||||||
require_user_verification: true
|
|
||||||
|
|
||||||
max_upload_in_kilobytes_per_second: 0
|
|
||||||
max_upload_slots: 0
|
|
||||||
max_heartbeats_per_second: 60
|
|
||||||
ignore_player_limit_for_returning_players: true
|
|
||||||
allow_commands: "admins-only"
|
|
||||||
autosave_interval: 10
|
|
||||||
autosave_slots: 6
|
|
||||||
afk_autokick_interval: 60
|
|
||||||
|
|
||||||
auto_pause: true
|
|
||||||
auto_pause_when_players_connect: false
|
|
||||||
only_admins_can_pause_the_game: true
|
|
||||||
autosave_only_on_server: true
|
|
||||||
non_blocking_saving: false
|
|
||||||
|
|
||||||
minimum_segment_size: 25
|
|
||||||
minimum_segment_size_peer_count: 20
|
|
||||||
maximum_segment_size: 100
|
|
||||||
maximum_segment_size_peer_count: 10
|
|
||||||
|
|
||||||
|
|
||||||
factorio_compose:
|
|
||||||
watchtower: false
|
|
||||||
image: "factoriotools/factorio:stable"
|
|
||||||
volumes:
|
|
||||||
- data:/factorio
|
|
||||||
- ./config:/factorio/config
|
|
||||||
file:
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
ports:
|
|
||||||
- "{{ factorio_port }}:{{ factorio_port }}/udp"
|
|
||||||
- "27015:27015/tcp"
|
|
||||||
volumes:
|
|
||||||
data:
|
|
|
@ -128,43 +128,6 @@ services = {
|
||||||
s3 = false
|
s3 = false
|
||||||
},
|
},
|
||||||
|
|
||||||
"factorio" = {
|
|
||||||
host = "node001"
|
|
||||||
dns = [{
|
|
||||||
domain = "factorio.serguzim.me"
|
|
||||||
}]
|
|
||||||
backup = [{
|
|
||||||
name = "factorio_data"
|
|
||||||
type = "docker"
|
|
||||||
}]
|
|
||||||
monitoring = {
|
|
||||||
url = "https://multiplayer.factorio.com/get-game-details/49.13.212.188:34197"
|
|
||||||
group = "4-services"
|
|
||||||
interval = "5m"
|
|
||||||
conditions = [
|
|
||||||
"DEFAULT",
|
|
||||||
"[BODY].name == StammtischOnAutomation"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
ports = [
|
|
||||||
{
|
|
||||||
description = "Game port for factorio"
|
|
||||||
port = 34197
|
|
||||||
protocol = "udp"
|
|
||||||
type = "firewall"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
description = "RCON port for factorio"
|
|
||||||
port = 27015
|
|
||||||
protocol = "tcp"
|
|
||||||
type = "firewall"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
auth = false
|
|
||||||
database = false
|
|
||||||
s3 = false
|
|
||||||
}
|
|
||||||
|
|
||||||
"forgejo" = {
|
"forgejo" = {
|
||||||
host = "node001"
|
host = "node001"
|
||||||
dns = [{
|
dns = [{
|
||||||
|
|
|
@ -153,7 +153,7 @@ variable "services" {
|
||||||
}))
|
}))
|
||||||
ports = optional(list(object({
|
ports = optional(list(object({
|
||||||
description = string
|
description = string
|
||||||
port = string
|
port = number
|
||||||
protocol = string
|
protocol = string
|
||||||
type = string
|
type = string
|
||||||
})))
|
})))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue