Skip to content

Conversation

siavashsardari
Copy link

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.

@Migsi
Copy link

Migsi commented May 18, 2021

@DavidWittman please consider merging this change as this is solves a major problem with this role.

@rromanchuk
Copy link

@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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants