|
1 |
| -# Downloading dependencies |
2 |
| -# - name: wal-g dependencies |
3 |
| -# become: yes |
4 |
| -# apt: |
5 |
| -# pkg: |
6 |
| -# - libbrotli-dev |
7 |
| -# - liblzo2-dev |
8 |
| -# - libsodium-dev |
9 |
| -# - cmake |
10 |
| - |
11 |
| -# install go dependency for WAL-G |
12 |
| -# - name: wal-g go dependency |
13 |
| -# get_url: |
14 |
| -# url: "https://golang.org/dl/go{{ golang_version }}.linux-{{ platform }}.tar.gz" |
15 |
| -# dest: /tmp |
16 |
| -# checksum: "{{ golang_version_checksum[platform] }}" |
17 |
| -# timeout: 60 |
18 |
| - |
19 |
| -# - name: unpack go archive |
20 |
| -# unarchive: |
21 |
| -# remote_src: yes |
22 |
| -# src: "/tmp/go{{ golang_version }}.linux-{{ platform }}.tar.gz" |
23 |
| -# dest: /usr/local |
24 |
| - |
25 |
| -# # Download WAL-G |
26 |
| -# - name: wal-g - download latest version |
27 |
| -# git: |
28 |
| -# repo: https://github.com/wal-g/wal-g.git |
29 |
| -# dest: /tmp/wal-g |
30 |
| -# version: "v{{ wal_g_release }}" |
31 |
| -# become: yes |
32 |
| - |
33 |
| -# - name: wal-g - pg_clean |
34 |
| -# make: |
35 |
| -# chdir: /tmp/wal-g |
36 |
| -# target: pg_clean |
37 |
| -# params: |
38 |
| -# GOBIN: "/usr/local/bin" |
39 |
| -# PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" |
40 |
| -# USE_LIBSODIUM: true |
41 |
| -# become: yes |
42 |
| -# ignore_errors: yes |
43 |
| - |
44 |
| -# - name: wal-g - deps |
45 |
| -# make: |
46 |
| -# chdir: /tmp/wal-g |
47 |
| -# target: deps |
48 |
| -# params: |
49 |
| -# GOBIN: "/usr/local/bin" |
50 |
| -# PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" |
51 |
| -# USE_LIBSODIUM: true |
52 |
| -# become: yes |
53 |
| -# ignore_errors: yes |
54 |
| - |
55 |
| -# - name: wal-g - build and install |
56 |
| -# community.general.make: |
57 |
| -# chdir: /tmp/wal-g |
58 |
| -# target: pg_install |
59 |
| -# jobs: "{{ parallel_jobs | default(omit) }}" |
60 |
| -# params: |
61 |
| -# GOBIN: "/usr/local/bin" |
62 |
| -# PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" |
63 |
| -# USE_LIBSODIUM: true |
64 |
| -# become: yes |
65 |
| - |
66 | 1 | - name: Create wal-g group
|
67 | 2 | group:
|
68 | 3 | name: wal-g
|
|
86 | 21 | mode: '0770'
|
87 | 22 | when: nixpkg_mode
|
88 | 23 |
|
89 |
| -- name: Install wal-g from nix binary cache |
| 24 | +- name: Install wal-g 2 from nix binary cache |
90 | 25 | become: yes
|
91 | 26 | shell: |
|
92 | 27 | sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g"
|
93 | 28 | when: stage2_nix
|
94 | 29 |
|
| 30 | +- name: Install wal-g 3 from nix binary cache |
| 31 | + become: yes |
| 32 | + shell: | |
| 33 | + sudo -u wal-g bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#wal-g-3" |
| 34 | + when: stage2_nix |
| 35 | + |
95 | 36 | - name: Create symlink for wal-g from Nix profile to /usr/local/bin
|
96 | 37 | ansible.builtin.file:
|
97 | 38 | src: /home/wal-g/.nix-profile/bin/wal-g
|
|
100 | 41 | force: yes # This will replace existing file/symlink if it exists
|
101 | 42 | become: yes # Need sudo to write to /usr/local/bin
|
102 | 43 | when: stage2_nix
|
| 44 | + |
| 45 | +- name: Create symlink for wal-g-3 from Nix profile to /usr/local/bin |
| 46 | + ansible.builtin.file: |
| 47 | + src: /home/wal-g/.nix-profile/bin/wal-g-3 |
| 48 | + dest: /usr/local/bin/wal-g-3 |
| 49 | + state: link |
| 50 | + force: yes # This will replace existing file/symlink if it exists |
| 51 | + become: yes # Need sudo to write to /usr/local/bin |
| 52 | + when: stage2_nix |
| 53 | + |
103 | 54 | - name: Create /etc/wal-g/config.json
|
104 | 55 | file:
|
105 | 56 | path: /etc/wal-g/config.json
|
|
0 commit comments