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: f08d06cb07b8db0c91b7e09c02c456eab49f0ee6
4
- data.tar.gz: 138bc11bc88f938f2c8441e800c0680539a6fde6
3
+ metadata.gz: 6b4d280df66920431cf01969f165457c8e884fc2
4
+ data.tar.gz: a9a62abb6f496d3d862f0a30776f4642ed739822
5
5
  SHA512:
6
- metadata.gz: f54b626becfd89c1cf4a1a62a5fda490b896dd1dde6badf61a7213ba42b5fd9d55f5e6ff3a562661a5115e4c10aff7fd4d91d34b0e50ca83ee3d83d76e260c46
7
- data.tar.gz: ced7c72e09d801abe19d4066572b446130e6def6abacff9b68b46928af4bb35dc585272b8dcbae01f9f624525e8d9fb8d72c2cc9ad44fd82ecbbdd587452cc73
6
+ metadata.gz: e2c4d149b73a3959c182003b11cf28414f05f3fdad19d92d46876cbcf161142ae05b14a2dc5f5a2486995fc6dc73759a0dd7ed4a553dc82331aa6512acf62990
7
+ data.tar.gz: eda4854cba439e31bbbe4c6bdb388088343ca62970950123e0843e2ed1a87d31b469cffd4a36750f46c6bd7bca7c7fc09a7c396b86fdaa8a29a3098232f1e86d
@@ -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'
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Ansible
3
- VERSION = "0.0.32"
3
+ VERSION = "0.0.33"
4
4
  end
5
5
  end
@@ -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[:require_ansible_source]
280
- # this is an ugly hack to get around the fact that extra vars uses ' and "
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
- cmd = ansible_command("ansible-playbook")
284
- end
285
- if config[:ansible_binary_path]
286
- cmd = ansible_command("#{config[:ansible_binary_path]}/ansible-playbook")
287
- end
288
- if https_proxy
289
- cmd = "HTTPS_PROXY=#{https_proxy} #{cmd}"
290
- end
291
- if http_proxy
292
- cmd = "HTTP_PROXY=#{http_proxy} #{cmd}"
293
- end
294
- if ansible_roles_path
295
- cmd = "ANSIBLE_ROLES_PATH=#{ansible_roles_path} #{cmd}"
296
- end
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
- result = [
299
- cmd,
300
- ansible_inventory_flag,
301
- "-c #{config[:ansible_connection]}",
302
- "-M #{File.join(config[:root_path], 'modules')}",
303
- ansible_verbose_flag,
304
- ansible_check_flag,
305
- ansible_diff_flag,
306
- ansible_vault_flag,
307
- extra_vars,
308
- tags,
309
- ansible_extra_flags,
310
- "#{File.join(config[:root_path], File.basename(config[:playbook]))}",
311
- ].join(" ")
312
- info("Going to invoke ansible-playbook with: #{result}")
313
- result
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?
@@ -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.32
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-24 00:00:00.000000000 Z
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: '0'
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: '0'
26
+ version: '1.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement