This repository has been archived on 2020-07-02. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-factorio/tasks/main.yml

36 lines
916 B
YAML

- name: Fetch Factorio files
get_url:
url: "https://factorio.com/get-download/0.17.79/headless/linux64"
dest: "/tmp/factorio.tar.xz"
tags:
- factorio
- fetch
- name: Extract Factorio files
command:
warn: false
argv: ["tar", "-xv", "--xz", "--strip-components=1", "-f", "/tmp/factorio.tar.xz"]
chdir: "/etc/factorio"
tags:
- factorio
- fetch
- name: Copy Factorio config
template:
src: "server-settings.json"
dest: "/etc/factorio/data/server-settings.json"
owner: "nobody"
group: "nogroup"
mode: "700"
tags:
- vault
- configs
- factorio
notify: Run service actions
- name: Copy Factorio service
template:
src: "factorio.service.j2"
dest: "/etc/systemd/system/factorio.service"
tags:
- systemd
- factorio
notify: Restart services