kitchen-ansible 0.0.25 → 0.0.26
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.
- checksums.yaml +4 -4
- data/README.md +222 -222
- data/kitchen-ansible.gemspec +35 -35
- data/lib/kitchen-ansible/version.rb +5 -5
- data/lib/kitchen/provisioner/ansible/config.rb +162 -161
- data/lib/kitchen/provisioner/ansible/librarian.rb +83 -83
- data/lib/kitchen/provisioner/ansible_playbook.rb +821 -808
- data/provisioner_options.md +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 12e92abba2be5a052054351e04be29eeb511891c
|
|
4
|
+
data.tar.gz: 2327ee07c2c68d7728c41cc1a1a59b4ebf38dba3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8263fa86df082728eb5c01c73047626cbb5a9ee92d4316177636f05d01883c0bc739168cf48d1a140dd0a73c5044b89230510b0c0d1696d0b249dd285ac8363
|
|
7
|
+
data.tar.gz: 4a219b6336e9925f7536396b2e5d2680c74746c0c03d8930f911a9991f5c600ed7279f274cd8ac64afd1665fef0b7637694be1e95ba5aa1f80f52d860cae9195
|
data/README.md
CHANGED
|
@@ -1,222 +1,222 @@
|
|
|
1
|
-
# kitchen-ansible
|
|
2
|
-
|
|
3
|
-
[](http://badge.fury.io/rb/kitchen-ansible)
|
|
4
|
-
[](https://rubygems.org/gems/kitchen-ansible)
|
|
5
|
-
[](https://travis-ci.org/neillturner/kitchen-ansible)
|
|
6
|
-
|
|
7
|
-
A Test Kitchen Provisioner for Ansible
|
|
8
|
-
|
|
9
|
-
The provisioner works by passing the ansible repository based on attributes in
|
|
10
|
-
|
|
11
|
-
It installs Ansible on the server and runs ansible-playbook using host localhost.
|
|
12
|
-
|
|
13
|
-
Has been tested against the Ubuntu
|
|
14
|
-
|
|
15
|
-
## Requirements
|
|
16
|
-
You'll need a driver box without a chef installation so ansible can be installed.
|
|
17
|
-
|
|
18
|
-
## Installation & Setup
|
|
19
|
-
You'll need the test-kitchen & kitchen-ansible
|
|
20
|
-
|
|
21
|
-
Please see the Provisioner Options (https://github.com/neillturner/kitchen-ansible/blob/master/provisioner_options.md).
|
|
22
|
-
|
|
23
|
-
## Example kitchen.yml file
|
|
24
|
-
|
|
25
|
-
based on the example ansible setup for tomcat at https://github.com/ansible/ansible-examples/tree/master/tomcat-standalone
|
|
26
|
-
|
|
27
|
-
```yaml
|
|
28
|
-
---
|
|
29
|
-
driver:
|
|
30
|
-
name: vagrant
|
|
31
|
-
|
|
32
|
-
provisioner:
|
|
33
|
-
name: ansible_playbook
|
|
34
|
-
roles_path: roles
|
|
35
|
-
hosts: tomcat-servers
|
|
36
|
-
require_ansible_repo: true
|
|
37
|
-
ansible_verbose: true
|
|
38
|
-
ansible_version: 1.6.2-1.el6
|
|
39
|
-
extra_vars:
|
|
40
|
-
a: b
|
|
41
|
-
|
|
42
|
-
platforms:
|
|
43
|
-
- name: nocm_centos-6.5
|
|
44
|
-
driver_plugin: vagrant
|
|
45
|
-
driver_config:
|
|
46
|
-
box: nocm_centos-6.5
|
|
47
|
-
box_url: http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box
|
|
48
|
-
network:
|
|
49
|
-
- ['forwarded_port', {guest: 8080, host: 8080}]
|
|
50
|
-
- [ 'private_network', { ip: '192.168.33.11' } ]
|
|
51
|
-
|
|
52
|
-
verifier:
|
|
53
|
-
ruby_bindir: '/usr/bin'
|
|
54
|
-
```
|
|
55
|
-
**NOTE:** With Test-Kitchen 1.4 you no longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the
|
|
56
|
-
|
|
57
|
-
```yaml
|
|
58
|
-
verifier:
|
|
59
|
-
ruby_bindir: '/usr/bin'
|
|
60
|
-
```
|
|
61
|
-
where
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
## Test-Kitchen/Ansible/Serverspec
|
|
65
|
-
|
|
66
|
-
In the root directory for your Ansible role:
|
|
67
|
-
|
|
68
|
-
Create a `.kitchen.yml`, much like one the described above:
|
|
69
|
-
|
|
70
|
-
```yaml
|
|
71
|
-
---
|
|
72
|
-
driver:
|
|
73
|
-
name: vagrant
|
|
74
|
-
|
|
75
|
-
provisioner:
|
|
76
|
-
name: ansible_playbook
|
|
77
|
-
playbook: default.yml
|
|
78
|
-
ansible_yum_repo: "https://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm"
|
|
79
|
-
ansible_verbose: true
|
|
80
|
-
ansible_verbosity: 3
|
|
81
|
-
hosts: all
|
|
82
|
-
|
|
83
|
-
platforms:
|
|
84
|
-
- name: ubuntu-12.04
|
|
85
|
-
driver_config:
|
|
86
|
-
box: ubuntu/precise32
|
|
87
|
-
- name: centos-7
|
|
88
|
-
driver_config:
|
|
89
|
-
box: chef/centos-7.0
|
|
90
|
-
|
|
91
|
-
verifier:
|
|
92
|
-
ruby_bindir: '/usr/bin'
|
|
93
|
-
|
|
94
|
-
suites:
|
|
95
|
-
- name: default
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Then for serverspec:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
mkdir -p test/integration/default/serverspec/localhost
|
|
102
|
-
echo "require 'serverspec'" >> test/integration/default/serverspec/spec_helper.rb
|
|
103
|
-
echo "set :backend, :exec" >> test/integration/default/serverspec/spec_helper.rb
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Create a basic playbook `test/integration/default.yml` so that kitchen can use your role (this should include any dependencies for your role):
|
|
107
|
-
|
|
108
|
-
```yaml
|
|
109
|
-
---
|
|
110
|
-
- name: wrapper playbook for kitchen testing "my_role"
|
|
111
|
-
hosts: localhost
|
|
112
|
-
roles:
|
|
113
|
-
- my_role
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Create your serverspec tests in `test/integration/default/serverspec/localhost/my_roles_spec.rb`:
|
|
117
|
-
|
|
118
|
-
```ruby
|
|
119
|
-
require 'spec_helper'
|
|
120
|
-
|
|
121
|
-
if os[:family] == 'ubuntu'
|
|
122
|
-
describe '/etc/lsb-release' do
|
|
123
|
-
it "exists" do
|
|
124
|
-
expect(file('/etc/lsb-release')).to be_file
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
if os[:family] == 'redhat'
|
|
130
|
-
describe '/etc/redhat-release' do
|
|
131
|
-
it "exists" do
|
|
132
|
-
expect(file('/etc/redhat-release')).to be_file
|
|
133
|
-
end
|
|
134
|
-
end
|
|
135
|
-
end
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
### Testing multiple playbooks
|
|
139
|
-
To test different playbooks in different suites you can easily overwrite the provisioner settings in each suite seperately.
|
|
140
|
-
```yaml
|
|
141
|
-
---
|
|
142
|
-
driver:
|
|
143
|
-
name: vagrant
|
|
144
|
-
|
|
145
|
-
provisioner:
|
|
146
|
-
name: ansible_playbook
|
|
147
|
-
|
|
148
|
-
platforms:
|
|
149
|
-
- name: ubuntu-12.04
|
|
150
|
-
driver_config:
|
|
151
|
-
box: ubuntu/precise32
|
|
152
|
-
- name: centos-7
|
|
153
|
-
driver_config:
|
|
154
|
-
box: chef/centos-7.0
|
|
155
|
-
|
|
156
|
-
suites:
|
|
157
|
-
- name: database
|
|
158
|
-
provisioner:
|
|
159
|
-
playbook: postgres.yml
|
|
160
|
-
hosts: database
|
|
161
|
-
- name: application
|
|
162
|
-
provisioner:
|
|
163
|
-
playbook: web_app.yml
|
|
164
|
-
hosts: web_application
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Alternative Virtualization/Cloud providers for Vagrant
|
|
168
|
-
This could be adapted to use alternative virtualization/cloud providers such as Openstack/AWS/VMware Fusion according to whatever is supported by Vagrant.
|
|
169
|
-
```yaml
|
|
170
|
-
platforms:
|
|
171
|
-
- name: ubuntu-12.04
|
|
172
|
-
driver_config:
|
|
173
|
-
provider: aws
|
|
174
|
-
box: my_base_box
|
|
175
|
-
# username is based on what is configured in your box/ami
|
|
176
|
-
username: ubuntu
|
|
177
|
-
customize:
|
|
178
|
-
access_key_id: "AKKJHG659868LHGLH"
|
|
179
|
-
secret_access_key: "G8t7o+6HLG876JGF/58"
|
|
180
|
-
ami: ami-7865ab765d
|
|
181
|
-
instance_type: t2.micro
|
|
182
|
-
# more customisation can go here, based on what the vagrant provider supports
|
|
183
|
-
#security-groups: []
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
*Notes*
|
|
187
|
-
|
|
188
|
-
* The `default` in all of the above is the name of the test suite defined in the 'suites' section of your `.kitchen.yml`, so if you have more than suite of tests or change the name, you'll need to adapt my example accordingly.
|
|
189
|
-
* serverspec test files *must* be named `_spec.rb`
|
|
190
|
-
* Since I'm using Vagrant, my `box` definitions refer to Vagrant boxes, either standard, published boxes available from <http://atlas.hashicorp.com/boxes> or custom-created boxes (perhaps using [Packer][packer] and [bento][bento]), in which case you'll need to provide the url in `box_url`.
|
|
191
|
-
|
|
192
|
-
[Serverspec]: http://serverspec.org
|
|
193
|
-
[packer]: https://packer.io
|
|
194
|
-
[bento]: https://github.com/chef/bento
|
|
195
|
-
|
|
196
|
-
## Custom ServerSpec or AnsibleSpec Invocation
|
|
197
|
-
|
|
198
|
-
Instead of using the busser use a custom serverspec invocation using [shell verifier](https://github.com/higanworks/kitchen-verifier-shell) to call it.
|
|
199
|
-
With such setup there is no dependency on busser and any other chef library.
|
|
200
|
-
|
|
201
|
-
Also you can specify you tests in a different directory structure or even call [ansible spec](https://github.com/volanja/ansible_spec) instead of server spec and have tests in ansible_spec structure
|
|
202
|
-
|
|
203
|
-
Using a structure like
|
|
204
|
-
```yaml
|
|
205
|
-
verifier:
|
|
206
|
-
name: shell
|
|
207
|
-
remote_exec: true
|
|
208
|
-
command: |
|
|
209
|
-
sudo -s <<SERVERSPEC
|
|
210
|
-
cd /opt/gdc/serverspec-core
|
|
211
|
-
export SERVERSPEC_ENV=$EC2DATA_ENVIRONMENT
|
|
212
|
-
export SERVERSPEC_BACKEND=exec
|
|
213
|
-
serverspec junit=true tag=~skip_in_kitchen check:role:$EC2DATA_TYPE
|
|
214
|
-
SERVERSPEC
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
where `serverspec` is a wrapper around `rake` invocation.
|
|
218
|
-
Use a `Rakefile` similar to one in https://github.com/vincentbernat/serverspec-example.
|
|
219
|
-
|
|
220
|
-
With such approach we can achieve flexibility of running same test suite both in test kitchen and actual, even production, instances.
|
|
221
|
-
|
|
222
|
-
Beware: kitchen-shell-verifier is not yet merged into test-kitchen upstream so using separate gem is unavoidable so far
|
|
1
|
+
# kitchen-ansible
|
|
2
|
+
|
|
3
|
+
[](http://badge.fury.io/rb/kitchen-ansible)
|
|
4
|
+
[](https://rubygems.org/gems/kitchen-ansible)
|
|
5
|
+
[](https://travis-ci.org/neillturner/kitchen-ansible)
|
|
6
|
+
|
|
7
|
+
A Test Kitchen Provisioner for Ansible
|
|
8
|
+
|
|
9
|
+
The provisioner works by passing the ansible repository based on attributes in `.kitchen.yml` & calling `ansible-playbook`.
|
|
10
|
+
|
|
11
|
+
It installs Ansible on the server and runs `ansible-playbook` using host localhost.
|
|
12
|
+
|
|
13
|
+
Has been tested against the Ubuntu 12.04 and Centos 6.5 boxes running in vagrant/virtualbox.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
You'll need a driver box without a chef installation so ansible can be installed.
|
|
17
|
+
|
|
18
|
+
## Installation & Setup
|
|
19
|
+
You'll need the test-kitchen & kitchen-ansible gems installed in your system, along with [kitchen-vagrant](https://github.com/test-kitchen/kitchen-vagrant) or some other suitable driver for test-kitchen.
|
|
20
|
+
|
|
21
|
+
Please see the Provisioner Options (https://github.com/neillturner/kitchen-ansible/blob/master/provisioner_options.md).
|
|
22
|
+
|
|
23
|
+
## Example kitchen.yml file
|
|
24
|
+
|
|
25
|
+
based on the example ansible setup for tomcat at https://github.com/ansible/ansible-examples/tree/master/tomcat-standalone
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
---
|
|
29
|
+
driver:
|
|
30
|
+
name: vagrant
|
|
31
|
+
|
|
32
|
+
provisioner:
|
|
33
|
+
name: ansible_playbook
|
|
34
|
+
roles_path: roles
|
|
35
|
+
hosts: tomcat-servers
|
|
36
|
+
require_ansible_repo: true
|
|
37
|
+
ansible_verbose: true
|
|
38
|
+
ansible_version: 1.6.2-1.el6
|
|
39
|
+
extra_vars:
|
|
40
|
+
a: b
|
|
41
|
+
|
|
42
|
+
platforms:
|
|
43
|
+
- name: nocm_centos-6.5
|
|
44
|
+
driver_plugin: vagrant
|
|
45
|
+
driver_config:
|
|
46
|
+
box: nocm_centos-6.5
|
|
47
|
+
box_url: http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box
|
|
48
|
+
network:
|
|
49
|
+
- ['forwarded_port', {guest: 8080, host: 8080}]
|
|
50
|
+
- [ 'private_network', { ip: '192.168.33.11' } ]
|
|
51
|
+
|
|
52
|
+
verifier:
|
|
53
|
+
ruby_bindir: '/usr/bin'
|
|
54
|
+
```
|
|
55
|
+
**NOTE:** With Test-Kitchen 1.4 you no longer need chef install to run the tests. You just need ruby installed version 1.9 or higher and also add to the `.kitchen.yml` file
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
verifier:
|
|
59
|
+
ruby_bindir: '/usr/bin'
|
|
60
|
+
```
|
|
61
|
+
where `/usr/bin` is the location of the ruby command.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## Test-Kitchen/Ansible/Serverspec
|
|
65
|
+
|
|
66
|
+
In the root directory for your Ansible role:
|
|
67
|
+
|
|
68
|
+
Create a `.kitchen.yml`, much like one the described above:
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
---
|
|
72
|
+
driver:
|
|
73
|
+
name: vagrant
|
|
74
|
+
|
|
75
|
+
provisioner:
|
|
76
|
+
name: ansible_playbook
|
|
77
|
+
playbook: default.yml
|
|
78
|
+
ansible_yum_repo: "https://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm"
|
|
79
|
+
ansible_verbose: true
|
|
80
|
+
ansible_verbosity: 3
|
|
81
|
+
hosts: all
|
|
82
|
+
|
|
83
|
+
platforms:
|
|
84
|
+
- name: ubuntu-12.04
|
|
85
|
+
driver_config:
|
|
86
|
+
box: ubuntu/precise32
|
|
87
|
+
- name: centos-7
|
|
88
|
+
driver_config:
|
|
89
|
+
box: chef/centos-7.0
|
|
90
|
+
|
|
91
|
+
verifier:
|
|
92
|
+
ruby_bindir: '/usr/bin'
|
|
93
|
+
|
|
94
|
+
suites:
|
|
95
|
+
- name: default
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Then for serverspec:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
mkdir -p test/integration/default/serverspec/localhost
|
|
102
|
+
echo "require 'serverspec'" >> test/integration/default/serverspec/spec_helper.rb
|
|
103
|
+
echo "set :backend, :exec" >> test/integration/default/serverspec/spec_helper.rb
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Create a basic playbook `test/integration/default.yml` so that kitchen can use your role (this should include any dependencies for your role):
|
|
107
|
+
|
|
108
|
+
```yaml
|
|
109
|
+
---
|
|
110
|
+
- name: wrapper playbook for kitchen testing "my_role"
|
|
111
|
+
hosts: localhost
|
|
112
|
+
roles:
|
|
113
|
+
- my_role
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Create your serverspec tests in `test/integration/default/serverspec/localhost/my_roles_spec.rb`:
|
|
117
|
+
|
|
118
|
+
```ruby
|
|
119
|
+
require 'spec_helper'
|
|
120
|
+
|
|
121
|
+
if os[:family] == 'ubuntu'
|
|
122
|
+
describe '/etc/lsb-release' do
|
|
123
|
+
it "exists" do
|
|
124
|
+
expect(file('/etc/lsb-release')).to be_file
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if os[:family] == 'redhat'
|
|
130
|
+
describe '/etc/redhat-release' do
|
|
131
|
+
it "exists" do
|
|
132
|
+
expect(file('/etc/redhat-release')).to be_file
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Testing multiple playbooks
|
|
139
|
+
To test different playbooks in different suites you can easily overwrite the provisioner settings in each suite seperately.
|
|
140
|
+
```yaml
|
|
141
|
+
---
|
|
142
|
+
driver:
|
|
143
|
+
name: vagrant
|
|
144
|
+
|
|
145
|
+
provisioner:
|
|
146
|
+
name: ansible_playbook
|
|
147
|
+
|
|
148
|
+
platforms:
|
|
149
|
+
- name: ubuntu-12.04
|
|
150
|
+
driver_config:
|
|
151
|
+
box: ubuntu/precise32
|
|
152
|
+
- name: centos-7
|
|
153
|
+
driver_config:
|
|
154
|
+
box: chef/centos-7.0
|
|
155
|
+
|
|
156
|
+
suites:
|
|
157
|
+
- name: database
|
|
158
|
+
provisioner:
|
|
159
|
+
playbook: postgres.yml
|
|
160
|
+
hosts: database
|
|
161
|
+
- name: application
|
|
162
|
+
provisioner:
|
|
163
|
+
playbook: web_app.yml
|
|
164
|
+
hosts: web_application
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Alternative Virtualization/Cloud providers for Vagrant
|
|
168
|
+
This could be adapted to use alternative virtualization/cloud providers such as Openstack/AWS/VMware Fusion according to whatever is supported by Vagrant.
|
|
169
|
+
```yaml
|
|
170
|
+
platforms:
|
|
171
|
+
- name: ubuntu-12.04
|
|
172
|
+
driver_config:
|
|
173
|
+
provider: aws
|
|
174
|
+
box: my_base_box
|
|
175
|
+
# username is based on what is configured in your box/ami
|
|
176
|
+
username: ubuntu
|
|
177
|
+
customize:
|
|
178
|
+
access_key_id: "AKKJHG659868LHGLH"
|
|
179
|
+
secret_access_key: "G8t7o+6HLG876JGF/58"
|
|
180
|
+
ami: ami-7865ab765d
|
|
181
|
+
instance_type: t2.micro
|
|
182
|
+
# more customisation can go here, based on what the vagrant provider supports
|
|
183
|
+
#security-groups: []
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
*Notes*
|
|
187
|
+
|
|
188
|
+
* The `default` in all of the above is the name of the test suite defined in the 'suites' section of your `.kitchen.yml`, so if you have more than suite of tests or change the name, you'll need to adapt my example accordingly.
|
|
189
|
+
* serverspec test files *must* be named `_spec.rb`
|
|
190
|
+
* Since I'm using Vagrant, my `box` definitions refer to Vagrant boxes, either standard, published boxes available from <http://atlas.hashicorp.com/boxes> or custom-created boxes (perhaps using [Packer][packer] and [bento][bento]), in which case you'll need to provide the url in `box_url`.
|
|
191
|
+
|
|
192
|
+
[Serverspec]: http://serverspec.org
|
|
193
|
+
[packer]: https://packer.io
|
|
194
|
+
[bento]: https://github.com/chef/bento
|
|
195
|
+
|
|
196
|
+
## Custom ServerSpec or AnsibleSpec Invocation
|
|
197
|
+
|
|
198
|
+
Instead of using the busser use a custom serverspec invocation using [shell verifier](https://github.com/higanworks/kitchen-verifier-shell) to call it.
|
|
199
|
+
With such setup there is no dependency on busser and any other chef library.
|
|
200
|
+
|
|
201
|
+
Also you can specify you tests in a different directory structure or even call [ansible spec](https://github.com/volanja/ansible_spec) instead of server spec and have tests in ansible_spec structure
|
|
202
|
+
|
|
203
|
+
Using a structure like
|
|
204
|
+
```yaml
|
|
205
|
+
verifier:
|
|
206
|
+
name: shell
|
|
207
|
+
remote_exec: true
|
|
208
|
+
command: |
|
|
209
|
+
sudo -s <<SERVERSPEC
|
|
210
|
+
cd /opt/gdc/serverspec-core
|
|
211
|
+
export SERVERSPEC_ENV=$EC2DATA_ENVIRONMENT
|
|
212
|
+
export SERVERSPEC_BACKEND=exec
|
|
213
|
+
serverspec junit=true tag=~skip_in_kitchen check:role:$EC2DATA_TYPE
|
|
214
|
+
SERVERSPEC
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
where `serverspec` is a wrapper around `rake` invocation.
|
|
218
|
+
Use a `Rakefile` similar to one in https://github.com/vincentbernat/serverspec-example.
|
|
219
|
+
|
|
220
|
+
With such approach we can achieve flexibility of running same test suite both in test kitchen and actual, even production, instances.
|
|
221
|
+
|
|
222
|
+
Beware: kitchen-shell-verifier is not yet merged into test-kitchen upstream so using separate gem is unavoidable so far
|