-
-
Notifications
You must be signed in to change notification settings - Fork 98
/
main.yml
139 lines (114 loc) · 6.17 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
#########################################################################
# Title: Saltbox: minecraft #
# Author(s): jolbol1 #
# URL: https://github.com/saltyorg/Saltbox #
#########################################################################
# GNU General Public License v3.0 #
#########################################################################
---
################################
# Basics
################################
minecraft_instances: ["minecraft"]
################################
# Paths
################################
minecraft_paths_folder: "minecraft"
minecraft_paths_location: "{{ server_appdata_path }}/{{ minecraft_paths_folder }}"
minecraft_paths_folders_list:
- "{{ minecraft_paths_location }}/"
- "{{ minecraft_paths_location }}/{{ minecraft_name }}"
- "{{ minecraft_paths_location }}/{{ minecraft_name }}/data"
minecraft_paths_recursive: true
################################
# Web
################################
minecraft_web_subdomain: "{{ minecraft_name }}"
minecraft_web_domain: "{{ user.domain }}"
################################
# DNS
################################
minecraft_dns_record: "{{ lookup('vars', minecraft_name + '_web_subdomain', default=minecraft_web_subdomain) }}"
minecraft_dns_zone: "{{ lookup('vars', minecraft_name + '_web_domain', default=minecraft_web_domain) }}"
minecraft_dns_proxy: false
################################
# Docker
################################
# Container
minecraft_docker_container: "{{ minecraft_name }}"
# Image
minecraft_docker_image_pull: true
minecraft_docker_image_repo: "itzg/minecraft-server"
minecraft_docker_image_tag: "latest"
minecraft_docker_image: "{{ lookup('vars', minecraft_name + '_docker_image_repo', default=minecraft_docker_image_repo)
+ ':' + lookup('vars', minecraft_name + '_docker_image_tag', default=minecraft_docker_image_tag) }}"
# Ports
minecraft_docker_ports_defaults: []
minecraft_docker_ports_custom: []
minecraft_docker_ports: "{{ minecraft_docker_ports_defaults
+ minecraft_docker_ports_custom }}"
# Envs
minecraft_docker_envs_default:
TZ: "{{ tz }}"
EULA: "TRUE"
UID: "{{ uid }}"
GID: "{{ gid }}"
minecraft_docker_envs_custom: {}
minecraft_docker_envs: "{{ lookup('vars', minecraft_name + '_docker_envs_default', default=minecraft_docker_envs_default)
| combine(lookup('vars', minecraft_name + '_docker_envs_custom', default=minecraft_docker_envs_custom)) }}"
# Commands
minecraft_docker_commands_default: []
minecraft_docker_commands_custom: []
minecraft_docker_commands: "{{ lookup('vars', minecraft_name + '_docker_commands_default', default=minecraft_docker_commands_default)
+ lookup('vars', minecraft_name + '_docker_commands_custom', default=minecraft_docker_commands_custom) }}"
# Volumes
minecraft_docker_volumes_default:
- "{{ minecraft_paths_location }}/{{ minecraft_name }}/data:/data"
minecraft_docker_volumes_custom: []
minecraft_docker_volumes: "{{ lookup('vars', minecraft_name + '_docker_volumes_default', default=minecraft_docker_volumes_default)
+ lookup('vars', minecraft_name + '_docker_volumes_custom', default=minecraft_docker_volumes_custom) }}"
# Devices
minecraft_docker_devices_default: []
minecraft_docker_devices_custom: []
minecraft_docker_devices: "{{ lookup('vars', minecraft_name + '_docker_devices_default', default=minecraft_docker_devices_default)
+ lookup('vars', minecraft_name + '_docker_devices_custom', default=minecraft_docker_devices_custom) }}"
# Hosts
minecraft_docker_hosts_default: []
minecraft_docker_hosts_custom: []
minecraft_docker_hosts: "{{ docker_hosts_common
| combine(lookup('vars', minecraft_name + '_docker_hosts_default', default=minecraft_docker_hosts_default))
| combine(lookup('vars', minecraft_name + '_docker_hosts_custom', default=minecraft_docker_hosts_custom)) }}"
# Labels
minecraft_docker_labels_default: {}
minecraft_docker_labels_custom: {}
minecraft_docker_labels: "{{ docker_labels_common
| combine(lookup('vars', minecraft_name + '_docker_labels_default', default=minecraft_docker_labels_default))
| combine(lookup('vars', minecraft_name + '_docker_labels_custom', default=minecraft_docker_labels_custom)) }}"
# Hostname
minecraft_docker_hostname: "{{ minecraft_name }}"
# Network Mode
minecraft_docker_network_mode_default: "{{ docker_networks_name_common }}"
minecraft_docker_network_mode: "{{ lookup('vars', minecraft_name + '_docker_network_mode_default', default=minecraft_docker_network_mode_default) }}"
# Networks
minecraft_docker_networks_alias: "{{ minecraft_name }}"
minecraft_docker_networks_default: []
minecraft_docker_networks_custom: []
minecraft_docker_networks: "{{ docker_networks_common
+ lookup('vars', minecraft_name + '_docker_networks_default', default=minecraft_docker_networks_default)
+ lookup('vars', minecraft_name + '_docker_networks_custom', default=minecraft_docker_networks_custom) }}"
# Capabilities
minecraft_docker_capabilities_default: []
minecraft_docker_capabilities_custom: []
minecraft_docker_capabilities: "{{ lookup('vars', minecraft_name + '_docker_capabilities_default', default=minecraft_docker_capabilities_default)
+ lookup('vars', minecraft_name + '_docker_capabilities_custom', default=minecraft_docker_capabilities_custom) }}"
# Security Opts
minecraft_docker_security_opts_default: []
minecraft_docker_security_opts_custom: []
minecraft_docker_security_opts: "{{ lookup('vars', minecraft_name + '_docker_security_opts_default', default=minecraft_docker_security_opts_default)
+ lookup('vars', minecraft_name + '_docker_security_opts_custom', default=minecraft_docker_security_opts_custom) }}"
# Restart Policy
minecraft_docker_restart_policy: unless-stopped
# Stop Timeout
minecraft_docker_stop_timeout: 900
# State
minecraft_docker_state: started