zerigo-designate 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/designate/capistrano.rb +8 -1
- data/lib/designate/version.rb +1 -1
- metadata +3 -3
data/lib/designate/capistrano.rb
CHANGED
@@ -9,9 +9,16 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
9
9
|
roles.each do |role|
|
10
10
|
dns_names << role[1].instance_variable_get("@static_servers").first.instance_variable_get("@host")
|
11
11
|
end
|
12
|
+
|
12
13
|
zone = Designate::Client.new().find_or_create_zone()
|
13
|
-
zone.create_host('CNAME', "#{hostname}.#{zerigo_config[:domain]}", {:hostname => "#{hostname}-#{application}"})
|
14
14
|
zone.create_host('CNAME', dns_names.first, {:hostname => hostname})
|
15
|
+
|
16
|
+
if zerigo_config[:subdomain].nil?
|
17
|
+
zone.create_host('CNAME', "#{hostname}.#{zerigo_config[:domain]}", {:hostname => "#{hostname}-#{application}"})
|
18
|
+
else
|
19
|
+
subzone = Designate::Client.new().find_or_create_zone("#{zerigo_config[:subdomain]}.#{zerigo_config[:domain]}")
|
20
|
+
subzone.create_host('CNAME', "#{hostname}.#{zerigo_config[:domain]}", {:hostname => "#{hostname}"})
|
21
|
+
end
|
15
22
|
end
|
16
23
|
|
17
24
|
def zerigo_config()
|
data/lib/designate/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zerigo-designate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Miller
|