Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Microsoft Azure Linux to Facter 4.x #2723

Closed
wants to merge 1 commit into from

Conversation

mminkus
Copy link
Contributor

@mminkus mminkus commented May 23, 2024

Add support for Microsoft Azure Linux, previously known as CBL-Mariner, Microsoft's Linux distribution for cloud infrastructure and edge products and services.

Before:

# facter os
{
  architecture => "x86_64",
  family => "Linux",
  hardware => "x86_64",
  name => "Linux",
  release => {
    full => "6.6.22.1-2.azl3",
    major => "6",
    minor => "6"
  },
  selinux => {
    enabled => false
  }
}

After:

# facter os
{
  architecture => "x86_64",
  family => "Redhat",
  hardware => "x86_64",
  name => "AzureLinux",
  release => {
    full => "3.0.20240401",
    major => "3",
    minor => "0"
  },
  selinux => {
    enabled => false
  }
}

Fixes #2727

Add support for Microsoft Azure Linux, prevously known as CBL-Mariner,
Microsoft's Linux distribution for cloud infrastructure and edge products
and services.
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?


[Facter::ResolvedFact.new(FACT_NAME, version),
Facter::ResolvedFact.new(ALIASES.first, version['major'], :legacy),
Facter::ResolvedFact.new(ALIASES.last, version['full'], :legacy)]
Copy link

Choose a reason for hiding this comment

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

Can you add support for minor?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is still an open question?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're actually getting minor in the facter output already, but I'm not sure how that's working.

@mminkus mminkus marked this pull request as ready for review May 24, 2024 11:04
@mminkus mminkus requested a review from a team as a code owner May 24, 2024 11:04
@joshcooper joshcooper added triaged Jira issue has been created for this enhancement New feature or enhancement and removed triaged Jira issue has been created for this labels May 31, 2024
Comment on lines +43 to +44
'Mariner',
'Azurelinux'
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, but shouldn't both Mariner and AzureLinux be nested under Rhel (line 20)?

@mhashizume
Copy link
Contributor

This looks good to me other than the hierarchy in lib/facter/config.rb and the minor conflict in lib/facter/framework/core/file_loader.rb. Today is feature complete for our next release of Puppet (during which we will also be including a new release of Facter), so I've created a new PR with your work and those minor changes: #2738

@mhashizume mhashizume closed this Jul 16, 2024
@mhashizume mhashizume reopened this Jul 16, 2024
@mhashizume mhashizume closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Microsoft Azure Linux to Facter 4.x
5 participants