kitchen-ansible 0.41.0 → 0.42.0

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: c49ee3c2a66571122b0b5f9f9a275ee76ac531ec
4
- data.tar.gz: 538a482c315ee52137a0967099d4aaebcbb0231f
3
+ metadata.gz: fd9aedef2a0fd3fe1680cc80cdf1b81405fc9e99
4
+ data.tar.gz: f33efab9c29b88338a1ca92abb679340c30dd2cf
5
5
  SHA512:
6
- metadata.gz: 99fbcd27f38933982f2178cb5fd180db04cedd3b037156b2b53fa3f654f6e291a604e1a61ada3983ca36fa7ffd1b61ae087b0d4fc3c19d54c1257e5cfb84dd5a
7
- data.tar.gz: 40da82b0882a67494a6c2c51a7d365fe0a5767a0f10620371d7a311043ffaad371708769ad91016befcf845ee6e7df3de3ab7a999881bf1ff9c0db9544764b9b
6
+ metadata.gz: a96346256bd6987adc18d078160ff241d41516c7b3e670c100c918fb4b52773cfbd3d876e023b20a85dcfe72c4f510b1abe1912b593d9785a0959301702b8cd1
7
+ data.tar.gz: 5b3a32a7573408c9375cbcb00895dcc490afa77c663cf6af0cda6cf0150e835c00891ea578886b3d202b5062a61ffed2af017975b956ecb3f0acc56cb945de87
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.41.0'
4
+ VERSION = '0.42.0'
5
5
  end
6
6
  end
@@ -82,7 +82,7 @@ module Kitchen
82
82
 
83
83
  if [ ! $(which ansible) ]; then
84
84
  if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
85
- if ! [ grep -q 'Amazon Linux' /etc/system-release ]; then
85
+ if ! [ -z `grep -q 'Amazon Linux' /etc/system-release` ]; then
86
86
  #{Kitchen::Provisioner::Ansible::Os::Redhat.new('redhat', config).install_command}
87
87
  else
88
88
  #{Kitchen::Provisioner::Ansible::Os::Amazon.new('amazon', config).install_command}
@@ -140,7 +140,7 @@ module Kitchen
140
140
  if require_ruby_for_busser
141
141
  install << <<-INSTALL
142
142
  if [ -f /etc/centos-release ] || [ -f /etc/redhat-release ]; then
143
- if ! [ grep -q 'Amazon Linux' /etc/system-release ]; then
143
+ if ! [ -z `grep -q 'Amazon Linux' /etc/system-release` ]; then
144
144
  rhelversion6=$(cat /etc/redhat-release | grep 'release 6')
145
145
  rhelversion7=$(cat /etc/redhat-release | grep 'release 7')
146
146
  # For CentOS6/CentOS7/RHEL6/RHEL7 install ruby from SCL
@@ -188,7 +188,7 @@ module Kitchen
188
188
  ubuntuvers=$(lsb_release -sr | tr -d .)
189
189
  if [ $ubuntuvers -ge 1410 ]; then
190
190
  # Default ruby is 2.x in utopic and newer
191
- PACKAGES="ruby ruby-dev ruby2.1 ruby2.1-dev"
191
+ PACKAGES="ruby ruby-dev"
192
192
  fi
193
193
  fi
194
194
  #{sudo_env('apt-get')} -y install $PACKAGES
@@ -315,11 +315,7 @@ module Kitchen
315
315
  if config[:require_ansible_source]
316
316
  commands << setup_ansible_env_from_source
317
317
  end
318
- commands << [
319
- 'ansible-galaxy', 'install', '--force',
320
- '-p', File.join(config[:root_path], 'roles'),
321
- '-r', File.join(config[:root_path], galaxy_requirements)
322
- ].join(' ')
318
+ commands << ansible_galaxy_command
323
319
  end
324
320
 
325
321
  if kerberos_conf_file
@@ -394,6 +390,18 @@ module Kitchen
394
390
  end
395
391
  end
396
392
 
393
+ def ansible_galaxy_command
394
+ cmd = [
395
+ 'ansible-galaxy', 'install', '--force',
396
+ '-p', File.join(config[:root_path], 'roles'),
397
+ '-r', File.join(config[:root_path], galaxy_requirements)
398
+ ].join(' ')
399
+ cmd = "https_proxy=#{https_proxy} #{cmd}" if https_proxy
400
+ cmd = "http_proxy=#{http_proxy} #{cmd}" if http_proxy
401
+ cmd = "no_proxy=#{no_proxy} #{cmd}" if no_proxy
402
+ cmd
403
+ end
404
+
397
405
  def cd_ansible
398
406
  # this is not working so just return nil for now
399
407
  # File.exist?('ansible.cfg') ? "cd #{config[:root_path]};" : nil
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.41.0
4
+ version: 0.42.0
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-04-21 00:00:00.000000000 Z
11
+ date: 2016-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen