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 +4 -4
- data/lib/kitchen-ansible/version.rb +1 -1
- data/lib/kitchen/provisioner/ansible_playbook.rb +14 -4
- data/provisioner_options.md +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f073a5b00c60f49fedb6a1be8b99afe72ddac33e
|
4
|
+
data.tar.gz: afc9f3c3879cdffcce90a8eb0dcb20dbcbcb6a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e630a787dbf900fa5b97792c3b4621da06516b78f71845ada2e60cedb5fe06e2a9739e4ceba632d969678ee07bb48b2785a31a56d62765cbce7f22f3f8e8b97
|
7
|
+
data.tar.gz: 6fd08f662dda82a65e8db694a7c5be68aa1378cfbc6c6ec5ea94bb3cd00107aca5ddaaf967ede5b108ae8138e59f3d7a95753af261e5d88d4275edfa0912fce6
|
@@ -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}
|
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
|
-
|
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
|
-
|
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
|
data/provisioner_options.md
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-kitchen
|