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

add option to set aclfile #485

Merged
merged 1 commit into from
Nov 11, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This file is used to list changes made in each version of the redisio cookbook.

## Unreleased

- Add `aclfile` option to redis configuration file.

## 6.5.0 - *2023-10-31*

- Add `maxclients` option to sentinel configuration file.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ Available options and their defaults
'clusterconfigfile' => nil, # Defaults to redis instance name inside of template if cluster is enabled.
'clusternodetimeout' => 5000,
'includes' => nil,
'aclfile' => nil, # Requires redis 6+
'breadcrumb' => true # Defaults to create breadcrumb lock-file.
```

Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
'clusterconfigfile' => nil, # Defaults to redis instance name inside of template if cluster is enabled.
'clusternodetimeout' => 5000,
'includes' => nil,
'aclfile' => nil,
'data_bag_name' => nil,
'data_bag_item' => nil,
'data_bag_key' => nil,
Expand Down
1 change: 1 addition & 0 deletions providers/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
clusterconfigfile: current['clusterconfigfile'],
clusternodetimeout: current['clusternodetimeout'],
includes: current['includes'],
aclfile: current['aclfile'],
minslavestowrite: current['minslavestowrite'],
minslavesmaxlag: current['minslavesmaxlag'],
repldisklesssync: current['repldisklesssync'],
Expand Down
16 changes: 16 additions & 0 deletions templates/default/redis.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,22 @@ cluster-config-file <%= @clusterconfigfile || "nodes-#{@name}.conf" %>
cluster-node-timeout <%= @clusternodetimeout %>
<%end%>

<% if @version[:major].to_i >= 6 %>
# Using an external ACL file
#
# Instead of configuring users here in this file, it is possible to use
# a stand-alone file just listing users. The two methods cannot be mixed:
# if you configure users here and at the same time you activate the external
# ACL file, the server will refuse to start.
#
# The format of the external ACL user file is exactly the same as the
# format that is used inside redis.conf to describe users.
#
<% unless @aclfile.nil? %>
aclfile <%= @aclfile %>
<% end %>
<% end %>

################################## INCLUDES ###################################

# Include one or more other config files here. This is useful if you
Expand Down
Loading