lisausa-knife-plugins 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/chef/knife/setup_ssh.rb +4 -0
- data/lib/lisausa_knife_plugins.rb +1 -1
- metadata +5 -5
data/lib/chef/knife/setup_ssh.rb
CHANGED
@@ -59,7 +59,11 @@ class LisausaKnifePlugins::SetupSsh < ::Chef::Knife
|
|
59
59
|
FileUtils.copy_file(file_path, "#{file_path}~")
|
60
60
|
File.open(file_path, File::RDWR|File::CREAT) do |f|
|
61
61
|
f.flock(File::LOCK_EX)
|
62
|
+
|
62
63
|
contents = f.read.gsub(/### BEGIN KNIFE BLOCK ###.+?(### END KNIFE BLOCK ###|\Z)/m, ssh_config)
|
64
|
+
unless contents.include?('### BEGIN KNIFE BLOCK ###')
|
65
|
+
contents << ssh_config
|
66
|
+
end
|
63
67
|
f.rewind
|
64
68
|
f.truncate(0)
|
65
69
|
f.write contents
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lisausa-knife-plugins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chef
|
@@ -90,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
segments:
|
92
92
|
- 0
|
93
|
-
hash:
|
93
|
+
hash: 451351544228042537
|
94
94
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
@@ -99,10 +99,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
segments:
|
101
101
|
- 0
|
102
|
-
hash:
|
102
|
+
hash: 451351544228042537
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 1.8.
|
105
|
+
rubygems_version: 1.8.24
|
106
106
|
signing_key:
|
107
107
|
specification_version: 3
|
108
108
|
summary: These are plugins for the Chef utility `knife`, for use by LISAUSA employees
|