---

- name: Install the EPEL repo
  yum: name=epel-release state=latest

- name: Install redis
  yum: name=redis state=latest

- name: Write redis.conf
  template: src=redis.conf dest=/etc/redis.conf owner=redis group=root mode="u=rw,g=r,o=r"

- name: Start redis
  service: name=redis state=started enabled=yes

---

- name: Install the EPEL repo
  yum: name=epel-release state=latest

- name: Install redis
  yum: name=redis state=latest

- name: Write redis.conf
  template: src=redis.conf dest=/etc/redis.conf owner=redis group=root mode="u=rw,g=r,o=r"
  notify:
    - redis-restart

- name: Write redis-sentinel.conf
  template: src=redis-sentinel.conf dest=/etc/redis-sentinel.conf owner=redis group=root mode="u=rw,g=r,o=r"
  notify:
    - redis-restart

- name: Start redis
  service: name=redis state=started enabled=yes

Make sure redis is restarted when config files are written
Make sure redis is restarted when config files are written
