-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,16 @@ module GuestRedHat | |
module Cap | ||
class ChangeHostName | ||
def self.change_host_name(machine, name) | ||
new(machine, name).change! | ||
case machine.guest.capability("flavor") | ||
when :rhel_7 | ||
change_host_name_rhel7(machine, name) | ||
else | ||
new(machine, name).change! | ||
end | ||
end | ||
|
||
def self.change_host_name_rhel7(machine, name) | ||
machine.communicate.sudo("homenamectl set-hostname #{name}") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cdenneen
|
||
end | ||
|
||
attr_reader :machine, :new_hostname | ||
|
Typo... hostnamectl not homenamectl, 1.6.5 please :)