Rendering puppet.conf (as part of unattended/finish)

Hi all,
When http://$FOREMAN_HOST/unattended/finish is executed the puppet.conf for
the new machine is generated and placed in the respective directory. This
all works perfectly… except that when the puppet config is generated the
puppet agent parameter server (via @host.puppetmaster) is the IP address of
the puppet master and not its hostname. This causes the puppet agent to
fail to connect.

How can I have @host.puppetmaster return a hostname value rather than an IP
address?

Thanks!
Andy

PS: previously in 0.4.2 @host.puppetmaster would return the hostname value

··· On Friday, 7 September 2012 10:45:44 UTC+2, Andy Edmonds wrote: > > Hi all, > When http://$FOREMAN_HOST/unattended/finish is executed the puppet.conf > for the new machine is generated and placed in the respective directory. > This all works perfectly... except that when the puppet config is generated > the puppet agent parameter server (via @host.puppetmaster) is the IP > address of the puppet master and not its hostname. This causes the puppet > agent to fail to connect. > > How can I have @host.puppetmaster return a hostname value rather than an > IP address? > > Thanks! > Andy >

It comes from the URL of your smart-proxy. If you have:

http://foo.bar.baz:8443

As the smart-proxy URL, the @host.puppetmaster = "foo.bar.baz" (for hosts
using that proxy, ofc). Try changing your smart-proxy URL.

Thanks Greg

I have changed puppet.foo.com:8443 as proxy url in foreman/smart-proxy and
now @host.puppetmaster=puppet
It didn't take the full hostname for some reason but I can probably work
around this by adding a puppet entry in the /etc/hosts snippet.

btw: great job with foreman, thanks!

··· On Friday, 9 November 2012 22:36:37 UTC+11, Greg Sutcliffe wrote: > > It comes from the URL of your smart-proxy. If you have: > > http://foo.bar.baz:8443 > > As the smart-proxy URL, the @host.puppetmaster = "foo.bar.baz" (for hosts > using that proxy, ofc). Try changing your smart-proxy URL. >

> Thanks Greg
>
> I have changed puppet.foo.com:8443 as proxy url in foreman/smart-proxy
> and now @host.puppetmaster=puppet
> It didn't take the full hostname for some reason but I can probably work
> around this by adding a puppet entry in the /etc/hosts snippet.
>

"puppet.x.y.z" is a special case - the code handles that sort of name
differently. We had some debate a while ago about whether that was a good
idea - personally I don't like it, since it surprises people. Any other
name should pass the fully qualified string to the params.

> btw: great job with foreman, thanks!
>

Glad you like it :slight_smile:

··· On 12 November 2012 05:12, Vincent Brouillet wrote:

>
>
>> Thanks Greg
>>
>> I have changed puppet.foo.com:8443 as proxy url in foreman/smart-proxy
>> and now @host.puppetmaster=puppet
>> It didn't take the full hostname for some reason but I can probably work
>> around this by adding a puppet entry in the /etc/hosts snippet.
>>
>
> "puppet.x.y.z" is a special case - the code handles that sort of name
> differently. We had some debate a while ago about whether that was a good
> idea - personally I don't like it, since it surprises people. Any other
> name should pass the fully qualified string to the params.
>

I believe the consensus at the time was to change the behavior to match
user's expectations, or at the very least make it a configurable option:
http://theforeman.org/issues/1745

··· On Mon, Nov 12, 2012 at 5:43 AM, Greg Sutcliffe wrote: > On 12 November 2012 05:12, Vincent Brouillet wrote:

btw: great job with foreman, thanks!

Glad you like it :slight_smile:


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.


http://aws.amazon.com/solutions/solution-providers/brandorr/