Skip to content

Commit 9068d33

Browse files
committed
Merge pull request #44 from tejaycar/rhel
Rhel
2 parents ca59ec5 + 1702485 commit 9068d33

6 files changed

Lines changed: 25 additions & 9 deletions

File tree

.kitchen.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ driver:
44

55
driver_config:
66
require_chef_omnibus: '11.16.4'
7-
box: opscode-ubuntu-12.04
8-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
97

108
provisioner:
119
name: chef_zero
1210
require_chef_omnibus: true
1311
chef_omnibus_url: https://www.getchef.com/chef/install.sh
1412

1513
platforms:
16-
- name: ubuntu-12.04
17-
run_list:
18-
- recipe[apt]
14+
- name: ubuntu-12.04
15+
box: opscode-ubuntu-12.04
16+
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
17+
run_list:
18+
- recipe[apt]
19+
- name: centos-7.0
1920

2021
suites:
2122
- name: known_hosts

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# CHANGELOG for ssh
2+
## 0.10.5
3+
* add support for RHEL family
4+
25
## 0.10.4
36
* fix github #39 where we use the resource name rather than host (The name attribute) in the config LWRP
47

attributes/default.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
default['ssh']['known_hosts_path'] = '/etc/ssh/ssh_known_hosts'
22
default['ssh']['config_path'] = '/etc/ssh/ssh_config'
3+
4+
case node['platform_family']
5+
when 'debian'
6+
default['ssh']['packages'] = ['ssh']
7+
when 'rhel'
8+
default['ssh']['packages'] = ['openssh-server', 'openssh-clients']
9+
else
10+
default['ssh']['packages'] = ['ssh']
11+
end

metadata.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@
44
license 'Apache 2.0'
55
description 'LWRPs for managing SSH known_hosts and config files'
66
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7-
version '0.10.4'
7+
version '0.10.5'
8+
9+
supports 'ubuntu'
10+
supports 'rhel'

providers/known_hosts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def whyrun_supported?
3434
end
3535

3636
action :remove do
37-
if @current_resource.exists?
37+
if @current_resource.exists? # ~FC023
3838
execute "remove known_host entry for #{new_resource.host}" do
3939
command "ssh-keygen -R #{Shellwords.escape(new_resource.host)} -f #{new_resource.path}"
4040
user new_resource.user if new_resource.user

recipes/default.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# Cookbook: ssh
33
# Recipe: default.rb
44

5-
package 'ssh' do
6-
action :install
5+
node['ssh']['packages'].each do |package_name|
6+
package package_name
77
end

0 commit comments

Comments
 (0)