lnurld/server/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 23 Jul 2023 11:08:34 -0500
changeset 219 0faea2a7570f
parent 218 1db4800bc4f5
permissions -rw-r--r--
Updated relayer whitelisted for custom nip11 info.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
     3
- name: add lnurld user
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
     5
  user: name="{{lnurld_user}}" shell="/bin/false" system="yes"
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
     7
- name: install lnurld bin
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 214
diff changeset
     9
  get_url:
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    10
    url: "{{lnurld_bin_url}}"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    11
    dest: "/usr/local/bin/lnurld"
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    mode: "0755"
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    13
  notify: restart lnurld service
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    15
- name: create lnurld data dir
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  become: yes
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  file:
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    18
    path: "{{lnurld_data_dir}}"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    19
    mode: "0710"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    20
    owner: "{{lnurld_user}}"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    21
    group: "{{lnurld_user}}"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    22
    state: "directory"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    23
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    24
- name: create lnurld etc dir
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    25
  become: yes
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    26
  file:
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    27
    path: "/etc/lnurld/"
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
    mode: "0755"
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
    state: "directory"
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    31
- name: install lnurld config
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
  become: yes
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
  template:
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    34
    src: "config.yaml.j2"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    35
    dest: "/etc/lnurld/config.yaml"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    36
    owner: "{{lnurld_user}}"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    37
    group: "{{lnurld_user}}"
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
    mode: "0600"
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    39
  notify: restart lnurld service
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    41
- name: install lnurld systemd service
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
  become: yes
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
  template:
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    44
    src: "lnurld.service.j2"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    45
    dest: "/lib/systemd/system/lnurld.service"
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    46
  notify: restart lnurld service
214
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    47
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    48
- name: ensure service is started
3069b7d001f7 Added nostr relayer role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    49
  become: yes
218
1db4800bc4f5 Got lnurld running.
Luke Hoersten <luke@hoersten.org>
parents: 217
diff changeset
    50
  systemd: name="lnurld.service" enabled="yes" state="started"