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
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
- name: find systemd unit directory
|
||||
become: true
|
||||
ansible.builtin.command: pkg-config systemd --variable=systemdsystemunitdir
|
||||
ansible.builtin.command: pkg-config systemd --variable=systemd_system_conf_dir
|
||||
changed_when: false
|
||||
register: systemd_unit_directory_cmd
|
||||
- name: find systemd version
|
||||
|
@ -10,7 +10,14 @@
|
|||
systemctl --version | awk '{if($1=="systemd" && $2~"^[0-9]+$"){print $2}}'
|
||||
changed_when: false
|
||||
register: systemd_version_cmd
|
||||
- name: find local valkey version
|
||||
ansible.builtin.shell: >
|
||||
valkey-cli --version | cut -d ' ' -f 2
|
||||
failed_when: false
|
||||
changed_when: false
|
||||
register: valkey_local_version_cmd
|
||||
- name: set facts
|
||||
ansible.builtin.set_fact:
|
||||
systemd_unit_directory: "{{ systemd_unit_directory_cmd.stdout }}"
|
||||
systemd_version: "{{ systemd_version_cmd.stdout | int }}"
|
||||
valkey_installed_version: "{{ (valkey_local_version_cmd.stdout_lines[0] | default('0')) if valkey_local_version_cmd.rc == 0 else '0' }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue