Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install redis and redis-sentinel on the same host? #256

Open
drsharp opened this issue Oct 30, 2020 · 1 comment
Open

Cannot install redis and redis-sentinel on the same host? #256

drsharp opened this issue Oct 30, 2020 · 1 comment

Comments

@drsharp
Copy link

drsharp commented Oct 30, 2020

I noted that tasks/main.yml has this:

- include: server.yml
  when: not redis_sentinel
  tags:
    - config

- include: sentinel.yml
  when: redis_sentinel
  tags:
    - config

Because of the when conditionals, it appears that it will only run one or the other. Thus, depending on the true/false of redis_sentinel variable, it will only install redis server or the sentinel.

However, I need to have both for my configuration.

Could a second variable be used instead? maybe something like this:

- include: server.yml
  when: redis_server
  tags:
    - config

- include: sentinel.yml
  when: redis_sentinel
  tags:
    - config

That way the two variables: redis_server and redis_sentinel could be set independently.

@rndmh3ro
Copy link

You could also run two plays..

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

No branches or pull requests

2 participants