Skip to content

Conversation

@neofob
Copy link
Contributor

@neofob neofob commented May 2, 2019

defaults/main.yml:
* Add redis_protected_mode for redis server config
* Add redis_sentinel_protected_mode for redis sentinel config

templates/redis.conf.j2:
* Add redis_protected_mode variable for redis server config template

templates/redis_sentinel.conf.j2:
* Add redis_sentinel_protected_mode variable for redis sentinel
server config template

Signed-off-by: Tuan T. Pham tuan@vt.edu

defaults/main.yml:
    * Add redis_protected_mode for redis server config
    * Add redis_sentinel_protected_mode for redis sentinel config

templates/redis.conf.j2:
    * Add redis_protected_mode variable for redis server config template

templates/redis_sentinel.conf.j2:
    * Add redis_sentinel_protected_mode variable for redis sentinel
    server config template

Signed-off-by: Tuan T. Pham <tuan@vt.edu>
@DavidWittman
Copy link
Owner

Thanks! This closes #237

@rromanchuk
Copy link

@DavidWittman you think you can merge this one soon, one less fork to manage

## Redis sentinel configs
# Set this to true on a host to configure it as a Sentinel
redis_sentinel: false
redis_sentinel_protected_mode: yes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coerce to string "yes"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rromanchuk. I updated the PR.

defaults/main.yml:
	* Coerce value to string with double quote. Otherwise,
	.conf.j2 will write True

CC: @rromanchuck

Signed-off-by: Tuan T. Pham <tuan@vt.edu>
@DavidWittman DavidWittman merged commit b0be6be into DavidWittman:master Jun 23, 2020
@DavidWittman
Copy link
Owner

Thanks @rromanchuk and @neofob!

@DavidWittman DavidWittman mentioned this pull request Jun 28, 2020
rndmh3ro pushed a commit to telekom-mms/ansible-redis that referenced this pull request Nov 27, 2020
* Add protected-mode option to template config files

defaults/main.yml:
    * Add redis_protected_mode for redis server config
    * Add redis_sentinel_protected_mode for redis sentinel config

templates/redis.conf.j2:
    * Add redis_protected_mode variable for redis server config template

templates/redis_sentinel.conf.j2:
    * Add redis_sentinel_protected_mode variable for redis sentinel
    server config template

Signed-off-by: Tuan T. Pham <tuan@vt.edu>

* Update default setting to string

defaults/main.yml:
	* Coerce value to string with double quote. Otherwise,
	.conf.j2 will write True

CC: @rromanchuck

Signed-off-by: Tuan T. Pham <tuan@vt.edu>
@gnalsa
Copy link

gnalsa commented Aug 16, 2022

protected mode was added in redis version 3.2, since there is no version check this will cause redis to fail with fatal config file error. In the future, it might be a good idea to version protect directives to maintain backwards compatibility.

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.

4 participants