kitchen-ansible 0.48.0 → 0.48.1

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: 3000b4a33dd946e4d64314ffad1c930373e1217f
4
- data.tar.gz: 9f819154af5b31230a5a086072b3d7a80d8846ad
3
+ metadata.gz: 32dc95faa58ee424c8b2df63d2d5ab36ef98193a
4
+ data.tar.gz: a3a9d816d8b8e3cfe35b583865f1dd1213adad8c
5
5
  SHA512:
6
- metadata.gz: 5b51e9f86170bb3e3eeb0522e27381b8335a851666243267fee6cbe72154bb5829d3ea7fb7d0522d80004bee8e18528c4711b666364f4093e4caca1b236439a1
7
- data.tar.gz: 4fdec37b3da4fd7db358800bcaf31bb0af5817865ace15e476e950cc6b811db714c4b8bbbe59912fb6402160e9618ad29d8dfdf2c7a6a43b4a6194a4638074ae
6
+ metadata.gz: 30defbb48539f3b7581d554567a3dccfc703978f8aff7643326a2553d612be5a825e74ae468e277eb51130754b18ddc6d790779015b7ba1f3a537133025e8519
7
+ data.tar.gz: d61220f1fef0af00d92d464774cf7f5e310a9978144ac265d012bb5ec7d9fb06ec1a4d2997e42ae4375ac9d9bfebed0797d4d1ace1933397bebd081a85f47c27
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.48.0'.freeze
4
+ VERSION = '0.48.1'.freeze
5
5
  end
6
6
  end
@@ -41,7 +41,8 @@ module Kitchen
41
41
  #{update_packages_command}
42
42
 
43
43
  ## Install apt-utils to silence debconf warning: http://serverfault.com/q/358943/77156
44
- #{sudo_env('apt-get')} -y install apt-utils git
44
+ ## Install dirmngr to handle GPG key management for stretch, addressing https://github.com/neillturner/kitchen-ansible/issues/257
45
+ #{sudo_env('apt-get')} -y install apt-utils git dirmngr
45
46
 
46
47
  ## Fix debconf tty warning messages
47
48
  export DEBIAN_FRONTEND=noninteractive
@@ -343,7 +343,7 @@ module Kitchen
343
343
  if ansible_inventory
344
344
  if File.directory?(ansible_inventory)
345
345
  Dir.foreach(ansible_inventory) do |f|
346
- next if f == "." or f == ".."
346
+ next if File.directory?("#{ansible_inventory}/#{f}")
347
347
  contents = File.open("#{ansible_inventory}/#{f}", 'rb') { |g| g.read }
348
348
  if contents.start_with?('#!')
349
349
  commands << [
@@ -598,8 +598,8 @@ module Kitchen
598
598
  File.join(sandbox_path, 'ssh_private_keys')
599
599
  end
600
600
 
601
- def tmp_ansible_vault_password_file_path
602
- File.join(sandbox_path, File.basename(ansible_vault_password_file).reverse.chomp('.').reverse)
601
+ def tmp_ansible_vault_password_file_path(f)
602
+ File.join(sandbox_path, File.basename(f).reverse.chomp('.').reverse)
603
603
  end
604
604
 
605
605
  def tmp_kerberos_conf_file_path
@@ -690,7 +690,11 @@ module Kitchen
690
690
  end
691
691
 
692
692
  def ansible_vault_password_file
693
- config[:ansible_vault_password_file]
693
+ password_files = []
694
+ if config[:ansible_vault_password_file]
695
+ password_files = config[:ansible_vault_password_file].is_a?(Array) ? config[:ansible_vault_password_file] : [config[:ansible_vault_password_file]]
696
+ end
697
+ password_files.map(&:to_s)
694
698
  end
695
699
 
696
700
  def ansible_inventory
@@ -726,7 +730,15 @@ module Kitchen
726
730
 
727
731
  def ansible_vault_flag
728
732
  debug(config[:ansible_vault_password_file])
729
- config[:ansible_vault_password_file] ? "--vault-password-file=#{File.join(config[:root_path], File.basename(config[:ansible_vault_password_file]).reverse.chomp('.').reverse)}" : nil
733
+ return nil if not ansible_vault_password_file
734
+
735
+ files = []
736
+
737
+ ansible_vault_password_file.each do |f|
738
+ files << "--vault-password-file=#{File.join(config[:root_path], File.basename(f).reverse.chomp('.').reverse)}"
739
+ end
740
+
741
+ files.join(' ')
730
742
  end
731
743
 
732
744
  def ansible_inventory_flag
@@ -1169,9 +1181,11 @@ module Kitchen
1169
1181
  return unless ansible_vault_password_file
1170
1182
 
1171
1183
  info('Preparing ansible vault password')
1172
- debug("Copying ansible vault password file from #{ansible_vault_password_file} to #{tmp_ansible_vault_password_file_path}")
1184
+ ansible_vault_password_file.each do |f|
1185
+ debug("Copying ansible vault password file from #{f} to #{tmp_ansible_vault_password_file_path(f)}")
1173
1186
 
1174
- FileUtils.cp(File.expand_path(ansible_vault_password_file), tmp_ansible_vault_password_file_path)
1187
+ FileUtils.cp(File.expand_path(f), tmp_ansible_vault_password_file_path(f))
1188
+ end
1175
1189
  end
1176
1190
 
1177
1191
  def prepare_kerberos_conf_file
@@ -50,7 +50,7 @@ ansible_sles_repo | `http://download.opensuse.org/repositories` `/systemsmanagem
50
50
  ansible_source_url | `git://github.com/ansible/ansible.git` | Git URL of Ansible source
51
51
  ansible_source_rev | | Branch or tag to install Ansible source
52
52
  ansible_sudo | true | Determines whether `ansible-playbook` is executed as root or as the current authenticated user
53
- ansible_vault_password_file | | Path to Ansible Vault password file
53
+ ansible_vault_password_file | | Path to Ansible Vault password file. Can also be an array of files.
54
54
  ansible_verbose | false | Extra information logging
55
55
  ansible_verbosity | 1 | Sets the verbosity flag appropriately, e.g.: `1 => '-v', 2 => '-vv', 3 => '-vvv' ...`. Valid values are: `1, 2, 3, 4` or `:info, :warn, :debug, :trace`
56
56
  ansible_version | latest | Desired version, only affects `apt-get` installs
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.48.0
4
+ version: 0.48.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Neill Turner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-08 00:00:00.000000000 Z
11
+ date: 2017-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec