Skip to content

Commit 6059a37

Browse files
authored
Merge pull request #946 from trenta/master
Allow allowkey and denykey on agent2
2 parents afb6f3f + 432b192 commit 6059a37

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/classes/agent_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
it do
463463
is_expected.not_to contain_file(config_path).with_content(
464464
%r{^(LogRemoteCommands|StartAgents|MaxLinesPerSecond
465-
|AllowRoot|User|LoadModulePath|AllowKey|DenyKey|
465+
|AllowRoot|User|LoadModulePath|
466466
EnableRemoteCommands|LogRemoteCommands)}
467467
)
468468
end

templates/zabbix_agentd.conf.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ DebugLevel=<%= @debuglevel %>
4848
#
4949
<% if @sourceip %>SourceIP=<%= @sourceip %><% end %>
5050

51-
<% unless @agent2 %>
5251
<% if @zabbix_version.to_f >= 5.0 %>
5352
### Option: AllowKey
5453
# Allow execution of item keys matching pattern.
@@ -74,6 +73,7 @@ DebugLevel=<%= @debuglevel %>
7473
# Default:
7574
<% if @denykey %>DenyKey=<%= @denykey -%><% end %>
7675
<% end %>
76+
<% unless @agent2 %>
7777

7878
### Option: EnableRemoteCommands
7979
# Whether remote commands from Zabbix server are allowed.

0 commit comments

Comments
 (0)