Sha256: f9657d5a5fc1251f57c4280aad8968166b0a6302eaefde9034e8efa54919ec92
Contents?: true
Size: 552 Bytes
Versions: 1
Compression:
Stored size: 552 Bytes
Contents
module VagrantPlugins module GuestSmartos module Cap class ChangeHostName def self.change_host_name(machine, name) su_cmd = machine.config.smartos.suexec_cmd # Only do this if the hostname is not already set if !machine.communicate.test("hostname | grep '#{name}'") machine.communicate.execute("#{su_cmd} sh -c \"echo '#{name}' > /etc/nodename\"") machine.communicate.execute("#{su_cmd} hostname #{name}") end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cloudstack-1.2.0 | vendor/bundle/bundler/gems/vagrant-c84e05fd063f/plugins/guests/smartos/cap/change_host_name.rb |