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.

---

- name: add lnurld user
  become: yes
  user: name="{{lnurld_user}}" shell="/bin/false" system="yes"

- name: install lnurld bin
  become: yes
  get_url:
    url: "{{lnurld_bin_url}}"
    dest: "/usr/local/bin/lnurld"
    mode: "0755"
  notify: restart lnurld service

- name: create lnurld data dir
  become: yes
  file:
    path: "{{lnurld_data_dir}}"
    mode: "0710"
    owner: "{{lnurld_user}}"
    group: "{{lnurld_user}}"
    state: "directory"

- name: create lnurld etc dir
  become: yes
  file:
    path: "/etc/lnurld/"
    mode: "0755"
    state: "directory"

- name: install lnurld config
  become: yes
  template:
    src: "config.yaml.j2"
    dest: "/etc/lnurld/config.yaml"
    owner: "{{lnurld_user}}"
    group: "{{lnurld_user}}"
    mode: "0600"
  notify: restart lnurld service

- name: install lnurld systemd service
  become: yes
  template:
    src: "lnurld.service.j2"
    dest: "/lib/systemd/system/lnurld.service"
  notify: restart lnurld service

- name: ensure service is started
  become: yes
  systemd: name="lnurld.service" enabled="yes" state="started"