author | Luke Hoersten <luke@hoersten.org> |
Fri, 15 Sep 2023 22:46:46 -0500 | |
changeset 222 | 6eaeb42f5c10 |
parent 216 | 6c85835d4621 |
child 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 |
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
5 |
apt: name="golang-go" |
163 | 6 |
|
7 |
- name: unarchive dendrite |
|
17 | 8 |
unarchive: |
9 |
remote_src: yes |
|
163 | 10 |
src: "{{dendrite_tar}}" |
17 | 11 |
dest: "/tmp/" |
163 | 12 |
creates: "{{dendrite_build_dir}}" |
13 |
||
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
14 |
- name: create build dir |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
15 |
file: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
16 |
path: "{{dendrite_build_dir}}/bin" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
17 |
mode: "0755" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
18 |
state: "directory" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
19 |
|
163 | 20 |
- name: check if dendrite build exists |
21 |
stat: |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
22 |
path: "{{dendrite_build_dir}}/bin/dendrite" |
163 | 23 |
register: build_file |
24 |
||
25 |
- name: build dendrite |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
26 |
command: "go build -o bin/ ./cmd/..." |
163 | 27 |
args: |
28 |
chdir: "{{dendrite_build_dir}}" |
|
29 |
when: not build_file.stat.exists |
|
216
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
30 |
|
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
31 |
- name: create build server dir |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
32 |
become: yes |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
33 |
file: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
34 |
path: "{{dendrite_srv_dir}}" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
35 |
mode: "0755" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
36 |
state: "directory" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
37 |
when: not build_file.stat.exists |
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 a gz archive of dendrite bins |
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 |
archive: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
42 |
path: "{{dendrite_build_dir}}/bin/*" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
43 |
exclude_path: |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
44 |
- "{{dendrite_build_dir}}/bin/dendrite-demo-pinecone" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
45 |
- "{{dendrite_build_dir}}/bin/dendrite-demo-yggdrasil" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
46 |
- "{{dendrite_build_dir}}/bin/furl" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
47 |
dest: "{{dendrite_srv_dir}}/dendrite.tar.gz" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
48 |
format: "gz" |
6c85835d4621
Finished up dendrite build server role.
Luke Hoersten <luke@hoersten.org>
parents:
215
diff
changeset
|
49 |
when: not build_file.stat.exists |