From 824da928a4aeb18458022dfb5eb6a041442e1204 Mon Sep 17 00:00:00 2001 From: Woping Li Date: Mon, 30 Apr 2018 18:13:49 +1000 Subject: [PATCH] fix: YAML.load being run on incorrect string Fixes #80 --- lib/cap-ec2/utils.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/cap-ec2/utils.rb b/lib/cap-ec2/utils.rb index 2c7a38d..7dc9fba 100644 --- a/lib/cap-ec2/utils.rb +++ b/lib/cap-ec2/utils.rb @@ -2,7 +2,6 @@ module CapEC2 module Utils - module Server def ec2_tags id = self.properties.fetch(:aws_instance_id) @@ -56,7 +55,7 @@ def load_config config_location = File.expand_path(fetch(:ec2_config), Dir.pwd) if fetch(:ec2_config) if config_location && File.exists?(config_location) - config = YAML.load(ERB.new(File.read(fetch(:ec2_config)))) + config = YAML.load(ERB.new(File.read(fetch(:ec2_config))).result) if config set :ec2_project_tag, config['project_tag'] if config['project_tag'] set :ec2_roles_tag, config['roles_tag'] if config['roles_tag']