vagrant-aws-extras 0.0.1.rc2 → 0.0.1.rc4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/vagrant-aws-extras/action/dns.rb +10 -0
- data/lib/vagrant-aws-extras/action.rb +18 -10
- data/lib/vagrant-aws-extras/config.rb +3 -1
- data/lib/vagrant-aws-extras/version.rb +1 -1
- 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: deb61529dad89d1898388941137fe0bf26d62690
|
4
|
+
data.tar.gz: a94af23b0e09d8ea83d03459966729e3adde6f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bf382a894fa6dcefe4102fd1ea3e54004ef59c2590ed9b56f8f3badc374010489366d887e98b7a494a08c45971a62c75c45883604625c73790748ea33ce8823
|
7
|
+
data.tar.gz: 2fbdc2a3e6d8fdef0bcab89a158820fb7fca2918d1317c4d9c81627cf3fd5436a9db448e0245bc22071a54533297f9c0ff00beb66c3f9c8a9b012f80280522fd
|
data/Gemfile
CHANGED
@@ -7,6 +7,7 @@ group :development do
|
|
7
7
|
# We depend on Vagrant for development, but we don't add it as a
|
8
8
|
# gem dependency because we expect to be installed within the
|
9
9
|
# Vagrant environment itself using `vagrant plugin`.
|
10
|
+
gem "vagrant-aws"
|
10
11
|
gem "vagrant", :git => "git://github.com/mitchellh/vagrant.git", :tag => "v1.2.7"
|
11
12
|
gem "vagrant-rspec-ci", "~> 1.0.1"
|
12
13
|
end
|
@@ -7,6 +7,16 @@ module VagrantPlugins
|
|
7
7
|
module Extras
|
8
8
|
module Action
|
9
9
|
module DNS
|
10
|
+
class ProviderIsAWS
|
11
|
+
def initialize(app, env)
|
12
|
+
@app = app
|
13
|
+
end
|
14
|
+
|
15
|
+
def call(env)
|
16
|
+
env[:result] = env[:machine].provider_name == "aws"
|
17
|
+
@app.call(env)
|
18
|
+
end
|
19
|
+
end
|
10
20
|
class ConnectAWS
|
11
21
|
def initialize(app, env)
|
12
22
|
@app = app
|
@@ -11,21 +11,29 @@ module VagrantPlugins
|
|
11
11
|
|
12
12
|
def self.action_up
|
13
13
|
Vagrant::Action::Builder.new.tap do |builder|
|
14
|
-
builder.use
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
builder.use Call, DNS::ProviderIsAWS do |env, aws_builder|
|
15
|
+
if env[:result]
|
16
|
+
aws_builder.use ConfigValidate
|
17
|
+
aws_builder.use ::VagrantPlugins::AWS::Action::ConnectAWS
|
18
|
+
aws_builder.use ::VagrantPlugins::AWS::Action::ReadSSHInfo
|
19
|
+
aws_builder.use DNS::ConnectAWS
|
20
|
+
aws_builder.use DNS::Set
|
21
|
+
end
|
22
|
+
end
|
19
23
|
end
|
20
24
|
end
|
21
25
|
|
22
26
|
def self.action_destroy
|
23
27
|
Vagrant::Action::Builder.new.tap do |builder|
|
24
|
-
builder.use
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
28
|
+
builder.use Call, DNS::ProviderIsAWS do |env, aws_builder|
|
29
|
+
if env[:result]
|
30
|
+
aws_builder.use ConfigValidate
|
31
|
+
aws_builder.use ::VagrantPlugins::AWS::Action::ConnectAWS
|
32
|
+
aws_builder.use ::VagrantPlugins::AWS::Action::ReadSSHInfo
|
33
|
+
aws_builder.use DNS::ConnectAWS
|
34
|
+
aws_builder.use DNS::Remove
|
35
|
+
end
|
36
|
+
end
|
29
37
|
end
|
30
38
|
end
|
31
39
|
|
@@ -46,13 +46,15 @@ module VagrantPlugins
|
|
46
46
|
def finalize!
|
47
47
|
@record_zone = nil if @record_zone == UNSET_VALUE
|
48
48
|
@record_type = "CNAME" if @record_type == UNSET_VALUE
|
49
|
-
@record_name
|
49
|
+
@record_name = nil if @record_name == UNSET_VALUE
|
50
50
|
@record_ttl = 3600 if @record_ttl == UNSET_VALUE
|
51
51
|
@remove_on_suspend = true if @remove_on_suspend == UNSET_VALUE
|
52
52
|
@remove_on_destroy = true if @remove_on_destroy == UNSET_VALUE
|
53
53
|
end
|
54
54
|
|
55
55
|
def validate(machine)
|
56
|
+
return {} if machine.provider_name != "aws"
|
57
|
+
|
56
58
|
errors = []
|
57
59
|
errors.push "record zone must be set" unless @record_zone
|
58
60
|
errors.push "record name must be set" unless @record_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-aws-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaakko Suutarla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: vagrant-aws
|