nostr/build/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 22 Jul 2023 23:27:09 -0500
changeset 218 1db4800bc4f5
parent 217 e69a030975c4
child 219 0faea2a7570f
permissions -rw-r--r--
Got lnurld running.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
fd351734f007 Prometheus and WriteFreely roles are work in progress.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
     3
- name: install golang
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
     4
  become: yes
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
     5
  apt: name="golang-go"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
     6
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
     7
- name: unarchive nostr relayer
17
41034ea52480 Completed writefreely role
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
     8
  unarchive:
41034ea52480 Completed writefreely role
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
     9
    remote_src: yes
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    10
    src: "{{relayer_tar}}"
17
41034ea52480 Completed writefreely role
Luke Hoersten <luke@hoersten.org>
parents: 2
diff changeset
    11
    dest: "/tmp/"
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    12
    creates: "{{relayer_build_dir}}"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    13
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    14
- name: check if relayer build exists
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    15
  stat:
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    16
    path: "{{relayer_build_dir}}/whitelisted/whitelisted"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    17
  register: build_file
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    18
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    19
- name: build relayer
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    20
  command: "go build"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    21
  args:
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    22
    chdir: "{{relayer_build_dir}}/whitelisted"
163
40b78af86337 Tons of updates.
Luke Hoersten <luke@hoersten.org>
parents: 159
diff changeset
    23
  when: not build_file.stat.exists
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    24
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    25
- name: create build server dir
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    26
  become: yes
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    27
  file:
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    28
    path: "{{relayer_srv_dir}}"
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    29
    mode: "0755"
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    30
    state: "directory"
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    31
  when: not build_file.stat.exists
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    32
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    33
- name: copy bin to build server dir
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    34
  become: yes
217
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    35
  copy:
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    36
    remote_src: yes
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    37
    src: "{{relayer_build_dir}}/whitelisted/whitelisted"
e69a030975c4 Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents: 216
diff changeset
    38
    dest: "{{relayer_srv_dir}}/nostr-relayer-whitelisted"
216
6c85835d4621 Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents: 215
diff changeset
    39
  when: not build_file.stat.exists