vagrant-guests-photon 1.0.3 → 1.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5661eae2e1ac8a7dba4c1cdf1d0f1b96dc971b1b
|
4
|
+
data.tar.gz: 3c5d6b704433efc4d77060522597fce9d19826e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54045005398f6386f6edbee97c278155b357ca7e75a2e4d28c67315817ba2fe6ab68e8ebefb83efa13f97b872a65b73f0366dd113ef4783095cfa3cd4f87ab4b
|
7
|
+
data.tar.gz: f9a93e899d7947e43a918c5983fe54f44e0ca7ab3c421620e39eb4b8e811d024877f0fa71b9777ecd6c00d1b05c78064743e3c65eff2ec0208d6f451101cbf96
|
data/.travis.yml
CHANGED
@@ -7,8 +7,10 @@ module VagrantPlugins
|
|
7
7
|
class ChangeHostName
|
8
8
|
def self.change_host_name(machine, name)
|
9
9
|
machine.communicate.tap do |comm|
|
10
|
-
unless comm.test("
|
11
|
-
comm.sudo("
|
10
|
+
unless comm.test("hostnamectl --static | grep '#{name}'")
|
11
|
+
comm.sudo("rm /etc/machine-id")
|
12
|
+
comm.sudo("systemd-machine-id-setup")
|
13
|
+
comm.sudo("hostnamectl set-hostname #{name.split('.')[0]}")
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -9,8 +9,10 @@ describe VagrantPlugins::GuestPhoton::Cap::ChangeHostName do
|
|
9
9
|
|
10
10
|
it 'should change hostname when hostname is differ from current' do
|
11
11
|
hostname = 'vagrant-photon'
|
12
|
-
expect(communicate).to receive(:test).with("
|
13
|
-
communicate.should_receive(:sudo).with("
|
12
|
+
expect(communicate).to receive(:test).with("hostnamectl --static | grep 'vagrant-photon'")
|
13
|
+
communicate.should_receive(:sudo).with("rm /etc/machine-id")
|
14
|
+
communicate.should_receive(:sudo).with("systemd-machine-id-setup")
|
15
|
+
communicate.should_receive(:sudo).with("hostnamectl set-hostname #{hostname.split('.')[0]}")
|
14
16
|
described_class.change_host_name(machine, hostname)
|
15
17
|
end
|
16
18
|
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
|
|
14
14
|
s.summary = 'VMware Photon Guest Plugin for Vagrant'
|
15
15
|
s.description = 'Enables Vagrant to manage VMware Photon machines.'
|
16
16
|
|
17
|
-
s.add_development_dependency 'bundler'
|
17
|
+
s.add_development_dependency 'bundler'
|
18
18
|
s.add_development_dependency 'rake'
|
19
19
|
s.add_development_dependency 'rspec-core', '~> 2.14'
|
20
20
|
s.add_development_dependency 'rspec-expectations', '~> 2.14'
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-guests-photon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Rapposelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|