ansible-redis
ansible-redis copied to clipboard
add support for install in LXC containers
Running Redis inside LXC containers requires Redis config which basically tell systemd that the service is running in an unprivileged env and cannot use private devices.
@DavidWittman please consider merging this change as this is solves a major problem with this role.
@siavashsardari @Migsi i have a semi related issue, just in terms of needing to be able to modify the systemd template. I like the idea of having opinionated defaults, but i can't really think of a good solution to expose modifications i need. Exposing more systemd variables seems like a never ending task. Like in my case, i also need to define specific After= targets as well.
This seems a bit rigid, but even if there was an option to provide your own template, it would basically invalidate/NOOP role variables which seems dangerous.
- name: create redis systemd service
template:
src: "{{ item }}"
dest: /etc/systemd/system/{{ redis_service_name }}.service
mode: 0644
with_first_found:
- files:
- "{{ ansible_os_family }}/redis.service.j2"
- default/redis.service.j2
paths:
- ../templates
register: redis_unit_file
when: redis_as_service and ansible_service_mgr|default() == "systemd"