author | Luke Hoersten <luke@hoersten.org> |
Mon, 07 Oct 2024 23:31:51 -0500 | |
changeset 239 | c3e3169399a8 |
parent 224 | 25e44d8440d4 |
permissions | -rw-r--r-- |
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 | 4 |
become: yes |
224 | 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" |
|
163 | 14 |
|
15 |
- name: unarchive dendrite |
|
17 | 16 |
unarchive: |
17 |
remote_src: yes |
|
163 | 18 |
src: "{{dendrite_tar}}" |
17 | 19 |
dest: "/tmp/" |
163 | 20 |
creates: "{{dendrite_build_dir}}" |
21 |
||
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
22 |
- name: create build dir |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
23 |
file: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
24 |
path: "{{dendrite_build_dir}}/bin" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
25 |
mode: "0755" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
26 |
state: "directory" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
27 |
|
163 | 28 |
- name: check if dendrite build exists |
29 |
stat: |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
30 |
path: "{{dendrite_build_dir}}/bin/dendrite" |
163 | 31 |
register: build_file |
32 |
||
33 |
- name: build dendrite |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
34 |
command: "go build -o bin/ ./cmd/..." |
163 | 35 |
args: |
36 |
chdir: "{{dendrite_build_dir}}" |
|
37 |
when: not build_file.stat.exists |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
38 |
|
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
39 |
- name: create build server dir |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
40 |
become: yes |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
41 |
file: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
42 |
path: "{{dendrite_srv_dir}}" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
43 |
mode: "0755" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
44 |
state: "directory" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
45 |
when: not build_file.stat.exists |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
46 |
|
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
47 |
- name: create a gz archive of dendrite bins |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
48 |
become: yes |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
49 |
archive: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
50 |
path: "{{dendrite_build_dir}}/bin/*" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
51 |
exclude_path: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
52 |
- "{{dendrite_build_dir}}/bin/dendrite-demo-pinecone" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
53 |
- "{{dendrite_build_dir}}/bin/dendrite-demo-yggdrasil" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
54 |
- "{{dendrite_build_dir}}/bin/furl" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
55 |
dest: "{{dendrite_srv_dir}}/dendrite.tar.gz" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
56 |
format: "gz" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
57 |
when: not build_file.stat.exists |