ansible/roles/factorio/tasks/set-map-settings.yml

19 lines
538 B
YAML
Raw Normal View History

2020-12-21 21:19:47 -06:00
---
# Set the content of map-settings.json
- name: ({{ service_name }}) Create map-settings.json file
copy:
content: "{{ factorio_map_settings | to_json }}"
dest: "{{ service_root }}/factorio/data/map-settings.json"
when: factorio_map_settings_enabled
notify:
- Restart factorio service
- name: ({{ service_name }}) Remove map-settings.json file
file:
path: "{{ service_root }}/factorio/data/map-settings.json"
state: absent
when: not factorio_map_settings_enabled
notify:
- Restart factorio service