kitchen-ansible 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Kitchen
2
2
  module Ansible
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -45,7 +45,7 @@ module Kitchen
45
45
 
46
46
  def resolve
47
47
  version = ::Librarian::Ansible::VERSION
48
- info("Resolving module dependencies with Librarian-Ansible #{version}...")
48
+ info("Resolving role dependencies with Librarian-Ansible #{version}...")
49
49
  debug("Using Ansiblefile from #{ansiblefile}")
50
50
 
51
51
  env = ::Librarian::Ansible::Environment.new(
@@ -398,7 +398,9 @@ module Kitchen
398
398
  def prepare_roles
399
399
  info('Preparing roles')
400
400
  debug("Using roles from #{roles}")
401
-
401
+
402
+ resolve_with_librarian if File.exists?(ansiblefile)
403
+
402
404
  # Detect whether we are running tests on a role
403
405
  # If so, make sure to copy into VM so dir structure is like: /tmp/kitchen/roles/role_name
404
406
 
@@ -417,9 +419,9 @@ module Kitchen
417
419
  file.write("#no roles path specified\n")
418
420
  end
419
421
  else
420
- debug("Setting roles_path inside VM to #{File.join(config[:root_path], 'roles', role_name)}")
422
+ debug("Setting roles_path inside VM to #{File.join(config[:root_path], 'roles')}")
421
423
  File.open( ansible_config_file, "wb") do |file|
422
- file.write("[defaults]\nroles_path = #{File.join(config[:root_path], 'roles', role_name)}\n")
424
+ file.write("[defaults]\nroles_path = #{File.join(config[:root_path], 'roles')}\n")
423
425
  end
424
426
  end
425
427
  end
@@ -486,14 +488,11 @@ module Kitchen
486
488
  else
487
489
  info 'nothing to do for modules'
488
490
  end
489
-
490
- resolve_with_librarian if File.exists?(ansiblefile)
491
-
492
491
  end
493
492
 
494
493
  def resolve_with_librarian
495
494
  Kitchen.mutex.synchronize do
496
- Ansible::Librarian.new(ansiblefile, tmp_modules_dir, logger).resolve
495
+ Ansible::Librarian.new(ansiblefile, tmp_roles_dir, logger).resolve
497
496
  end
498
497
  end
499
498
  end
@@ -21,7 +21,7 @@ ansible_verbose| false| Extra information logging
21
21
  ansible_verbosity| 1| Sets the verbosity flag appropriately (e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv" ...`) Valid values are one of: `1, 2, 3, 4` OR `:info, :warn, :debug, :trace`.
22
22
  update_package_repos| true| update OS repository metadata
23
23
  chef_bootstrap_url |"https://www.getchef.com/chef/install.sh"| the chef (needed for busser to run tests)
24
- ansiblefile_path | | Path to Aansiblefile
24
+ ansiblefile_path | | Path to Ansiblefile
25
25
 
26
26
  ## Configuring Provisioner Options
27
27
 
@@ -60,7 +60,7 @@ To override a setting at the suite-level, specify the setting name under the sui
60
60
 
61
61
  ### Per-suite Structure
62
62
 
63
- It can be beneficial to keep different Aansible layouts for different suites. Rather than having to specify the roles, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
63
+ It can be beneficial to keep different Ansible layouts for different suites. Rather than having to specify the roles, modules, etc for each suite, you can create the following directory structure and they will automatically be found:
64
64
 
65
65
  $kitchen_root/ansible/$suite_name/roles
66
66
  $kitchen_root/ansible/$suite_name/modules
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-06 00:00:00.000000000 Z
12
+ date: 2014-12-03 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! '== DESCRIPTION:
15
15