lib/kite/render.rb in kite-0.0.7 vs lib/kite/render.rb in kite-0.0.8
- old
+ new
@@ -12,15 +12,23 @@
@values = parse_cloud_config
@tf_output = parse_tf_state('terraform/terraform.tfstate')
case type
when "bosh"
- cloud = options[:cloud]
- directory("#{cloud}/deployments", 'deployments')
+ if options[:cloud] == 'aws'
+ @private_subnet = IPAddr.new(@values['aws']['private_subnet']['network']).to_range.to_a
+ else
+ @private_subnet = IPAddr.new(@values['gcp']['subnet_cidr']).to_range.to_a
+ end
+ directory("#{options[:cloud]}/deployments/bosh", 'deployments/bosh')
+
when "concourse"
template("#{options[:cloud]}/deployments/concourse/cloud-config.yml.erb", "deployments/concourse/cloud-config.yml")
- template("#{options[:cloud]}/deployments/concourse/concourse.yml.erb", "deployments/concourse/concourse.yml")
+ template("#{options[:cloud]}/deployments/concourse/concourse.yml.erb", "deployments/concourse/concourse.yml")
+ when "vault"
+ copy_file("#{options[:cloud]}/deployments/vault/vault.yml", "deployments/vault/vault.yml")
+ copy_file("#{options[:cloud]}/vault.md", "docs/vault.md")
else
say "Manifest type not specified"
end