Open ljesmin opened 8 years ago
Centos 7 and other distros with Systemd do not can manage hostname with hostnamectl command.
I am using quite simple solution,
execute "hostnamectl set-hostname" do command "hostnamectl set-hostname #{fqdn}" action :run only_if { node['fqdn'] != fqdn } notifies :reload, 'ohai[reload_hostname]', :immediately end
Centos 7 and other distros with Systemd do not can manage hostname with hostnamectl command.
I am using quite simple solution,