kitchen-ansible 0.42.3 → 0.42.4

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: 1097e78ea015107c0863b990d0e7a6c60c67c187
4
- data.tar.gz: 28159f60e0fc9aa42aa0118758f5cf56964d8956
3
+ metadata.gz: f073a5b00c60f49fedb6a1be8b99afe72ddac33e
4
+ data.tar.gz: afc9f3c3879cdffcce90a8eb0dcb20dbcbcb6a1a
5
5
  SHA512:
6
- metadata.gz: e7fffb3537d7511e73a2a1bafa80268a9c1b641ede2a2975268b6927506edd27966f9d827fdbc2edcaa2d418d4c2e33d9c041c5ef4dcaabd1d679aadd159ec0a
7
- data.tar.gz: 2b4fc0c47c554ae9b94c4ba01ae86271713180a10eaa23014bcfcc6fc1b75ce772d22ec6cea8d46e8c57d9bb28ac86de8524a9bc8697603da22f9bbafa7974b7
6
+ metadata.gz: 6e630a787dbf900fa5b97792c3b4621da06516b78f71845ada2e60cedb5fe06e2a9739e4ceba632d969678ee07bb48b2785a31a56d62765cbce7f22f3f8e8b97
7
+ data.tar.gz: 6fd08f662dda82a65e8db694a7c5be68aa1378cfbc6c6ec5ea94bb3cd00107aca5ddaaf967ede5b108ae8138e59f3d7a95753af261e5d88d4275edfa0912fce6
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  module Kitchen
3
3
  module Ansible
4
- VERSION = '0.42.3'
4
+ VERSION = '0.42.4'
5
5
  end
6
6
  end
@@ -384,7 +384,7 @@ module Kitchen
384
384
  s = https_proxy ? "https_proxy=#{https_proxy}" : nil
385
385
  p = http_proxy ? "http_proxy=#{http_proxy}" : nil
386
386
  n = no_proxy ? "no_proxy=#{no_proxy}" : nil
387
- p || s || n ? " #{p} #{s} #{n} sudo -Es #{cd_ansible} #{script}" : "sudo -Es #{cd_ansible} #{script}"
387
+ p || s || n ? " #{p} #{s} #{n} #{config[:sudo_command]} -s #{cd_ansible} #{script}" : "#{config[:sudo_command]} -s #{cd_ansible} #{script}"
388
388
  else
389
389
  return script
390
390
  end
@@ -534,7 +534,13 @@ module Kitchen
534
534
  end
535
535
 
536
536
  def role_name
537
- File.basename(roles) == 'roles' ? '' : File.basename(roles)
537
+ if config[:role_name]
538
+ config[:role_name]
539
+ elsif File.basename(roles) == 'roles'
540
+ ''
541
+ else
542
+ File.basename(roles)
543
+ end
538
544
  end
539
545
 
540
546
  def modules
@@ -731,11 +737,15 @@ module Kitchen
731
737
  config[:no_proxy]
732
738
  end
733
739
 
734
- def sudo_env(pm)
740
+ def sudo_env(pm,home=false)
735
741
  s = https_proxy ? "https_proxy=#{https_proxy}" : nil
736
742
  p = http_proxy ? "http_proxy=#{http_proxy}" : nil
737
743
  n = no_proxy ? "no_proxy=#{no_proxy}" : nil
738
- p || s || n ? "#{sudo('env')} #{p} #{s} #{n} #{pm}" : "#{sudo(pm)}"
744
+ if home
745
+ p || s || n ? "#{sudo_home('env')} #{p} #{s} #{n} #{pm}" : "#{sudo_home(pm)}"
746
+ else
747
+ p || s || n ? "#{sudo('env')} #{p} #{s} #{n} #{pm}" : "#{sudo(pm)}"
748
+ end
739
749
  end
740
750
 
741
751
  def export_http_proxy
@@ -5,6 +5,7 @@ key | default value | Notes
5
5
  ----|---------------|--------
6
6
  ansible_version | "latest"| desired version, affects apt installs
7
7
  ansible_sudo | true | drives whether ansible-playbook is executed as root or as the current authenticated user
8
+ sudo_command | sudo -E | sudo command change to 'sudo -E -H' to be consistent with ansible
8
9
  ansible_platform | naively tries to determine | OS platform of server
9
10
  require_ansible_repo | true | Set if using a ansible install from yum or apt repo
10
11
  ansible_apt_repo | "ppa:ansible/ansible" | apt repo. see https://launchpad.net /~ansible/+archive/ubuntu/ansible or rquillo/ansible
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.42.3
4
+ version: 0.42.4
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-05-08 00:00:00.000000000 Z
11
+ date: 2016-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen