55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
---
|
|
- name: remove redis packages via apt
|
|
apt:
|
|
name:
|
|
- redis
|
|
- redis-server
|
|
- redis-tools
|
|
state: absent
|
|
purge: yes
|
|
|
|
- name: install keydb packages via apt
|
|
apt:
|
|
name:
|
|
- keydb
|
|
state: latest
|
|
update-cache: yes
|
|
register: apt_res
|
|
retries: 5
|
|
until: apt_res is success
|
|
|
|
- name: install keydb configuration file
|
|
template:
|
|
src: keydb/keydb.conf.j2
|
|
dest: /etc/keydb/keydb.conf
|
|
owner: keydb
|
|
group: keydb
|
|
mode: 0640
|
|
notify: restart keydb
|
|
|
|
- name: create keydb unit override directory
|
|
file:
|
|
state: directory
|
|
dest: /etc/systemd/system/keydb-server.service.d
|
|
|
|
- name: install keydb unit override file
|
|
template:
|
|
src: keydb/override.conf.j2
|
|
dest: /etc/systemd/system/keydb-server.service.d/override.conf
|
|
register: systemd
|
|
|
|
- name: reload systemd to apply changes
|
|
command: systemctl daemon-reload
|
|
when: systemd.changed
|
|
|
|
- name: start but disable services (managed by PVC)
|
|
service:
|
|
name: "{{ item }}"
|
|
state: started
|
|
enabled: no
|
|
ignore_errors: yes
|
|
with_items:
|
|
- keydb-server
|
|
|
|
- meta: flush_handlers
|