ergo/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 08 Jan 2023 12:57:34 -0600
changeset 204 fd38efd8f637
parent 174 431c6d5e5dd4
permissions -rw-r--r--
Updated versions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
     3
- name: add ergo user
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
174
431c6d5e5dd4 Lots of updates.
Luke Hoersten <luke@hoersten.org>
parents: 170
diff changeset
     5
  user: name="ergo" shell="/bin/false" system="yes" create_home="no"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
     7
- name: download ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  unarchive:
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    remote_src: yes
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    11
    src: "{{ergo_url}}"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    dest: "/tmp"
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    13
    creates: "/tmp/{{ergo_tar_name}}/"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    15
- name: install ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  become: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  copy:
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    18
    src: "/tmp/{{ergo_tar_name}}/ergo"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    dest: "/usr/local/bin/"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
    remote_src: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
    owner: "root"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    group: "root"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
    mode: "0755"
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    24
  notify: restart ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    26
- name: create ergo dirs
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
  become: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
  file:
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    29
    path: "{{item}}/ergo"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    30
    owner: "ergo"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    31
    group: "ergo"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
    mode: "0755"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
    state: "directory"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
  loop:
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
    - "/etc"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
    - "/var"
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    38
- name: configure ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
  become: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
  template:
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    41
    src: "config.yaml.j2"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    42
    dest: "/etc/ergo/config.yaml"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    43
    owner: "ergo"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    44
    group: "ergo"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    45
    mode: "0644"
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    46
  notify: reload ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
- name: copy motd file
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
  become: yes
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    50
  copy:
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    51
    src: "{{ergo_motd}}"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    52
    dest: "/etc/ergo/motd"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    53
  notify: reload ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    54
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    55
- name: install ergo service
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    56
  become: yes
137
645c1e109921 Moved oragono socket to more persistent location.
Luke Hoersten <luke@hoersten.org>
parents: 118
diff changeset
    57
  copy:
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    58
    src: "ergo.service"
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    59
    dest: "/lib/systemd/system/ergo.service"
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    60
    mode: "0644"
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    61
  notify: restart ergo
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    62
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    63
- name: ensure ergo is started
114
34c8632d763d Added oragono role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    64
  become: yes
170
a20a6d03747f Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents: 137
diff changeset
    65
  systemd: service="ergo.service" enabled="yes" state="started" daemon_reload="yes"