Re: Setting hostname

2016-03-15 Thread Andrew C Aitchison
On Tue, 15 Mar 2016, Loris Bennett wrote: Hi, I'm using ansible to set up two servers and have run into the problem that on one server 'hostname' returns the just the name of the machine, but on the other I get the FQDN: # hostname -s; hostname -d; hostname -f; hostname tadmin01 test.cluster

Re: Setting hostname

2016-03-15 Thread Loris Bennett
Hi Paddy, Paddy Doyle writes: > Hi Loris, > > On Tue, Mar 15, 2016 at 11:43:55AM +0100, Loris Bennett wrote: > >> Hi, >> >> I'm using ansible to set up two servers and have run into the problem >> that on one server 'hostname' returns the just the name of the machine, >>

Re: Setting hostname

2016-03-15 Thread Nico Kadel-Garcia
On Tue, Mar 15, 2016 at 8:32 AM, Nico Kadel-Garcia wrote: > The problem is that the $HOSTNAME for the system isn't published in > DNS, nor is it the first hostname for a line in /etc/hosts, so the > "hostname --fqdn" is not finding it associated with your IP addresses. > The

Re: Setting hostname

2016-03-15 Thread Paddy Doyle
Hi Loris, On Tue, Mar 15, 2016 at 11:43:55AM +0100, Loris Bennett wrote: > Hi, > > I'm using ansible to set up two servers and have run into the problem > that on one server 'hostname' returns the just the name of the machine, > but on the other I get the FQDN: > > # hostname -s; hostname -d;

Re: Setting hostname

2016-03-15 Thread Nico Kadel-Garcia
On Tue, Mar 15, 2016 at 7:04 AM, Loris Bennett wrote: > Hi Benjamin, > > Benjamin Lefoul writes: > >> Hi Loris, >> >> On SL7, I believe hostnames are best set declaratively in the file >> /etc/hostname (as has been the case for long on other

Re: Setting hostname

2016-03-15 Thread Loris Bennett
Hi Benjamin, Benjamin Lefoul writes: > Hi Loris, > > On SL7, I believe hostnames are best set declaratively in the file > /etc/hostname (as has been the case for long on other distros). I > suspect the preferred imperative way to set hostname is with > "hostnamectl

Re: Setting hostname

2016-03-15 Thread Benjamin Lefoul
Hi Loris, On SL7, I believe hostnames are best set declaratively in the file /etc/hostname (as has been the case for long on other distros). I suspect the preferred imperative way to set hostname is with "hostnamectl set-hostname" (check the man hostnamectl). Regards, Benjamin Lefoul nWISE AB

Setting hostname

2016-03-15 Thread Loris Bennett
Hi, I'm using ansible to set up two servers and have run into the problem that on one server 'hostname' returns the just the name of the machine, but on the other I get the FQDN: # hostname -s; hostname -d; hostname -f; hostname tadmin01 test.cluster tadmin01.test.cluster tadmin01 # hostname