Download instead of build dendrite packages

This commit is contained in:
Ana Custura 2026-01-21 16:15:21 +00:00
parent 64acaeaf7a
commit 229d29fee6
2 changed files with 19 additions and 51 deletions

View file

@ -1,5 +1,5 @@
butter_language: en
butter_name: butter-box
butter_name: butterbox
go_version: "1.24.6"
go_arch_map:
x86_64: "amd64"

View file

@ -14,64 +14,32 @@
update_cache: yes
when: not ( is_vmdb2 | bool )
# install Go
# # - name: Download Go tarball
# get_url:
# url: "https://go.dev/dl/go{{ go_version }}.linux-{{ go_arch_map[ansible_architecture] }}.tar.gz"
# dest: /tmp/go.tar.gz
# mode: '0644'
#
# - name: Extract Go to /usr/local
# unarchive:
# src: /tmp/go.tar.gz
# dest: /usr/local
# remote_src: yes
# creates: /usr/local/go
#
# - name: Ensure Go path is in .profile
# lineinfile:
# path: "/home/{{ butter_user }}/.profile"
# line: 'PATH=$PATH:/usr/local/go/bin'
# insertafter: EOF
# state: present
# create: yes
#
# - name: Remove existing dendrite directory if it exists
# file:
# path: "/home/{{ butter_user }}/dendrite"
# state: absent
#
# - name: Clone dendrite repo
# git:
# repo: https://github.com/matrix-org/dendrite
# dest: "/home/{{ butter_user }}/dendrite"
# version: v0.13.7
# force: yes
# update: no
# depth: 1
#
# - name: Build dendrite
# command: /usr/local/go/bin/go build -o bin/ ./cmd/...
# args:
# chdir: "/home/{{ butter_user }}/dendrite"
#
#
- name: copy Dendrite dir to target
copy:
src: "dendrite/"
dest: "/home/{{ butter_user }}/dendrite"
- name: Create dendrite directories
file:
path: "/home/{{ butter_user }}/dendrite/bin"
state: directory
owner: "{{ butter_user }}"
group: "{{ butter_user }}"
mode: "0755"
- name: Download pre-built dendrite archive
get_url:
url: "https://guardianproject.dev/api/packages/butter/generic/dendrite/latest/dendrite-{{ go_arch_map[ansible_architecture] }}.tar.gz"
dest: /tmp
mode: '0644'
- name: Untar dendrite
unarchive:
src: "/tmp/dendrite-{{ go_arch_map[ansible_architecture] }}.tar.gz"
dest: "/home/{{ butter_user }}/dendrite/bin"
remote_src: yes
extra_opts: [--strip-components=2]
- name: Ensure butter_user owns Dendrite directory
file:
path: "/home/{{ butter_user }}/dendrite"
state: directory
recurse: yes
owner: "{{ butter_user }}"
group: "{{ butter_user }}"
mode: "0755"
- name: Generate Matrix signing key
command: ./bin/generate-keys --private-key matrix_key.pem