kitchen-ansible 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/kitchen-ansible.gemspec +3 -2
- data/lib/kitchen-ansible/version.rb +1 -1
- data/lib/kitchen/provisioner/ansible_playbook.rb +19 -25
- data/provisioner_options.md +1 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 222d1ee98effa69d0d9992fe20f9c9511b4c9ff1
|
4
|
+
data.tar.gz: 55f68c2848abc4233e8acd74fa784c5372557026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6622698240ee163482c9a45fca1f7cb8d020e3874e487620925e943ca3a76aac7e5799bcd862d11e23597144526bc8b7d1fa057221e54ec6c1534524d72595ea
|
7
|
+
data.tar.gz: a48e95524e38f482f008df670c15585509bdc8432a7a2b85644a586b10d141be27040a862cc3d0610c356542e77293b554202d6de06ffab0597e8a9fdfba3dde
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/kitchen-ansible.svg)](http://badge.fury.io/rb/kitchen-ansible)
|
4
4
|
[![Gem Downloads](http://ruby-gem-downloads-badge.herokuapp.com/kitchen-ansible?type=total&color=brightgreen)](https://rubygems.org/gems/kitchen-ansible)
|
5
|
+
[![Build Status](https://travis-ci.org/neillturner/kitchen-ansible.png)](https://travis-ci.org/neillturner/kitchen-ansible)
|
5
6
|
|
6
7
|
A Test Kitchen Provisioner for Ansible
|
7
8
|
|
data/kitchen-ansible.gemspec
CHANGED
@@ -5,6 +5,7 @@ require 'kitchen-ansible/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "kitchen-ansible"
|
8
|
+
s.license = "Apache-2.0"
|
8
9
|
s.version = Kitchen::Ansible::VERSION
|
9
10
|
s.authors = ["Neill Turner"]
|
10
11
|
s.email = ["neillwturner@gmail.com"]
|
@@ -26,8 +27,8 @@ Supports running ansible-playbook
|
|
26
27
|
|
27
28
|
EOF
|
28
29
|
s.add_runtime_dependency 'test-kitchen'
|
29
|
-
|
30
|
+
|
30
31
|
s.add_development_dependency 'rspec'
|
31
32
|
s.add_development_dependency 'pry'
|
32
|
-
|
33
|
+
s.add_runtime_dependency 'librarian-ansible'
|
33
34
|
end
|
@@ -66,7 +66,7 @@ module Kitchen
|
|
66
66
|
end
|
67
67
|
|
68
68
|
default_config :additional_copy_path do |provisioner|
|
69
|
-
provisioner.calculate_path('
|
69
|
+
provisioner.calculate_path('additional_copy', :directory)
|
70
70
|
end
|
71
71
|
|
72
72
|
default_config :host_vars_path do |provisioner|
|
@@ -276,7 +276,7 @@ module Kitchen
|
|
276
276
|
prepare_roles
|
277
277
|
prepare_ansible_cfg
|
278
278
|
prepare_group_vars
|
279
|
-
|
279
|
+
prepare_additional_copy_path
|
280
280
|
prepare_host_vars
|
281
281
|
prepare_hosts
|
282
282
|
prepare_filter_plugins
|
@@ -404,7 +404,7 @@ module Kitchen
|
|
404
404
|
config[:group_vars_path].to_s
|
405
405
|
end
|
406
406
|
|
407
|
-
def
|
407
|
+
def additional_copy
|
408
408
|
config[:additional_copy_path]
|
409
409
|
end
|
410
410
|
|
@@ -521,8 +521,8 @@ module Kitchen
|
|
521
521
|
|
522
522
|
roles_paths = []
|
523
523
|
roles_paths << File.join(config[:root_path], 'roles') unless config[:roles_path].nil?
|
524
|
-
|
525
|
-
roles_paths << File.join(config[:root_path], File.basename(
|
524
|
+
additional_files.each do |additional_file|
|
525
|
+
roles_paths << File.join(config[:root_path], File.basename(additional_file))
|
526
526
|
end
|
527
527
|
|
528
528
|
if roles_paths.empty?
|
@@ -576,32 +576,26 @@ module Kitchen
|
|
576
576
|
FileUtils.cp_r(Dir.glob("#{group_vars}/*"), tmp_group_vars_dir)
|
577
577
|
end
|
578
578
|
|
579
|
-
def
|
579
|
+
def prepare_additional_copy_path
|
580
580
|
info('Preparing additional_copy_path')
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
return
|
581
|
+
additional_files.each do |file|
|
582
|
+
destination = File.join(sandbox_path, File.basename(file))
|
583
|
+
if File.directory?(file)
|
584
|
+
info("Copy dir: #{file} #{destination}")
|
585
|
+
FileUtils.cp_r(file, destination)
|
586
|
+
else
|
587
|
+
info("Copy file: #{file} #{destination}")
|
588
|
+
FileUtils.cp file, destination
|
590
589
|
end
|
591
|
-
|
592
|
-
debug("Using additional_copy_path from #{additional_dir}")
|
593
|
-
FileUtils.cp_r(Dir.glob("#{additional_dir}/*"), tmp_addt_dir)
|
594
590
|
end
|
595
591
|
end
|
596
592
|
|
597
|
-
def
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
additional_dirs = addt_dir.kind_of?(Array) ? addt_dir : [addt_dir]
|
593
|
+
def additional_files
|
594
|
+
additional_files = []
|
595
|
+
if ( additional_copy )
|
596
|
+
additional_files = additional_copy.kind_of?(Array) ? additional_copy : [additional_copy]
|
602
597
|
end
|
603
|
-
|
604
|
-
additional_dirs.map { |additional_dir| additional_dir.to_s }
|
598
|
+
additional_files.map { |additional_dir | additional_dir.to_s }
|
605
599
|
end
|
606
600
|
|
607
601
|
def prepare_host_vars
|
data/provisioner_options.md
CHANGED
@@ -16,7 +16,7 @@ roles_path | roles | ansible repo roles directory
|
|
16
16
|
group_vars_path | group_vars | ansible repo group_vars directory
|
17
17
|
host_vars_path | host_vars | ansible repo hosts directory
|
18
18
|
filter_plugins | filter_plugins | ansible repo filter_plugins directory
|
19
|
-
additional_copy_path | | arbitrary array of directories to copy into test environment, relative to CWD. (eg, vars)
|
19
|
+
additional_copy_path | | arbitrary array of files and directories to copy into test environment, relative to CWD. (eg, vars or included playbooks)
|
20
20
|
extra_vars | Hash.new | Hash to set the extra_vars passed to ansibile-playbook command
|
21
21
|
playbook | 'site.yml' | playbook for ansible-playbook to run
|
22
22
|
modules_path | | ansible repo manifests directory
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.16
|
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-05-
|
11
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: librarian-ansible
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: |+
|
56
70
|
== DESCRIPTION:
|
57
71
|
|
@@ -74,7 +88,8 @@ files:
|
|
74
88
|
- lib/kitchen/provisioner/ansible_playbook.rb
|
75
89
|
- provisioner_options.md
|
76
90
|
homepage: https://github.com/neillturner/kitchen-ansible
|
77
|
-
licenses:
|
91
|
+
licenses:
|
92
|
+
- Apache-2.0
|
78
93
|
metadata: {}
|
79
94
|
post_install_message:
|
80
95
|
rdoc_options: []
|