Sha256: ab2955fb8047f599eea1ef55311853ebfadb5e9c71faecb9f86de32c01932838
Contents?: true
Size: 373 Bytes
Versions: 13
Compression:
Stored size: 373 Bytes
Contents
module VagrantPlugins module GuestCoreOS module Cap class ChangeHostName def self.change_host_name(machine, name) machine.communicate.tap do |comm| if !comm.test("sudo hostname --fqdn | grep '#{name}'") comm.sudo("hostname #{name.split('.')[0]}") end end end end end end end
Version data entries
13 entries across 10 versions & 5 rubygems