Skip to content

Commit cc827ec

Browse files
committed
Merge pull request #30 from tejaycar/master
Major upgrade
2 parents 0a6e059 + 4169ee4 commit cc827ec

28 files changed

+766
-198
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
22
.kitchen/
33
.kitchen.local.yml
4+
Berksfile.lock

.kitchen.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ platforms:
1111

1212
suites:
1313
- name: default
14-
run_list:
14+
run_list:
1515
- recipe[minitest-handler]
1616
- recipe[ssh_test]
17-
attributes: {}

.rubocop.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
AlignParameters:
2+
Enabled: false
3+
ClassAndModuleChildren:
4+
Enabled: false
5+
Encoding:
6+
Enabled: false
7+
LineLength:
8+
Max: 120
9+
Severity: refactor
10+
HashSyntax:
11+
EnforcedStyle: hash_rockets
12+
ClassLength:
13+
Enabled: false
14+
MethodLength:
15+
Max: 25
16+
Severity: refactor
17+
SingleSpaceBeforeFirstArg:
18+
Enabled: false
19+
Documentation:
20+
Enabled: false

Berksfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
source "https://supermarket.getchef.com"
2+
13
metadata
24

3-
cookbook "minitest-handler"
4-
cookbook "ssh_test", :path => "./test/cookbooks/ssh_test"
5+
group :test do
6+
cookbook "ssh_test", :path => "./test/cookbooks/ssh_test"
7+
end

Berksfile.lock

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
{
2-
"sources": {
3-
"ssh": {
4-
"path": "."
5-
},
6-
"minitest-handler": {
7-
"locked_version": "0.2.1"
8-
},
9-
"ssh_test": {
10-
"path": "./test/cookbooks/ssh_test"
11-
},
12-
"chef_handler": {
13-
"locked_version": "1.1.4"
14-
},
15-
"ohai": {
16-
"locked_version": "1.0.2"
17-
}
18-
}
19-
}
1+
DEPENDENCIES
2+
ssh
3+
path: .
4+
metadata: true
5+
ssh_test
6+
path: test/cookbooks/ssh_test
7+
8+
GRAPH
9+
ssh (0.10.0)
10+
ssh_test (0.2.0)
11+
ssh (>= 0.0.0)

Gemfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
source 'https://rubygems.org'
2+
3+
group :lint do
4+
gem 'foodcritic', '~> 4.0'
5+
gem 'rubocop'
6+
end
7+
8+
group :unit do
9+
gem 'chefspec', '~> 4.1'
10+
gem 'berkshelf', '~> 3.1'
11+
end
12+
13+
group 'integration' do
14+
gem 'kitchen-docker', '~> 1.5.0'
15+
gem 'kitchen-sync'
16+
gem 'kitchen-vagrant', '~> 0.11'
17+
gem 'minitest-chef-handler'
18+
gem 'test-kitchen', '~> 1.2'
19+
gem 'vagrant-wrapper'
20+
end

