Export hostname via __target_host_name #292

Closed
opened 2021-11-20 15:23:34 +00:00 by ungleich-gitea · 4 comments

Created by: telmich

The __target_host variable contains whatever a user specified.
To allow the user to rely on a variable that contains the hostname (without domain), the variable __target_host_name should be exported, with only containing everything until excluding the first dot.

Domain handling can be done by the user better than from the cdist core, for instance by adding conf/manifest/domain which contains

domain="my.local.domain.example.org"
*Created by: telmich* The __target_host variable contains whatever a user specified. To allow the user to rely on a variable that contains the hostname (without domain), the variable __target_host_name should be exported, with only containing everything until excluding the first dot. Domain handling can be done by the user better than from the cdist core, for instance by adding conf/manifest/domain which contains ``` domain="my.local.domain.example.org" ```
ungleich-gitea added this to the future milestone 2021-11-20 15:23:34 +00:00
ungleich-gitea added the
feature
label 2021-11-20 15:23:34 +00:00
Author
Owner

Created by: telmich

I think we do not need to fix this anymore - shell can handle this easily.

*Created by: telmich* I think we do not need to fix this anymore - shell can handle this easily.
Author
Owner

Created by: telmich

good point. maybe we need to check if it is an IPv4 address and if so, keep it as it is

*Created by: telmich* good point. maybe we need to check if it is an IPv4 address and if so, keep it as it is
Author
Owner

Created by: jdguffey

What if a user provides an IP address rather than a hostname?

On Nov 14, 2012, at 10:22 AM, Nico Schottelius notifications@github.com wrote:

Good comment from sar:

16:13 < sar> telmich: echo "${__target_host%%.*}", problem solved


Reply to this email directly or view it on GitHub.

*Created by: jdguffey* What if a user provides an IP address rather than a hostname? On Nov 14, 2012, at 10:22 AM, Nico Schottelius notifications@github.com wrote: > Good comment from sar: > > 16:13 < sar> telmich: echo "${__target_host%%.*}", problem solved > > — > Reply to this email directly or view it on GitHub.
Author
Owner

Created by: telmich

Good comment from sar:

16:13 < sar> telmich: echo "${__target_host%%.*}", problem solved

*Created by: telmich* Good comment from sar: 16:13 < sar> telmich: echo "${__target_host%%.*}", problem solved
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#292
No description provided.