---

- name: Redis is configured.
  template:
    src: redis.conf.j2
    dest: "{{ redis_conf_dir }}/redis.conf"
    mode: "0640"
    owner: redis
    group: redis
  notify: "{{ redis_restart_handler_name }}"
  tags:
    - redis

- name: Config directory permissions are set
  file:
    dest: "{{ redis_conf_dir }}"
    mode: "0750"
    owner: redis
    group: redis
  tags:
    - redis

- name: Redis is running and enabled on boot.
  systemd:
    name: "{{ redis_systemd_name }}"
    enabled: yes
    state: started
  tags:
    - redis
