Skip to content

Conversation

@bastelfreak
Copy link

No description provided.

@bastelfreak bastelfreak requested review from a team as code owners June 25, 2024 16:44
hostname = networking[:hostname]
domain = networking[:domain]
if domain and domain != ''
fqdn = [hostname, domain].join('.')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be easier to always use the networking.fqdn fact? I think when there's no domain, facter will set the fqdn to the hostname?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastelfreak bastelfreak changed the title Face: do not rely on legacy facts Do not rely on legacy facts Jun 26, 2024
Copy link

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving away of legacy facts seems a good move. As you say, this can probably use the networking.fqdn fact directly.

hostname = networking[:hostname]
domain = networking[:domain]
if domain and domain != ''
fqdn = [hostname, domain].join('.')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants