mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
95 lines
No EOL
2.7 KiB
YAML
95 lines
No EOL
2.7 KiB
YAML
# Give message and end play for unsupported platforms
|
|
# For now only support rpi
|
|
|
|
- name: No install except Raspberry Pi for now
|
|
debug:
|
|
msg: "No install except Raspberry Pi for now."
|
|
when: not is_rpi
|
|
|
|
- name: Terminate play
|
|
meta: end_play
|
|
when: not is_rpi
|
|
|
|
- include_tasks: calc_vars.yml
|
|
|
|
- name: Ensure group minetest exists
|
|
group:
|
|
name: "{{ minetest_runas_group }}"
|
|
state: present
|
|
when: minetest_runas_user != 'root'
|
|
|
|
- name: Create minetest user
|
|
user:
|
|
name: "{{ minetest_runas_user }}"
|
|
groups: "{{ minetest_runas_group }}"
|
|
state: present
|
|
createhome: no
|
|
shell: /bin/false
|
|
when: minetest_runas_user != 'root'
|
|
|
|
- name: Check for minetest world file
|
|
stat:
|
|
path: "{{ minetest_world_dir }}/world.mt"
|
|
register: minetest_world
|
|
|
|
# rpi only
|
|
- include_tasks: rpi_minetest_install.yml
|
|
when: minetest_install and not minetest_world.stat.exists and is_rpi
|
|
|
|
# not rpi
|
|
- include_tasks: minetest_install.yml
|
|
when: minetest_install and not minetest_world.stat.exists and not is_rpi
|
|
|
|
# Install mods
|
|
- include: minetest_install_mods.yml
|
|
with_items:
|
|
- name: moreblocks
|
|
url: https://github.com/minetest-mods/moreblocks/archive/master.zip
|
|
- name: moreores
|
|
url: https://github.com/Calinou/moreores/archive/master.zip
|
|
- name: basic_materials
|
|
url: https://gitlab.com/VanessaE/basic_materials/-/archive/master/basic_materials-master.zip
|
|
- name: mesecons
|
|
url: https://github.com/minetest-mods/mesecons/archive/master.zip
|
|
- name: digilines
|
|
url: https://github.com/minetest-mods/digilines/archive/master.zip
|
|
- name: pipeworks
|
|
url: https://github.com/minetest-mods/pipeworks/archive/master.zip
|
|
- name: Minetest-WorldEdit
|
|
url: https://github.com/Uberi/Minetest-WorldEdit/archive/master.zip
|
|
when: minetest_install
|
|
|
|
# enable or disable
|
|
- name: Enable & Restart 'minetest-serve' service
|
|
service:
|
|
name: minetest-serve
|
|
enabled: yes
|
|
state: restarted
|
|
when: minetest_install and minetest_enabled
|
|
|
|
- name: Disable 'minetest-serve' service
|
|
service:
|
|
name: minetest-serve
|
|
enabled: no
|
|
state: stopped
|
|
when: minetest_install and not minetest_enabled
|
|
|
|
- name: Add 'minetest' variable values to {{ iiab_ini_file }}
|
|
ini_file:
|
|
path: "{{ iiab_ini_file }}"
|
|
section: minetest
|
|
option: "{{ item.option }}"
|
|
value: "{{ item.value }}"
|
|
with_items:
|
|
- option: name
|
|
value: Minetest Server
|
|
- option: description
|
|
value: '"Well known game Minetest."'
|
|
- option: minetest_world_dir
|
|
value: "{{ minetest_world_dir }}"
|
|
- option: minetest_port
|
|
value: "{{ minetest_port }}"
|
|
- option: minetest_enabled
|
|
value: "{{ minetest_enabled }}"
|
|
- option: minetest_world_dir
|
|
value: "{{ minetest_world_dir }}" |