Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ them are as follows. See the documentation for Redis for details:
redis_master_port: 6379 # master port
redis_master_auth: None # master auth

# This isn't a redis setting, but if set to true, then the role won't try to
# change the kernel setting (useful for containers).
redis_no_vm_overcommit: false

Examples
--------

Expand Down
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ redis_master_ip: 1.1.1.1
redis_master_port: 6379
redis_master_auth: None


# Set this to true if you don't want to change the overcommit kernel setting.
# (E.g. when you're using a container and you can't change kernel settings.)
#
redis_no_vm_overcommit: false
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
notify:
- restart redis

- name: Set the kernel paramter for vm overcommit
- name: Set the kernel parameter for vm overcommit
sysctl: name=vm.overcommit_memory value=1 state=present
when: redis_no_vm_overcommit == false

- name: start the redis service
service: name={{ redis_service }} state=started enabled=yes
Expand Down