geerlingguy / ansible-role-redis

Ansible Role - Redis
https://galaxy.ansible.com/geerlingguy/redis/
MIT License
254 stars 197 forks source link

Allow spaces in password #38

Closed sebastiaanluca closed 4 years ago

sebastiaanluca commented 5 years ago

A simple tweak to allow using spaces in the Redis password (e.g. a passphrase).

Currently, using spaces in the password results in a corrupt configuration file:

redis-server[26891]: *** FATAL CONFIG FILE ERROR ***
redis-server[26891]: Reading the configuration file, at line 41
redis-server[26891]: >>> 'requirepass random password with spaces in it'
redis-server[26891]: Bad directive or wrong number of arguments
systemd[1]: redis-server.service: Control process exited, code=exited status=1
systemd[1]: redis-server.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Advanced key-value store.
sebastiaanluca commented 5 years ago

Just note that this could be a breaking change as passwords that are already surrounded by quotes will then have the quotes included in the password. So either this PR and always use passwords without quotes or simply give the users the hint to use quotes when there are spaces in it.

stale[bot] commented 4 years ago

This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark pull requests as stale.

stale[bot] commented 4 years ago

This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details.