kitchen-ansible 0.0.7 → 0.0.8
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.
|
@@ -65,6 +65,10 @@ module Kitchen
|
|
|
65
65
|
provisioner.calculate_path('group_vars', :directory)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
default_config :additional_copy_path do |provisioner|
|
|
69
|
+
provisioner.calculate_path('addt_dir', :directory)
|
|
70
|
+
end
|
|
71
|
+
|
|
68
72
|
default_config :host_vars_path do |provisioner|
|
|
69
73
|
provisioner.calculate_path('host_vars', :directory)
|
|
70
74
|
end
|
|
@@ -263,6 +267,7 @@ module Kitchen
|
|
|
263
267
|
prepare_roles
|
|
264
268
|
prepare_ansible_cfg
|
|
265
269
|
prepare_group_vars
|
|
270
|
+
prepare_addt_dir
|
|
266
271
|
prepare_host_vars
|
|
267
272
|
prepare_hosts
|
|
268
273
|
info('Finished Preparing files for transfer')
|
|
@@ -372,6 +377,10 @@ module Kitchen
|
|
|
372
377
|
config[:group_vars_path].to_s
|
|
373
378
|
end
|
|
374
379
|
|
|
380
|
+
def addt_dir
|
|
381
|
+
config[:additional_copy_path].to_s
|
|
382
|
+
end
|
|
383
|
+
|
|
375
384
|
def host_vars
|
|
376
385
|
config[:host_vars_path].to_s
|
|
377
386
|
end
|
|
@@ -516,6 +525,20 @@ module Kitchen
|
|
|
516
525
|
FileUtils.cp_r(Dir.glob("#{group_vars}/*"), tmp_group_vars_dir)
|
|
517
526
|
end
|
|
518
527
|
|
|
528
|
+
def prepare_addt_dir
|
|
529
|
+
info('Preparing additional_copy_path')
|
|
530
|
+
tmp_addt_dir = File.join(sandbox_path, File.basename(addt_dir))
|
|
531
|
+
FileUtils.mkdir_p(tmp_addt_dir)
|
|
532
|
+
|
|
533
|
+
unless File.directory?(addt_dir)
|
|
534
|
+
info 'nothing to do for additional_copy_path'
|
|
535
|
+
return
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
debug("Using additional_copy_path from #{addt_dir}")
|
|
539
|
+
FileUtils.cp_r(Dir.glob("#{addt_dir}/*"), tmp_addt_dir)
|
|
540
|
+
end
|
|
541
|
+
|
|
519
542
|
def prepare_host_vars
|
|
520
543
|
info('Preparing host_vars')
|
|
521
544
|
FileUtils.mkdir_p(tmp_host_vars_dir)
|
data/provisioner_options.md
CHANGED
|
@@ -14,6 +14,7 @@ ansible_omnibus_remote_path | "/opt/ansible" | Server Installation location of a
|
|
|
14
14
|
roles_path | roles | ansible repo roles directory
|
|
15
15
|
group_vars_path | group_vars | ansible repo group_vars directory
|
|
16
16
|
host_vars_path | host_vars | ansible repo hosts directory
|
|
17
|
+
additional_copy_path | | arbitrary directory to copy into test environment, relative to CWD. (eg, vars)
|
|
17
18
|
extra_vars | Hash.new | Hash to set the extra_vars passed to ansibile-playbook command
|
|
18
19
|
playbook | 'site.yml' | playbook for ansible-playbook to run
|
|
19
20
|
modules_path | | ansible repo manifests directory
|