voxpupuli / puppet-googleauthenticator

Google-authenticator module for Puppet
https://forge.puppet.com/puppet/googleauthenticator
Apache License 2.0
13 stars 17 forks source link

pam: Add Rocky and AlmaLinux support #72

Open hedasp opened 2 years ago

hedasp commented 2 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

Using module on Rocky or AlmaLinux fails.

What are you seeing

Rocky and AlmaLinux not recognized as valid OS names.

What behaviour did you expect instead

Rocky and AlmaLinux recognized as valid OS names.

Output log

Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, not supported on Rocky (file: /etc/puppetlabs/code/environments/production/modules/googleauthenticator/manifests/pam.pp, line: 40, column: 25)

Any additional information you'd like to impart

Please update manifests/pam.pp and manifests/pam/common.pp with: /RedHat|CentOS|Rocky|AlmaLinux/

sbrowne-godaddy commented 5 months ago

I don't have puppet on an Alma or Rocky box right this minute, but. What's the output of:

facter -p os.family os.name

It may be just as easy as replacing facts['os']['name'] with facts['os']['family'].

TheMeier commented 5 months ago

You can always look up the mock facts in facterdb, e.g. here for alama 9 https://github.com/voxpupuli/facterdb/blob/master/facts/4.7/almalinux-9-x86_64.facts

sbrowne-godaddy commented 5 months ago

Huh; cool. Didn't know that existed. So yes facts['os']['family'] is RedHat for both.