Sha256: f638e5f5c31e6b9463a84941c5b3d7487776251684669924a35f749ff021f6a3
Contents?: true
Size: 671 Bytes
Versions: 6
Compression:
Stored size: 671 Bytes
Contents
module VagrantPlugins module GuestCoreOS module Cap class ChangeHostName def self.change_host_name(machine, name) comm = machine.communicate if !comm.test("hostname --fqdn | grep -w '#{name}'") basename = name.split(".", 2)[0] comm.sudo("hostname '#{basename}'") # Note that when working with CoreOS, we explicitly do not add the # entry to /etc/hosts because this file does not exist on CoreOS. # We could create it, but the recommended approach on CoreOS is to # use Fleet to manage /etc/hosts files. end end end end end end
Version data entries
6 entries across 6 versions & 2 rubygems