Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Fixes #21056 - find old hostname only in host of media path
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni authored and John Mitsch committed Sep 21, 2017
1 parent a727125 commit 799cb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion katello/katello-change-hostname
Expand Up @@ -267,7 +267,7 @@ unless @foreman_proxy_content
hammer_cmd("capsule update --id #{proxy_id} --url https://#{@new_hostname}:9090 --new-name #{@new_hostname} 2> /dev/null", [0, 65])

STDOUT.puts "Updating installation media paths"
old_media = JSON.parse(hammer_cmd("--output json medium list --search #{@old_hostname}"))
old_media = JSON.parse(hammer_cmd("--output json medium list --search 'path ~ //#{@old_hostname}/'"))
old_media.each do |medium|
new_path = URI.parse(medium['Path'])
new_path.host = @new_hostname
Expand Down

0 comments on commit 799cb5a

Please sign in to comment.