lnurld/build/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 07 Oct 2024 23:30:59 -0500
changeset 36 8de33340cca9
parent 32 500a32d1f026
permissions -rw-r--r--
Added hacks to fix lnd bitcoind 28 bug.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: install golang
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
32
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
     5
  apt: name="golang-1.21-go"
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
     6
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
     7
- name: link go bin
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
     8
  become: yes
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
     9
  file:
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
    10
    src: "/usr/lib/go-1.21/bin/go"
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
    11
    dest: "/usr/bin/go"
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
    12
    state: "link"
500a32d1f026 Version updates.
Luke Hoersten <luke@hoersten.org>
parents: 31
diff changeset
    13
    mode: "0755"
31
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
- name: git checkout lnurld
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  git:
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    repo: "{{lnurld_git}}"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    dest: "{{lnurld_build_dir}}"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
- name: check if build exists
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  stat:
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    path: "{{lnurld_build_dir}}/lnurld"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  register: build_file
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
- name: build
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
  command: "go build"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
  args:
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
    chdir: "/tmp/lnurld/"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
  when: not build_file.stat.exists
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
- name: create build server dir
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
  become: yes
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
  file:
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
    path: "{{lnurld_srv_dir}}"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
    mode: "0755"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
    state: "directory"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
  when: not build_file.stat.exists
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    38
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    39
- name: copy bin to build server dir
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    40
  become: yes
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    41
  copy:
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    42
    remote_src: yes
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    43
    src: "{{lnurld_build_dir}}/lnurld"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    44
    dest: "{{lnurld_srv_dir}}/lnurld"
562b76293a66 Moved lnurld from my general ansible roles repo to the btc specific repo.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    45
  when: not build_file.stat.exists