aboutsummaryrefslogtreecommitdiff
path: root/roles/factorio/tasks/update.yml
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2022-04-06 11:54:21 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2022-04-06 11:54:21 +0200
commit736ffc77f09a8e238e63a9819d19fe41e7c523d4 (patch)
treec4c3d4e36865c0ef63f33af71a2edf2857e0312b /roles/factorio/tasks/update.yml
parente835ea003eb91a534bfcead68062562e6ed1e665 (diff)
downloadansible_collection-736ffc77f09a8e238e63a9819d19fe41e7c523d4.tar.gz
factorio
Diffstat (limited to 'roles/factorio/tasks/update.yml')
-rw-r--r--roles/factorio/tasks/update.yml23
1 files changed, 23 insertions, 0 deletions
diff --git a/roles/factorio/tasks/update.yml b/roles/factorio/tasks/update.yml
new file mode 100644
index 0000000..4f4c4d3
--- /dev/null
+++ b/roles/factorio/tasks/update.yml
@@ -0,0 +1,23 @@
+---
+- name: Stop factorio
+ systemd:
+ name: factorio.service
+ state: stopped
+ become: yes
+
+- name: Download factorio
+ get_url:
+ url: "https://factorio.com/get-download/stable/headless/linux64"
+ dest: /opt/factorio/factorio.tar.gz
+ become_user: factorio
+ become: yes
+
+- name: Unpack factorio
+ unarchive:
+ src: /opt/factorio/factorio.tar.gz
+ dest: /opt/factorio/
+ remote_src: yes
+ become_user: factorio
+ become: yes
+ notify:
+ - Handle systemd