Registering a puppet agent node with alternate short hostname or alias

866 views
Skip to first unread message

Anil Aix

unread,
May 13, 2015, 7:45:34 AM5/13/15
to puppet...@googlegroups.com
We were trying to register gcloud instances to puppet master, but the instance names are very long with uc1f-coster-xxx02.c.xxxa-xxxx-xx0.internal
Is it possible to register these nodes with a short hostname or an alias...?,

I tried adding below line in /etc/puppet/puppet.cong of client.
dns_alt_names = costerinf2
And ran
puppet cert sign -all  --allow-dns-alt-names on master
+ "uc1f-cstor-inf02.c.zeta-bonsai-770.internal" (SHA256) xxx  S:costerinf2", "DNS:uc1f-coster-xxx02.c.xxxa-xxxx-xx0.internal")
 

But it still registers with the long name, Even in Foreman interface it shows long name, is there a way to register and show short names(the alias we configured) in puppet.
Please help.

Rilindo Foster

unread,
May 13, 2015, 8:43:21 AM5/13/15
to puppet...@googlegroups.com
By default, the certname is the fully qualified domain. You can change it via the node_name_value or node_name_fact; however, you need to have a very good reason to change the settings before you move forward with it.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/56fdc977-e4f3-4bdd-a40e-f880416dfe1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anil Aix

unread,
May 14, 2015, 6:00:23 AM5/14/15
to puppet...@googlegroups.com
Hi Rilindo,
 Thank you for the reply, let me explain the issue more clearly.
We have  gcloud instances whose private IPs are DNS registered in our company network as <hostname>.mycompany.com
But these google cloud instances seem to have their own local domain as c.<ProjectID> and thus hostname --fqdn gives
<hostname>.c.<ProjectID> this Project id is some random long weird name.

And when I register a puppet agent node to the master, its requesting certificate with this long name, I want it to be hostname.mycompany.com.

I tried using certname option like below
I did add certname = uc1f-coster-xxx02.mycompany.com in /etc/puppet/puppet.conf

The certificate request came as desired with hostname.mycompany.com but once its added, when I check hosts in foreman interface it shows the long hostname.
so, I'm looking at options to override fqdn from google's to my company's and register it with master.

Please share your thoughts..

Anil Aix

unread,
May 14, 2015, 6:00:33 AM5/14/15
to puppet...@googlegroups.com
Hi Rilindo,
 Thank you for the reply, let me explain the issue more clearly.
We have  gcloud instances whose private IPs are DNS registered in our company network as <hostname>.mycompany.com
But these google cloud instances seem to have their own local domain as c.<ProjectID> and thus hostname --fqdn gives
<hostname>.c.<ProjectID> this Project id is some random long weird name.

And when I register a puppet agent node to the master, its requesting certificate with this long name, I want it to be hostname.mycompany.com.

I tried using certname option like below
I did add certname = uc1f-coster-xxx02.mycompany.com in /etc/puppet/puppet.conf

The certificate request came as desired with hostname.mycompany.com but once its added, when I check hosts in foreman interface it shows the long hostname.
so, I'm looking at options to override fqdn from google's to my company's and register it with master.

Please share your thoughts..



On Wednesday, May 13, 2015 at 6:13:21 PM UTC+5:30, RIlindo Foster wrote:
Reply all
Reply to author
Forward
0 new messages