kitchen-ansible 0.0.32 → 0.0.33
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b4d280df66920431cf01969f165457c8e884fc2
|
4
|
+
data.tar.gz: a9a62abb6f496d3d862f0a30776f4642ed739822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2c4d149b73a3959c182003b11cf28414f05f3fdad19d92d46876cbcf161142ae05b14a2dc5f5a2486995fc6dc73759a0dd7ed4a553dc82331aa6512acf62990
|
7
|
+
data.tar.gz: eda4854cba439e31bbbe4c6bdb388088343ca62970950123e0843e2ed1a87d31b469cffd4a36750f46c6bd7bca7c7fc09a7c396b86fdaa8a29a3098232f1e86d
|
data/kitchen-ansible.gemspec
CHANGED
@@ -26,7 +26,7 @@ Ansible Provisioner for Test Kitchen
|
|
26
26
|
Supports running ansible-playbook
|
27
27
|
|
28
28
|
EOF
|
29
|
-
s.add_runtime_dependency 'test-kitchen'
|
29
|
+
s.add_runtime_dependency 'test-kitchen', '~> 1.4'
|
30
30
|
|
31
31
|
s.add_development_dependency 'rspec'
|
32
32
|
s.add_development_dependency 'pry'
|
@@ -64,6 +64,7 @@ module Kitchen
|
|
64
64
|
default_config :http_proxy, nil
|
65
65
|
default_config :https_proxy, nil
|
66
66
|
default_config :no_proxy, nil
|
67
|
+
default_config :ansible_playbook_command, nil
|
67
68
|
|
68
69
|
default_config :playbook do |provisioner|
|
69
70
|
provisioner.calculate_path('default.yml', :file) or
|
@@ -276,41 +276,45 @@ module Kitchen
|
|
276
276
|
end
|
277
277
|
|
278
278
|
def run_command
|
279
|
-
if config[:
|
280
|
-
|
281
|
-
cmd = ansible_command("PATH=#{config[:root_path]}/ansible/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PYTHONPATH=#{config[:root_path]}/ansible/lib MANPATH=#{config[:root_path]}/ansible/docs/man #{config[:root_path]}/ansible/bin/ansible-playbook")
|
279
|
+
if !config[:ansible_playbook_command].nil?
|
280
|
+
return config[:ansible_playbook_command]
|
282
281
|
else
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
282
|
+
if config[:require_ansible_source]
|
283
|
+
# this is an ugly hack to get around the fact that extra vars uses ' and "
|
284
|
+
cmd = ansible_command("PATH=#{config[:root_path]}/ansible/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PYTHONPATH=#{config[:root_path]}/ansible/lib MANPATH=#{config[:root_path]}/ansible/docs/man #{config[:root_path]}/ansible/bin/ansible-playbook")
|
285
|
+
else
|
286
|
+
cmd = ansible_command("ansible-playbook")
|
287
|
+
end
|
288
|
+
if config[:ansible_binary_path]
|
289
|
+
cmd = ansible_command("#{config[:ansible_binary_path]}/ansible-playbook")
|
290
|
+
end
|
291
|
+
if https_proxy
|
292
|
+
cmd = "HTTPS_PROXY=#{https_proxy} #{cmd}"
|
293
|
+
end
|
294
|
+
if http_proxy
|
295
|
+
cmd = "HTTP_PROXY=#{http_proxy} #{cmd}"
|
296
|
+
end
|
297
|
+
if ansible_roles_path
|
298
|
+
cmd = "ANSIBLE_ROLES_PATH=#{ansible_roles_path} #{cmd}"
|
299
|
+
end
|
297
300
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
301
|
+
result = [
|
302
|
+
cmd,
|
303
|
+
ansible_inventory_flag,
|
304
|
+
"-c #{config[:ansible_connection]}",
|
305
|
+
"-M #{File.join(config[:root_path], 'modules')}",
|
306
|
+
ansible_verbose_flag,
|
307
|
+
ansible_check_flag,
|
308
|
+
ansible_diff_flag,
|
309
|
+
ansible_vault_flag,
|
310
|
+
extra_vars,
|
311
|
+
tags,
|
312
|
+
ansible_extra_flags,
|
313
|
+
"#{File.join(config[:root_path], File.basename(config[:playbook]))}",
|
314
|
+
].join(" ")
|
315
|
+
info("Going to invoke ansible-playbook with: #{result}")
|
316
|
+
result
|
317
|
+
end
|
314
318
|
end
|
315
319
|
|
316
320
|
def ansible_command(script)
|
@@ -752,6 +756,7 @@ module Kitchen
|
|
752
756
|
# [example_servers]
|
753
757
|
# localhost
|
754
758
|
def prepare_hosts
|
759
|
+
return if ansible_inventory_file
|
755
760
|
info('Preparing hosts file')
|
756
761
|
|
757
762
|
if config[:hosts].nil?
|
data/provisioner_options.md
CHANGED
@@ -42,6 +42,7 @@ ansible_vault_password_file| | Path of Ansible Vault Password File
|
|
42
42
|
ansible_connection | local | Connection for Hosts and Groups
|
43
43
|
ansible_inventory_file | hosts | Custom inventory file
|
44
44
|
ansible_extra_flags | '' | Additional options to pass to `ansible-playbook` -- e.g.: `'--skip-tags=redis'`
|
45
|
+
ansible_playbook_command | | Override the ansible playbook command
|
45
46
|
require_ruby_for_busser|false|install ruby to run busser for tests
|
46
47
|
require_chef_for_busser|true|install chef to run busser for tests. NOTE: kitchen 1.4 only requires ruby to run busser so this is not required.
|
47
48
|
chef_bootstrap_url |https://www.getchef.com /chef/install.sh| the chef install
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kitchen-ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neill Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|