Replace json.j2 template with copy and content

This commit is contained in:
Tobias Reisinger 2025-06-11 21:29:59 +02:00
parent 4cc94969f5
commit cb10a962e3
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
6 changed files with 9 additions and 14 deletions
playbooks/roles/factorio/tasks

View file

@ -6,7 +6,6 @@
vars:
svc: "{{ factorio_svc }}"
env: "{{ factorio_env }}"
json: "{{ factorio_json }}"
compose: "{{ factorio_compose }}"
block:
- name: Import prepare tasks for common service
@ -23,10 +22,10 @@
owner: "{{ factorio_uid }}"
group: "{{ factorio_gid }}"
become: true
- name: Template the server settings
ansible.builtin.template:
src: "json.j2"
- name: Create the server settings
ansible.builtin.copy:
dest: "{{ (config_path, 'server-settings.json') | path_join }}"
content: '{{ factorio_json | to_json }}'
mode: "0644"
owner: "{{ factorio_uid }}"
group: "{{ factorio_gid }}"