vagrant-puppet-modules 0.0.1 → 0.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2a37d62581542f0b66be73e39d75cc62a64a352
|
4
|
+
data.tar.gz: a85f7f39c6f9d83be0b16b92a31eb544027eb7eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c54e65d5ae2d94c748ed3a48831b02272550b39d4884efba299d9964543d9f49fc54d4d9b7b9cd08dc4140633e849ddb2cdd7a22c832b0dc3e0f653a7e42853f
|
7
|
+
data.tar.gz: c9e6685c3f569421c8d121f6b08fc6e080fd5e808bc6d08960032e271542ee702f5467369b4467cd7e5ac627ff2e2e4506aec699e23636dd75d5478cce0bd80d
|
@@ -17,13 +17,14 @@ module VagrantPlugins
|
|
17
17
|
@machine.config.puppet_modules.validate!
|
18
18
|
|
19
19
|
desired_version = @machine.config.puppet_modules.librarian_version
|
20
|
-
if desired_version.nil?
|
21
|
-
env[:ui].info "Librarian-puppet is
|
22
|
-
|
20
|
+
if desired_version.nil?
|
21
|
+
env[:ui].info "Librarian-puppet is not required, skipping installation..."
|
22
|
+
elsif installed_version == desired_version
|
23
|
+
env[:ui].info "Librarian-puppet is already installed at version #{desired_version}"
|
24
|
+
else
|
25
|
+
fetch_or_create_install_script(env)
|
26
|
+
install(desired_version, env)
|
23
27
|
end
|
24
|
-
|
25
|
-
fetch_or_create_install_script(env)
|
26
|
-
install(desired_version, env)
|
27
28
|
end
|
28
29
|
|
29
30
|
@app.call(env)
|
@@ -46,12 +47,12 @@ module VagrantPlugins
|
|
46
47
|
if windows_guest?
|
47
48
|
# todo
|
48
49
|
else
|
49
|
-
command = 'echo $(librarian-puppet
|
50
|
+
command = 'echo $(librarian-puppet version)'
|
50
51
|
end
|
51
52
|
|
52
53
|
@machine.communicate.sudo(command, opts) do |type, data|
|
53
54
|
if [:stderr, :stdout].include?(type)
|
54
|
-
version_match = data.match(
|
55
|
+
version_match = data.match(/v(.+)$/)
|
55
56
|
version = version_match.captures[0].strip if version_match
|
56
57
|
end
|
57
58
|
end
|
@@ -16,6 +16,7 @@ InstallLibrarianPuppet () {
|
|
16
16
|
echo 'Attempting to install librarian-puppet'
|
17
17
|
|
18
18
|
gem install librarian-puppet --version "$version"
|
19
|
+
gem uninstall librarian-puppet -v ">$version" --force
|
19
20
|
|
20
21
|
if [ "$?" -ne '0' ]; then
|
21
22
|
echo 'Failed to install librarian-puppet'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-puppet-modules
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anis Safine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|