Closed Joseph-R closed 9 years ago
So the answer is "yes". I think.
Using node.default['hostname_cookbook']['hostsfile_ip'] = "#{node['ipaddress']}"
, I was able to set the internal IP to the FQDN and hostname.
I was not able to figure that out for a dynamically set external on both Vagrant and EC2. But it turned out I didn't have to. So I didn't.
So I'm in a curious situation. I want to set the hostname and FQDN to deploy an automated, single-node version of Hortonwork's Data Platform using Apache Ambari.
But HDFS itself [responds poorly|http://wiki.apache.org/hadoop/ConnectionRefused] to hostnames being configured to the loopback address.
So I'd like to configure where the host name and FQDN are set in code, but only aliased to an external IP in the /etc/hosts file. Is that possible? How can I best accomplish this?
Do the desired end-state I'm looking for would be something like these two files:
/etc/sysconfig/network:
/etc/hosts: