Last active
August 29, 2015 14:22
-
-
Save stbenjam/06aeaf0b7a21100f272f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User.current = User.anonymous_admin | |
SmartProxy.all.each do |proxy| | |
content_host = ::Katello::System.where(:name => proxy.name).order("created_at DESC").first | |
if content_host | |
proxy.content_host_id = content_host.id | |
proxy.save! | |
puts "Capsule #{proxy} has Content Host #{content_host}" | |
else | |
puts "No Content Host Found for #{proxy}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment