DavidWittman / ansible-redis

Highly-configurable Ansible role to install Redis and Redis Sentinel from source
MIT License
663 stars 288 forks source link

Allow server/slave and sentinel configuration in a single run #171

Closed joaoubaldo closed 7 years ago

joaoubaldo commented 7 years ago

In some scenarios it might be desirable to configure sentinels on the same servers as slaves/masters. The conditional when: not redis_sentinel is preventing such configuration from happening in a single ansible run.

DavidWittman commented 7 years ago

@joaoubaldo This has a side-effect of always configuring redis-server on sentinel nodes, no?

IMO you should define this role twice in your playbook with different variables if you wish to install redis-server and redis-sentinel on the same box.

- hosts: all
  roles:
    - role: DavidWittman.redis
    - role: DavidWittman.redis
      redis_sentinel: true
joaoubaldo commented 7 years ago

@DavidWittman sounds good. Will try that on my scenario.

DavidWittman commented 7 years ago

I'm going to close this for now. Let me know if you have some issues which require reopening.