Moved lnurld from my general ansible roles repo to the btc specific repo.
authorLuke Hoersten <luke@hoersten.org>
Fri, 15 Sep 2023 22:46:46 -0500
changeset 222 6eaeb42f5c10
parent 221 a7bb0c129c0a
child 223 de03976c2df1
Moved lnurld from my general ansible roles repo to the btc specific repo.
lnurld/build/defaults/main.yaml
lnurld/build/tasks/main.yaml
lnurld/server/defaults/main.yaml
lnurld/server/handlers/main.yaml
lnurld/server/tasks/main.yaml
lnurld/server/templates/config.yaml.j2
lnurld/server/templates/lnurld.service.j2
--- a/lnurld/build/defaults/main.yaml	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
----
-
-lnurld_git: "https://github.com/yanascz/lnurld.git"
-lnurld_build_dir: "/tmp/lnurld"
-lnurld_srv_dir: "/var/www/build"
--- a/lnurld/build/tasks/main.yaml	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
----
-
-- name: install golang
-  become: yes
-  apt: name="golang-go"
-
-- name: git checkout lnurld
-  git:
-    repo: "{{lnurld_git}}"
-    dest: "{{lnurld_build_dir}}"
-
-- name: check if build exists
-  stat:
-    path: "{{lnurld_build_dir}}/lnurld"
-  register: build_file
-
-- name: build
-  command: "go build"
-  args:
-    chdir: "/tmp/lnurld/"
-  when: not build_file.stat.exists
-
-- name: create build server dir
-  become: yes
-  file:
-    path: "{{lnurld_srv_dir}}"
-    mode: "0755"
-    state: "directory"
-  when: not build_file.stat.exists
-
-- name: copy bin to build server dir
-  become: yes
-  copy:
-    remote_src: yes
-    src: "{{lnurld_build_dir}}/lnurld"
-    dest: "{{lnurld_srv_dir}}/lnurld"
-  when: not build_file.stat.exists
--- a/lnurld/server/defaults/main.yaml	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
----
-
-lnurld_user: "bitcoin"
-lnurld_host: "127.0.0.1"
-lnurld_port: "8088"
--- a/lnurld/server/handlers/main.yaml	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
----
-
-- name: restart lnurld service
-  become: yes
-  systemd: name="lnurld.service" state="restarted" daemon_reload="yes"
--- a/lnurld/server/tasks/main.yaml	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
----
-
-- 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"
--- a/lnurld/server/templates/config.yaml.j2	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-listen: {{lnurld_host}}:{{lnurld_port}}
-data-dir: {{lnurld_data_dir}}
-credentials:
-  admin: {{lnurld_admin_pass}}
-lnd:
-  cert-file: {{lnurld_lnd_cert_file}}
-  macaroon-file: {{lnurld_lnd_invoice_macaroon}}
-accounts:
-{% for account in lnurld_accounts %}
-  {{account.name}}:
-    currency: usd
-    description: {{account.desc}}
-    is-also-email: {{account.is_email|default(false)}}
-    comment-allowed: 210
-    min-sendable: 1
-    max-sendable: 1_000_000
-{% else %}  []
-{% endfor %}
--- a/lnurld/server/templates/lnurld.service.j2	Fri Sep 15 22:46:19 2023 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-[Unit]
-Description=LNURL Daemon
-Wants=lnd.service
-After=lnd.service
-
-[Service]
-Environment="GIN_MODE=release"
-ExecStart=/usr/local/bin/lnurld
-
-User={{lnurld_user}}
-Group={{lnurld_user}}
-
-Type=simple
-KillMode=process
-LimitNOFILE=128000
-TimeoutSec=240
-Restart=always
-RestartSec=60
-
-[Install]
-WantedBy=multi-user.target