-
Notifications
You must be signed in to change notification settings - Fork 1
/
playbook.yml
49 lines (35 loc) · 1.25 KB
/
playbook.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
---
- hosts: localhost
vars_prompt:
- name: game
prompt: Game to install (any filename in vars/games without extension)
private: no
- name: dns
prompt: DNS entry to create (server will be available at <dns>.games.zcraft.fr)
private: no
pre_tasks:
- name: Load vars from selected game ({{ game }})
include_vars: "vars/games/{{ game }}.yml"
roles:
- instance
- hosts: ovh # dynamically created by the instance role
vars:
# Root directory where everything will be stored.
root: "{{ ansible_user_dir }}"
# Where the actual Minecraft server will be installed on the machine.
server: "{{ root }}/server"
# Where things that need to be build (e.g. plugins) will be.
build: "{{ root }}/build"
# User agent for web requests
http_agent: "ansible-httpget/{{ ansible_version.string }} deploy-minecraft/1.0 (compatible; +https://amaury.carrade.eu/contact)"
# We wait for the host to be reachable before gathering facts
gather_facts: no
pre_tasks:
- name: Waiting for DNS propagation…
wait_for_connection:
- name: Gather facts
setup:
- name: Load vars from selected game ({{ game }})
include_vars: "vars/games/{{ game }}.yml"
roles:
- gameserver