On Fri, Dec 04, 2020 at 08:52:38AM +1100, Nathan Scott wrote:
> Hi Rich,
>
> On Fri, Dec 4, 2020 at 3:46 AM Rich Megginson <rmeggins(a)redhat.com> wrote:
>> The VPN role allows for the user to specify a hostname or an IP address
>> for the connection
>>
https://github.com/linux-system-roles/vpn/pull/2#pullrequestreview-538046482
>>
>> I wanted to open this discussion up to a wider audience.
>>
>> We have some precedence in system roles for a field that can take a
>> hostname or IP address. The logging role has a field `server_host` in
>> the elasticsearch and relp outputs
>>
https://github.com/linux-system-roles/logging/blob/master/README.md#loggi...
>> - The documentation says "Host name" but this can be an IP address.
>> Also the `target` field for the forwards output - it says "Target host
>> (fqdn)." but it can be an IP address.
>>
>> The metrics role has
>>
https://github.com/linux-system-roles/metrics/blob/master/README.md#role-...
>> `metrics_monitored_hosts` which I believe takes IP addresses as well as
>> hostnames.
> Just confirming - yes, these allow interchanging of host names and IP addresses.
>
>> There may be other examples in some of the other roles
>>
>> Does it matter what is the name that the VPN role uses for this field?
>> Is `host` ok?
> I think 'host' is fine in this context, and most people expect IP
> addresses and hostnames to be relatively interchangeable.
To explain why I started the discussion, the context in the VPN case is
that you will usually need this parameter for multihomed hosts, but then
it is not used to specify the host, but the network interface/address
among the multiple ones on the given host. The fact that the "host"
parameter would be used inside a dictionary under a "hosts" list reveals
how illogical it is. (Why does a host - an entry under the hosts list -
does need a "host" attribute? It is a host in itself.)
Can you suggest a
better alternative? I'm not sure it refers to a
network interface (i.e. you cannot set it to a value like "eth0").
P.