brahmlower / ansible-factorio

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

export factorio_vars as json object #2

Closed brahmlower closed 7 years ago

brahmlower commented 7 years ago

The factorio server settings are difficult to cast into the json file. It's simply too error prone, and requires manual abstraction. Better to make a factorio_settings dict in the vars. The user can then define the settings in that dict, which would be cast to json and written to the settings file. Casting to json from yaml can be done as described here: http://docs.ansible.com/ansible/playbooks_filters.html#filters-for-formatting-data