support/rudy-ec2-startup in solutious-rudy-0.4.0 vs support/rudy-ec2-startup in solutious-rudy-0.5.0

- old
+ new

@@ -7,11 +7,11 @@ # NOTE: This is a prototype version of this script. A cleaner version # with better documentation is forthcoming. # Runs when an ec2 instance startups up. # Grabs configuration from the run time user data and stores it locally. -# See Rudy::Command::Instances#start_instance for the expected yaml format. +# See Rudy::CLI::Instances#start_instance for the expected yaml format. # Put this in /etc/init.d. Then: # * chmod 755 rudy-ec2-startup # * cd /etc/rc3.d # * ln -s ../init.d/rudy-ec2-startup S17rudy @@ -72,13 +72,13 @@ # Print to STDOUT and NOT to the log. # We don't want sensitive config values available in the log puts "CONFIG: " << config_yaml - zone = config[:zone] ? config[:zone].downcase : "zone" - environment = config[:environment] ? config[:environment].downcase : "env" - role = config[:role] ? config[:role].downcase : "role" - position = config[:position] ? config[:position].downcase : "00" + zone = config[:zone] ? config[:zone].to_s.downcase : "zone" + environment = config[:environment] ? config[:environment].to_s.downcase : "env" + role = config[:role] ? config[:role].to_s.downcase : "role" + position = config[:position] ? config[:position].to_s.downcase : "00" hostname = [zone, environment, role, position].join('-') log "Setting hostname: #{hostname}" `hostname #{hostname}`