Skip to content

Commit

Permalink
Use bracket syntax for attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
chr4 committed Jul 7, 2016
1 parent 36374a5 commit 960a2d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@
#

# The package to install
default['sshd']['package'] = case platform
default['sshd']['package'] = case node['platform']
when 'archlinux'
'openssh'
else
'openssh-server'
end

# Path to 'sshd_config' configuration file
default['sshd']['config_file'] = case platform_family
default['sshd']['config_file'] = case node['platform_family']
when 'mac_os_x'
'/etc/sshd_config'
else
'/etc/ssh/sshd_config'
end

# OpenSSH service name
default['sshd']['service_name'] = case platform_family
default['sshd']['service_name'] = case node['platform_family']
when 'debian'
'ssh'
else
Expand All @@ -60,7 +60,7 @@
}

# Initialize sftp subsystem
default['sshd']['sshd_config']['Subsystem'] = case platform_family
default['sshd']['sshd_config']['Subsystem'] = case node['platform_family']
when 'debian'
'sftp /usr/lib/openssh/sftp-server'
when 'rhel', 'fedora'
Expand All @@ -69,7 +69,7 @@
'sftp /usr/libexec/sftp-server'
end

case platform_family
case node['platform_family']
when 'debian'
# On debian-like systems, pam takes care of the motd
default['sshd']['sshd_config']['PrintMotd'] = 'no'
Expand Down

0 comments on commit 960a2d7

Please sign in to comment.