Gemfile.lock

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
addressable (2.3.6)
5+
ast (2.0.0)
6+
astrolabe (1.3.0)
7+
parser (>= 2.2.0.pre.3, < 3.0)
8+
berkshelf (3.1.5)
9+
addressable (~> 2.3.4)
10+
berkshelf-api-client (~> 1.2)
11+
buff-config (~> 1.0)
12+
buff-extensions (~> 1.0)
13+
buff-shell_out (~> 0.1)
14+
celluloid (~> 0.16.0.pre)
15+
celluloid-io (~> 0.16.0.pre)
16+
faraday (~> 0.9.0)
17+
minitar (~> 0.5.4)
18+
octokit (~> 3.0)
19+
retryable (~> 1.3.3)
20+
ridley (~> 4.0)
21+
solve (~> 1.1)
22+
thor (~> 0.18)
23+
berkshelf-api-client (1.2.0)
24+
faraday (~> 0.9.0)
25+
buff-config (1.0.1)
26+
buff-extensions (~> 1.0)
27+
varia_model (~> 0.4)
28+
buff-extensions (1.0.0)
29+
buff-ignore (1.1.1)
30+
buff-ruby_engine (0.1.0)
31+
buff-shell_out (0.2.0)
32+
buff-ruby_engine (~> 0.1.0)
33+
builder (3.2.2)
34+
celluloid (0.16.0)
35+
timers (~> 4.0.0)
36+
celluloid-io (0.16.1)
37+
celluloid (>= 0.16.0)
38+
nio4r (>= 1.0.0)
39+
chef (11.16.4)
40+
chef-zero (~> 2.1, >= 2.1.4)
41+
diff-lcs (~> 1.2, >= 1.2.4)
42+
erubis (~> 2.7)
43+
ffi-yajl (~> 1.0)
44+
highline (~> 1.6, >= 1.6.9)
45+
mime-types (~> 1.16)
46+
mixlib-authentication (~> 1.3)
47+
mixlib-cli (~> 1.4)
48+
mixlib-config (~> 2.0)
49+
mixlib-log (~> 1.3)
50+
mixlib-shellout (~> 1.4)
51+
net-ssh (~> 2.6)
52+
net-ssh-multi (~> 1.1)
53+
ohai (~> 7.4)
54+
plist (~> 3.1.0)
55+
pry (~> 0.9)
56+
rest-client (>= 1.0.4, <= 1.6.7)
57+
chef-zero (2.2)
58+
hashie (~> 2.0)
59+
json
60+
mixlib-log (~> 1.3)
61+
rack
62+
chefspec (4.1.1)
63+
chef (>= 11.14)
64+
fauxhai (~> 2.0)
65+
rspec (~> 3.0)
66+
ci_reporter (1.9.3)
67+
builder (>= 2.1.2)
68+
coderay (1.1.0)
69+
dep-selector-libgecode (1.0.2)
70+
dep_selector (1.0.3)
71+
dep-selector-libgecode (~> 1.0)
72+
ffi (~> 1.9)
73+
diff-lcs (1.2.5)
74+
erubis (2.7.0)
75+
faraday (0.9.0)
76+
multipart-post (>= 1.2, < 3)
77+
fauxhai (2.2.0)
78+
net-ssh
79+
ohai
80+
ffi (1.9.6)
81+
ffi-yajl (1.2.0)
82+
ffi (~> 1.5)
83+
libyajl2 (~> 1.0)
84+
foodcritic (4.0.0)
85+
erubis
86+
gherkin (~> 2.11)
87+
nokogiri (~> 1.5)
88+
rake
89+
rufus-lru (~> 1.0)
90+
treetop (~> 1.4)
91+
yajl-ruby (~> 1.1)
92+
gherkin (2.12.2)
93+
multi_json (~> 1.3)
94+
hashie (2.1.2)
95+
highline (1.6.21)
96+
hitimes (1.2.2)
97+
ipaddress (0.8.0)
98+
json (1.8.1)
99+
kitchen-docker (1.5.0)
100+
test-kitchen (>= 1.0.0)
101+
kitchen-sync (1.0.1)
102+
net-sftp
103+
test-kitchen (>= 1.0.0)
104+
kitchen-vagrant (0.15.0)
105+
test-kitchen (~> 1.0)
106+
libyajl2 (1.1.0)
107+
method_source (0.8.2)
108+
mime-types (1.25.1)
109+
mini_portile (0.6.0)
110+
minitar (0.5.4)
111+
minitest (4.7.5)
112+
minitest-chef-handler (1.0.3)
113+
chef (>= 10.12.0)
114+
ci_reporter (< 2.0)
115+
minitest (~> 4.7.3)
116+
mixlib-authentication (1.3.0)
117+
mixlib-log
118+
mixlib-cli (1.5.0)
119+
mixlib-config (2.1.0)
120+
mixlib-log (1.6.0)
121+
mixlib-shellout (1.6.0)
122+
multi_json (1.10.1)
123+
multipart-post (2.0.0)
124+
net-http-persistent (2.9.4)
125+
net-scp (1.2.1)
126+
net-ssh (>= 2.6.5)
127+
net-sftp (2.1.2)
128+
net-ssh (>= 2.6.5)
129+
net-ssh (2.9.1)
130+
net-ssh-gateway (1.2.0)
131+
net-ssh (>= 2.6.5)
132+
net-ssh-multi (1.2.0)
133+
net-ssh (>= 2.6.5)
134+
net-ssh-gateway (>= 1.2.0)
135+
nio4r (1.0.1)
136+
nokogiri (1.6.3.1)
137+
mini_portile (= 0.6.0)
138+
octokit (3.4.0)
139+
sawyer (~> 0.5.3)
140+
ohai (7.4.0)
141+
ffi (~> 1.9)
142+
ffi-yajl (~> 1.0)
143+
ipaddress
144+
mime-types (~> 1.16)
145+
mixlib-cli
146+
mixlib-config (~> 2.0)
147+
mixlib-log
148+
mixlib-shellout (~> 1.2)
149+
systemu (~> 2.6.4)
150+
wmi-lite (~> 1.0)
151+
parser (2.2.0.pre.5)
152+
ast (>= 1.1, < 3.0)
153+
slop (~> 3.4, >= 3.4.5)
154+
plist (3.1.0)
155+
polyglot (0.3.5)
156+
powerpack (0.0.9)
157+
pry (0.10.1)
158+
coderay (~> 1.1.0)
159+
method_source (~> 0.8.1)
160+
slop (~> 3.4)
161+
rack (1.5.2)
162+
rainbow (2.0.0)
163+
rake (10.3.2)
164+
rest-client (1.6.7)
165+
mime-types (>= 1.16)
166+
retryable (1.3.6)
167+
ridley (4.0.0)
168+
addressable
169+
buff-config (~> 1.0)
170+
buff-extensions (~> 1.0)
171+
buff-ignore (~> 1.1)
172+
buff-shell_out (~> 0.1)
173+
celluloid (~> 0.16.0.pre)
174+
celluloid-io (~> 0.16.0.pre)
175+
erubis
176+
faraday (~> 0.9.0)
177+
hashie (>= 2.0.2, < 3.0.0)
178+
json (>= 1.7.7)
179+
mixlib-authentication (>= 1.3.0)
180+
net-http-persistent (>= 2.8)
181+
retryable
182+
semverse (~> 1.1)
183+
varia_model (~> 0.4)
184+
rspec (3.1.0)
185+
rspec-core (~> 3.1.0)
186+
rspec-expectations (~> 3.1.0)
187+
rspec-mocks (~> 3.1.0)
188+
rspec-core (3.1.7)
189+
rspec-support (~> 3.1.0)
190+
rspec-expectations (3.1.2)
191+
diff-lcs (>= 1.2.0, < 2.0)
192+
rspec-support (~> 3.1.0)
193+
rspec-mocks (3.1.3)
194+
rspec-support (~> 3.1.0)
195+
rspec-support (3.1.2)
196+
rubocop (0.26.1)
197+
astrolabe (~> 1.3)
198+
parser (>= 2.2.0.pre.4, < 3.0)
199+
powerpack (~> 0.0.6)
200+
rainbow (>= 1.99.1, < 3.0)
201+
ruby-progressbar (~> 1.4)
202+
ruby-progressbar (1.6.0)
203+
rufus-lru (1.0.5)
204+
safe_yaml (1.0.4)
205+
sawyer (0.5.5)
206+
addressable (~> 2.3.5)
207+
faraday (~> 0.8, < 0.10)
208+
semverse (1.2.1)
209+
slop (3.6.0)
210+
solve (1.2.1)
211+
dep_selector (~> 1.0)
212+
semverse (~> 1.1)
213+
systemu (2.6.4)
214+
test-kitchen (1.2.1)
215+
mixlib-shellout (~> 1.2)
216+
net-scp (~> 1.1)
217+
net-ssh (~> 2.7)
218+
safe_yaml (~> 1.0)
219+
thor (~> 0.18)
220+
thor (0.19.1)
221+
timers (4.0.1)
222+
hitimes
223+
treetop (1.5.3)
224+
polyglot (~> 0.3)
225+
vagrant-wrapper (1.2.1.1)
226+
varia_model (0.4.0)
227+
buff-extensions (~> 1.0)
228+
hashie (>= 2.0.2, < 3.0.0)
229+
wmi-lite (1.0.0)
230+
yajl-ruby (1.2.1)
231+
232+
PLATFORMS
233+
ruby
234+
235+
DEPENDENCIES
236+
berkshelf (~> 3.1)
237+
chefspec (~> 4.1)
238+
foodcritic (~> 4.0)
239+
kitchen-docker (~> 1.5.0)
240+
kitchen-sync
241+
kitchen-vagrant (~> 0.11)
242+
minitest-chef-handler
243+
rubocop
244+
test-kitchen (~> 1.2)
245+
vagrant-wrapper

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ Provides 2 LWRPs to manage system-wide and per-user `ssh_config` and `known_host
66

77
## Usage
88

9-
When using SSH with Chef deployments, it's crucial to not get any prompts for input. Adding entries to `known_hosts` files and better managing your per-connection configuration can help with this.
9+
When using SSH with Chef deployments, it's crucial to not get any prompts for input. Adding entries to `known_hosts` files and better managing your per-connection configuration can help with this.
1010

1111
An important thing to note is that if you create a user during a chef run, be sure to reload OHAI data so that the new user will be in the node data. For instance:
1212

1313
ohai "reload_passwd" do
1414
plugin "passwd"
1515
end
1616

17+
The ssh cookbook bypasses this need somewhat by using ohai classes directly to discover your users' ssh paths. However
18+
some of your cookbooks may not be as generous.
19+
1720
## Resources and Providers
1821

1922
### known_hosts

ROADMAP.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
v0.10.0
2+
===========
3+
4+
* Make everything idempotent
5+
* Chefspec for everything that can
6+
* Kitchen for anything we can't chefspec (hopefully that's nothing)
7+
* use_inline_resources
8+
* support why_run
9+
* Merge any outstanding PR's I'm comfortable with
10+
* Add CONTRIBUTING.md
11+
12+
v0.10.1
13+
==========
14+
* add foodcritic support
15+
16+
17+
Eventually (PRs are VERY welcome)
18+
===========
19+
* Add a authorized_keys resource
20+
* Get guardfile figured out
21+
* The order of entries in ssh_config matters. So we need to support a priority or something to set it with.

0 commit comments

Comments
 (0)