ansible/roles/factorio/tasks/set-server-whitelist.yml
2020-12-21 21:19:47 -06:00

19 lines
570 B
YAML

---
# Set the content of server-whitelist.json
- name: ({{ service_name }}) Create server-whitelist.json file
copy:
content: "{{ factorio_server_whitelist | to_json }}"
dest: "{{ service_root }}/factorio/data/server-whitelist.json"
when: factorio_server_whitelist_enabled
notify:
- Restart factorio service
- name: ({{ service_name }}) Remove server-whitelist.json file
file:
path: "{{ service_root }}/factorio/data/server-whitelist.json"
state: absent
when: not factorio_server_whitelist_enabled
notify:
- Restart factorio service