brahmlower / ansible-factorio

A role for creating Factorio servers
https://galaxy.ansible.com/bplower/factorio/
4 stars 6 forks source link

Server Update Functionality? #5

Open jkackley opened 7 years ago

jkackley commented 7 years ago

First, thanks for the great role. Pretty useful and concise.

As it's written, it's kind of annoying to update the server; it requires backing up saves and deleting the factorio directory to get the ansible script to extract the updated game files. I'm not sure what the optimal solution is (perhaps writing a version file or something, and doing a 'creates' on the extract task on that version file versus the whole directory. Handing upgrades (e.g. where a different factorio version is defined in your playbook) seamlessly would be quite a bit easier.

In a similar vein, the role could use a handler to restart the server on changes.

As a complete aside, providing a list of mod urls for the role to grab would be nice, but mods.factorio.com requires login for download; though player-data.json might be a way around that: https://forums.factorio.com/viewtopic.php?f=49&t=14395

BTW, it worked fine on debian jessie; other than my SSL certs being out of date (so verification of the download url failed at first). In general feedback, it's a little unintuitive that I had to define visibility and description as a factorio_server_settings to get it to actually run; defining some minimally viable defaults (or denoting that on your how to use page) might be a good idea.

brahmlower commented 7 years ago

I haven't actually used this role in production yet, so your feedback is extremely valuable. Thank you :) Honestly I hadn't even considered the updating process, and had only just started to consider support for mods. I can start addressing these shortcomings this evening after work. It sounds like the SSL thing was outside the scope of the role, is that right? For my reference, I've got the issue list as follows:

I'll post follow ups here for each item as it's delivered. If you find any other issues, let me know and I can see about fixing them as soon as possible!

jkackley commented 7 years ago

No problem. Thanks for the quick response. =)

Yeah the SSL certs was an issue with my install and outside of the scope of the role.

Look forward to updates.

brahmlower commented 7 years ago

The latest merge to master (83bb46d1cb6e7cb7daa2434611b4a4ae12e70bf6) addresses the default variable values and handlers for restarting the server when changes are applied. Documentation has been improved significantly so hopefully that makes using the role a little easier. Since the support for updating and mods are larger implementations, I'm going to be making separate issues for each.