author | Luke Hoersten <luke@hoersten.org> |
Mon, 29 Jul 2024 12:42:17 -0500 | |
changeset 34 | 70cdf181aa9e |
parent 32 | 500a32d1f026 |
permissions | -rw-r--r-- |
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 | 5 |
apt: name="golang-1.21-go" |
6 |
||
7 |
- name: link go bin |
|
8 |
become: yes |
|
9 |
file: |
|
10 |
src: "/usr/lib/go-1.21/bin/go" |
|
11 |
dest: "/usr/bin/go" |
|
12 |
state: "link" |
|
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 |