kitchen-ansible 0.44.5 → 0.44.6

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: a2ae94568dfbde9ddc1ffc0842ab25d29e89f5bd
4
- data.tar.gz: 5fab05dd26b8e44e49ffd5e1aff8f82a6ddaa3c1
3
+ metadata.gz: 7fbf1e47a7ca285b3ae2dba5f2ae82a112a6f9de
4
+ data.tar.gz: e0f3f3fd2e1736f45c0ab0735946db1d61f03350
5
5
  SHA512:
6
- metadata.gz: 00196e338c949de05e2cbc065247f13ecda8f6d17f77764b18a8b313c8ff485be876cdf6154c7d01e6fa0bf4c3e72589193ad9bf2155de570a07e0eba5184bbf
7
- data.tar.gz: e31a591ba021a2474458627f0ff5039818207fcb0e28db2b10df30385b332652c0eccb20113001557009fddb991456d0da37134cdf3b60247931e7f27862e3c3
6
+ metadata.gz: aa72291e7fae7d2e2910344e4b1d08cd08a32c3c9bc31df1e25b03b3a0b094a776c7dca030e2f6560d439a51e44dadf77df1971aa20bd9710c6060fd46afcabe
7
+ data.tar.gz: be14119c1cc4a5f36cb91a3d2dc005c87df77446440aac3eb6f4e2f731bf9ff8469f1665b6f018dff10c0e238e99d34b98c8d1c7907586a958bea5ae14a32a48
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.44.5'
4
+ VERSION = '0.44.6'
5
5
  end
6
6
  end
@@ -93,6 +93,10 @@ module Kitchen
93
93
  provisioner.calculate_path('additional_copy', :directory)
94
94
  end
95
95
 
96
+ default_config :recursive_additional_copy_path do |provisioner|
97
+ provisioner.calculate_path('recursive_additional_copy', :directory)
98
+ end
99
+
96
100
  default_config :host_vars_path do |provisioner|
97
101
  provisioner.calculate_path('host_vars', :directory)
98
102
  end
@@ -592,6 +592,10 @@ module Kitchen
592
592
  config[:additional_copy_path]
593
593
  end
594
594
 
595
+ def recursive_additional_copy
596
+ config[:recursive_additional_copy_path]
597
+ end
598
+
595
599
  def host_vars
596
600
  config[:host_vars_path].to_s
597
601
  end
@@ -904,7 +908,18 @@ module Kitchen
904
908
  def prepare_additional_copy_path
905
909
  info('Preparing additional_copy_path')
906
910
  additional_files.each do |file|
907
- info("Copy additional path: #{file}")
911
+ destination = File.join(sandbox_path, File.basename(file))
912
+ if File.directory?(file)
913
+ info("Copy dir: #{file} #{destination}")
914
+ Find.prune if config[:ignore_paths_from_root].include? File.basename(file)
915
+ FileUtils.mkdir_p(destination)
916
+ else
917
+ info("Copy file: #{file} #{destination}")
918
+ FileUtils.cp(file, destination)
919
+ end
920
+ end
921
+ recursive_additional_files.each do |file|
922
+ info("Copy recursive additional path: #{file}")
908
923
  Find.find(file) do |files|
909
924
  destination = File.join(sandbox_path, files)
910
925
  Find.prune if config[:ignore_paths_from_root].include? File.basename(files)
@@ -925,6 +940,14 @@ module Kitchen
925
940
  additional_files.map(&:to_s)
926
941
  end
927
942
 
943
+ def recursive_additional_files
944
+ recursive_additional_files = []
945
+ if recursive_additional_copy
946
+ recursive_additional_files = recursive_additional_copy.is_a?(Array) ? recursive_additional_copy : [recursive_additional_copy]
947
+ end
948
+ recursive_additional_files.map(&:to_s)
949
+ end
950
+
928
951
  def prepare_host_vars
929
952
  info('Preparing host_vars')
930
953
  FileUtils.mkdir_p(tmp_host_vars_dir)
@@ -1,6 +1,28 @@
1
+ # Ansible Install Options
2
+
3
+ Kitchen-ansible is very flexible in how it installs ansible:
4
+
5
+ It installs it in the following order:
6
+
7
+ * if require_ansible_omnibus is set to true
8
+
9
+ Installs using the omnibus_ansible script specified in the ansible_omnibus_url parameter and passes the ansible_version if specied as -v option.
10
+
11
+ * If require_ansible_source is set to true
12
+
13
+ Install require packages and download the ansible source from github from master or from a branch specified in the parameter install_source_rev.
14
+
15
+ * if require_pip is set to true
16
+
17
+ Install require packages and then installs ansible using the python pip command with ansible version if specified.
18
+
19
+ * if require_ansible_repo is set to true (the default)
20
+
21
+ Installs from the operation system repository with the ansible version that is in the particular repository and will use the ansible_version in the package name where appropriate.
22
+
1
23
  # Provisioner Options
2
24
 
3
- kitchen-ansible runs the ansible playbook command http://linux.die.net/man/1/ansible-playbook with options from parameters in the kitchen.yml file:
25
+ kitchen-ansible runs the ansible playbook command http://linux.die.net/man/1/ansible-playbook with options from parameters in the kitchen.yml file:
4
26
 
5
27
  key | default value | Notes
6
28
  ----|---------------|--------
@@ -47,6 +69,7 @@ no_proxy | nil | List of URLs or IPs that should be excluded from proxying
47
69
  playbook | default.yml | Playbook for `ansible-playbook` to run
48
70
  private_key | | ssh private key file for ssh connection
49
71
  python_sles_repo | `http://download.opensuse.org/repositories` `/devel:/languages:/python/SLE_12` `/devel:languages:python.repo` | Zypper SuSE python repo
72
+ recursive_additional_copy_path | | Arbitrary array of files and directories to copy into test environment, relative to the current dir, e.g. vars or included playbooks
50
73
  require_ansible_omnibus | false | Set to `true` if using Omnibus Ansible `pip` install
51
74
  require_ansible_repo | true | Set if installing Ansible from a `yum` or `apt` repo
52
75
  require_ansible_source | false | Install Ansible from source using method described [here](http://docs.ansible.com/intro_installation.html#running-from-source). Only works on Debian/Ubuntu at present
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.44.5
4
+ version: 0.44.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen