Skip to content
Merged
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
6 changes: 4 additions & 2 deletions roles/redis/defaults/main/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ redis_group: redis
# Default redis port
redis_port: "{{ redis_port_default }}"

# Bind to localhost + private network interface
redis_bind: 127.0.0.1 {{ ansible_default_ipv4.address }}
# Bind to localhost + private network interface.
# ansible_default_ipv4.address is not guaranteed to be present (e.g. hosts
# with no default route), so fall back to an empty string when undefined.
redis_bind: "127.0.0.1 {{ ansible_default_ipv4.address | default('') }}"

# Feature flags that can be overridden in the hosts file
# Essentially, a default installation will have auth, but not tls
Expand Down
6 changes: 4 additions & 2 deletions roles/redis/defaults/main/sentinel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ redis_sentinel_master_name: itentialmaster
# The default redis sentinel listen port
redis_sentinel_port: "{{ redis_sentinel_port_default }}"

# Bind to localhost + private network interface
redis_sentinel_bind: 127.0.0.1 {{ ansible_default_ipv4.address }}
# Bind to localhost + private network interface.
# ansible_default_ipv4.address is not guaranteed to be present (e.g. hosts
# with no default route), so fall back to an empty string when undefined.
redis_sentinel_bind: "127.0.0.1 {{ ansible_default_ipv4.address | default('') }}"

# Auto-calculate quorum based on sentinel count (recommended)
# Set to explicit number to override (must be <= number of sentinels)
Expand Down
Loading