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
9 changes: 9 additions & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# Service name
case node["platform_family"]
when "rhel", "fedora"
default[:ssh][:service_name] = "sshd"
else
default[:ssh][:service_name] = "ssh"
end


# Port on which openssh listens on
default[:ssh][:port] = "22"
#
Expand Down
4 changes: 3 additions & 1 deletion recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
service "ssh"
service "ssh" do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using service node[:ssh][:service_name] instead? I think it will work, would you mind trying it out on rhel & fedora please?

service_name node['ssh']['service_name']
end

ssh_config "Port" do
string "Port #{node[:ssh][:port]}"
Expand Down