154: def update_machines
155: mlist = get_machines
156: rset = Rye::Set.new(current_group_name, :parallel => @@global.parallel, :user => current_machine_root)
157: rset.add_key user_keypairpath(current_machine_root)
158: os = current_machine_os
159: mlist.each do |m|
160: li "Updating #{m.name}"
161: rbox = Rudy::Routines::Handlers::RyeTools.create_box m
162: rbox.stash = m
163: m.refresh!
164: rset.add_boxes rbox
165: if m.os.to_s != os.to_s
166: li "os: #{os}"
167: m.os = os
168: end
169: m.save :replace
170: end
171:
172: unless os.to_s == 'windows'
173: li "Updating hostnames for #{current_group_name}"
174: Rudy::Routines::Handlers::Host.set_hostname rset
175: li rset.hostname.flatten
176: end
177:
178: end