So the two solutions I'm groking from this conversation are:

1) New fact that maps closer to the 'hostname' command (for example)
2) Configuration item that changes behaviour of the hostname fact.

Obviously we don't support configuration specifically in facter at
this point - but ignoring that for now - what would people prefer?
What would create the least amount of surprise? Or is there more
options available ...

ken.

On Fri, Sep 30, 2011 at 12:40 AM, easybeats <dext...@gmail.com> wrote:
> Just to weigh into the debate.
>
> To give the Unix administrator choice to set the hostname to what they
> determine falls into line with what Unix already provides. Generally
> whether its a bad or good decision to use the returned uname() system
> call variable or uname() regexed to the first dot its up to the
> application.
>
> I would argue it should be a per site decision through a configuration
> parameter as to what they deem to be the hostname. Yes there certainly
> are RFCs that outline best practice but an administrator may decide to
> go against RFCs based on a company/individual decision (Take SMTP
> servers switching on RFC filters or disabling). I think that facter
> should empower the administrator to make that decision making them own
> the issue.
>
>
> IE some applications that adhere to this...
>
>
>
> Linux Kernel -
> # hostname myhost.dev.domain.site
> # sysctl -n kernel.hostname
> myhost.dev.domain.site
>
> # hostname myhost.dev
> # sysctl -n kernel.hostname
> myhost.dev
>
> # hostname myhost
> # sysctl -n kernel.hostname
> myhost
>
>
> bash - From the bash man page
>              \H     the hostname     (IE Because of no qualification,
> it considers this to be the hostname not the short form of it)
>              \h      the hostname up to the first `.'
>
> A site admin is allowed the flexability to set either
>
> PS1=\u@\H (username + value in kernel.hostname)
>
> or
>
> PS1=\u@\h (username + value to the first dot of kernel.hostname)
>
>
>
> Anything that uses the uname system call will more than likely use the
> struct value directly (I would suspect this to be the vast majority of
> Unix applications). If application owner decides to use the short from
> they would employ a regex to the first dot.
>
>
> So in this vain of empowering the puppet user...
>
> A suggestion of a configuration parameter (possibly as another fact
> itself or in a configuration file) IE
> hostname_shortform = true | 1    (Default value)
> hostname_shortform = false | 0   (Set by the user)
>
> This would allow the puppet user to decide what goes into facter and
> ultimately their application configuration files, whether its the
> short form or standard hostname let them take the credit or hang
> themselves.
>
> -Dex
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/puppet-users?hl=en.
>
>

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

Reply via email to