Chef_Solo_Nodes 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +8 -7
- data/bin/SSH +6 -2
- data/lib/Chef_Solo_Nodes/version.rb +1 -1
- data/spec/tests/SSH.rb +6 -0
- metadata +1 -1
data/README.md
CHANGED
@@ -95,7 +95,7 @@ If the file name does not exist:
|
|
95
95
|
xx.xx.xx.xx
|
96
96
|
# exit status = 1
|
97
97
|
|
98
|
-
Usage: IP
|
98
|
+
Usage: IP, IP --no-user
|
99
99
|
--------------------
|
100
100
|
|
101
101
|
$ IP file_name
|
@@ -108,14 +108,12 @@ any form of the following:
|
|
108
108
|
127.0.0.1:2222
|
109
109
|
user@127.0.0.1:2222
|
110
110
|
|
111
|
-
|
112
|
-
--------------------
|
113
|
-
Removes the **user@** part of the address:
|
111
|
+
With **--no-user**:
|
114
112
|
|
115
|
-
$ IP --no-user file_name
|
116
113
|
127.0.0.1
|
114
|
+
127.0.0.1:2222
|
117
115
|
|
118
|
-
Usage: SSH
|
116
|
+
Usage: SSH, SSH --no-user
|
119
117
|
--------------------
|
120
118
|
|
121
119
|
$ SSH file_name
|
@@ -128,7 +126,10 @@ any form of the following:
|
|
128
126
|
user@127.0.0.1
|
129
127
|
-p 2222 user@127.0.0.1
|
130
128
|
|
131
|
-
|
129
|
+
With **--no-user**:
|
130
|
+
|
131
|
+
127.0.0.1
|
132
|
+
-p 2222 127.0.0.1
|
132
133
|
|
133
134
|
Run Tests
|
134
135
|
---------
|
data/bin/SSH
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
2
|
require "Chef_Solo_Nodes"
|
3
|
+
require "trollop"
|
4
|
+
|
5
|
+
opts = Trollop::options do
|
6
|
+
opt :no_user, "Avoid printing any user/login value", :default=>false
|
7
|
+
end
|
4
8
|
|
5
9
|
n = Chef_Solo_IPs(Dir.glob("nodes/#{ARGV.first}.json")).first
|
6
10
|
|
@@ -17,7 +21,7 @@ if uri.port
|
|
17
21
|
str << "-p #{uri.port} "
|
18
22
|
end
|
19
23
|
|
20
|
-
if uri.user
|
24
|
+
if uri.user && !opts[:no_user]
|
21
25
|
str << "#{uri.user}@"
|
22
26
|
end
|
23
27
|
|
data/spec/tests/SSH.rb
CHANGED