fix(valkey): install systemd unit in proper dir; check local and git versions to avoid unnecessary recompiles
This commit is contained in:
parent
2c68a0c168
commit
1d2983c369
3 changed files with 19 additions and 3 deletions
|
@ -17,6 +17,7 @@
|
|||
- libssl-dev
|
||||
- libsystemd-dev
|
||||
- make
|
||||
- pkgconf
|
||||
- python3-cryptography
|
||||
- ssl-cert
|
||||
- name: gather facts
|
||||
|
@ -48,8 +49,16 @@
|
|||
cmds:
|
||||
- tar -zxf {asset_dirname}/{asset_filename}
|
||||
- 'mv $(find . -maxdepth 1 -name valkey-io-valkey\* -type d) {{ valkey_install_dir }}/src'
|
||||
- name: fetch source version
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
cmd: sed -En 's/#define VALKEY_VERSION "([0-9._-]+)"/\1/p' ./src/version.h
|
||||
chdir: '{{ valkey_install_dir }}/src'
|
||||
register: source_version_cmd
|
||||
changed_when: false
|
||||
- name: compile Valkey (some tweaks taken from Valkey's Dockerfile
|
||||
become: true
|
||||
when: source_version_cmd.stdout_lines[0] != valkey_installed_version
|
||||
args:
|
||||
chdir: '{{ valkey_install_dir }}/src'
|
||||
ansible.builtin.shell: '{{ item }}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue