bin/server/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 07 Oct 2024 23:31:51 -0500
changeset 239 c3e3169399a8
parent 228 ff776d663062
permissions -rw-r--r--
Updated java version and disabled geyser due to too old jde.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
228
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: add bin user
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  user: name="{{bin_user}}" shell="/bin/false" system="yes"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: install bin binary
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  get_url:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    url: "{{bin_url}}"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/usr/local/bin/bin"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    mode: "0755"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
  notify: restart service
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
- name: install systemd service
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  template:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    src: "[email protected]"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    dest: "/lib/systemd/system/[email protected]"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
  notify: restart service
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
- name: ensure service is started
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
  systemd: name="bin@{{bin_port}}.service" enabled="yes" state="started"