Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 63 additions & 39 deletions .github/workflows/pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,24 @@
#
# ==============================================================================
#
# The testing matrix considers ruby/puppet versions supported by SIMP and PE:
# ------------------------------------------------------------------------------
# Release Puppet Ruby EOL
# PE 2019.8 6.22 2.5 2022-12 (LTS)
# PE 2021.Y 7.x 2.7 Quarterly updates
#
# https://puppet.com/docs/pe/latest/component_versions_in_recent_pe_releases.html
# https://puppet.com/misc/puppet-enterprise-lifecycle
# ==============================================================================
#
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
#

---
name: PR Tests
on:
'on':
pull_request:
types: [opened, reopened, synchronize]

env:
PUPPET_VERSION: '~> 7'

jobs:
puppet-syntax:
name: 'Puppet Syntax'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: "Install Ruby 2.7"
- name: "Install Ruby 3.2"
uses: ruby/setup-ruby@v1 # ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
with:
ruby-version: 2.7.8
ruby-version: 3.2.11
bundler-cache: true
- run: "bundle exec rake syntax"

Expand All @@ -47,10 +34,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: "Install Ruby 2.7"
- name: "Install Ruby 3.2"
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8
ruby-version: 3.2.11
bundler-cache: true
- run: "bundle exec rake lint"
- run: "bundle exec rake metadata_lint"
Expand All @@ -61,10 +48,10 @@ jobs:
continue-on-error: true
steps:
- uses: actions/checkout@v7
- name: "Install Ruby 2.7"
- name: "Install Ruby 3.4"
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8
ruby-version: 3.4.9
bundler-cache: true
- run: |
bundle show
Expand All @@ -75,10 +62,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: 'Install Ruby 2.7'
- name: 'Install Ruby 3.4'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8
ruby-version: 3.4.9
bundler-cache: true
- run: bundle exec rake check:dot_underscore
- run: bundle exec rake check:test_file
Expand All @@ -88,10 +75,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: 'Install Ruby 2.7'
- name: 'Install Ruby 3.4'
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.8
ruby-version: 3.4.9
bundler-cache: true
- name: 'Tags and changelogs'
run: |
Expand All @@ -108,10 +95,6 @@ jobs:
strategy:
matrix:
puppet:
- label: 'Puppet 7.x [SIMP 6.6/PE 2021.7]'
puppet_version: '~> 7.0'
ruby_version: '2.7'
experimental: false
- label: 'Puppet 8.x'
puppet_version: '~> 8.0'
ruby_version: '3.2'
Expand All @@ -127,15 +110,56 @@ jobs:
ruby-version: ${{matrix.puppet.ruby_version}}
bundler-cache: true
- run: 'command -v rpm || if command -v apt-get; then sudo apt-get update; sudo apt-get install -y rpm; fi ||:'
- run: 'bundle exec rake spec'
- run: 'bundle exec rake parallel_spec'
continue-on-error: ${{matrix.puppet.experimental}}

# dump_contexts:
# name: 'Examine Context contents'
# runs-on: ubuntu-latest
# steps:
# - name: Dump contexts
# env:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo "$GITHUB_CONTEXT"
#
acceptance:
runs-on:
- ubuntu-latest
strategy:
matrix:
# Container-compatible suites tested across every supported OS.
# Excluded suites:
# - ipa_fact: requires sysctl changes, an IPA domain, and entropy,
# none of which work in unprivileged containers
# - windows: cannot run in a Linux container
suite:
- default
- caller_function
- prelink_fact
node:
- docker_alma8
- docker_alma9
- docker_alma10
- docker_centos9
- docker_centos10
- docker_oel8
- docker_oel9
- docker_oel10
# RHEL UBI containers cannot install packages without a
# subscription, so these jobs fail on the package-install
# step. Re-enable when we have a working subscription path.
# - docker_rhel8
# - docker_rhel9
# - docker_rhel10
- docker_rocky8
- docker_rocky9
- docker_rocky10
fail-fast: false
steps:
- name: checkout repo
uses: actions/checkout@v7
- name: setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.9
- name: bundle install
run: |
bundle install
- name: Setup podman
run: |
systemctl start --user podman.socket
echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
- name: beaker
run: |
bundle exec rake beaker:suites[${{ matrix.suite }},${{ matrix.node }}]
14 changes: 14 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
* Mon Jun 08 2026 Steven Pritchard <steven.pritchard@gmail.com> - 6.0.0
- Switch `requirements` from `puppet` to `openvox` (>= 8 < 9)
- Point `issues_url` at GitHub Issues
- Curate `operatingsystem_support` to the tested platforms with explicit
versions: the Enterprise Linux 8/9/10 family (AlmaLinux, CentOS, OracleLinux,
RedHat, Rocky), dropping CentOS 8 and EL7 and adding EL10. This replaces the
previous broad, un-versioned list (inherited from puppetlabs-stdlib) that
advertised many untested operating systems. The pure-Puppet functions and
data types remain OS-agnostic and the facts are confined, so the module still
loads safely on other platforms; only the tested/supported matrix is narrowed.
- Allow newer SIMP module dependencies (see metadata.json diff)
- Sync Gemfile with current puppetsync baseline (adds OpenVox to test gems)
- Drop Puppet 7 / Ruby 2.7 from GitHub Actions; use Ruby 3.2.11 with OpenVox 8 and 3.4.9 elsewhere

* Thu Jun 11 2026 Aman Shah <aman@obmondo.com> - 5.0.3
- Fix tmp_mount* facts raising "undefined method `[]' for nil:NilClass"
when simplib__mountpoints resolves to nil
Expand Down
10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ group :syntax do
end

group :test do
puppet_version = ENV.fetch('PUPPET_VERSION', ['>= 7', '< 9'])
puppet_version = ENV.fetch('PUPPET_VERSION', ['>= 8', '< 9'])
openvox_version = ENV.fetch('OPENVOX_VERSION', puppet_version)
major_puppet_version = Array(puppet_version).first.scan(%r{(\d+)(?:\.|\Z)}).flatten.first.to_i
gem 'hiera-puppet-helper'
gem 'pathspec', '~> 0.2' if Gem::Requirement.create('< 2.6').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
# renovate: datasource=rubygems versioning=ruby
gem('pdk', ENV.fetch('PDK_VERSION', ['>= 2.0', '< 4.0']), require: false) if major_puppet_version > 5
gem 'puppet', puppet_version
# Temporarily include both openvox and puppet gems until the puppet dependency is removed from other gems
['openvox', 'puppet'].each do |gem_name|
gem gem_name, binding.local_variable_get("#{gem_name}_version".to_sym)
end
gem 'puppetlabs_spec_helper', '~> 8.0.0'
gem 'puppet-strings'
gem 'rake'
Expand All @@ -48,6 +51,7 @@ end
group :system_tests do
gem 'bcrypt_pbkdf'
gem 'beaker'
gem 'beaker_puppet_helpers'
gem 'beaker-rspec'
# renovate: datasource=rubygems versioning=ruby
gem 'simp-beaker-helpers', ENV.fetch('SIMP_BEAKER_HELPERS_VERSION', '~> 2.0.0')
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ If you find any issues, they can be submitted to our
`simp-simplib` provides a standard library of resources commonly used by SIMP
modules but generally suited for any Puppet environment.

Its functions and data types are pure Puppet/Ruby and OS-agnostic, and its
facts are confined to the platforms where they apply, so the module loads
safely in any Puppet environment. Formal, tested support (see the
`operatingsystem_support` entry in `metadata.json`) covers the Enterprise Linux
8/9/10 family (AlmaLinux, CentOS, OracleLinux, RedHat, and Rocky); use on other
platforms is best-effort.

## Setup

### What simplib affects
Expand Down
95 changes: 34 additions & 61 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "simp-simplib",
"version": "5.0.3",
"version": "6.0.0",
"author": "SIMP Team",
"summary": "A collection of common SIMP functions, facts, and types",
"license": "Apache-2.0",
"source": "https://github.com/simp/pupmod-simp-simplib",
"project_page": "https://github.com/simp/pupmod-simp-simplib",
"issues_url": "https://simp-project.atlassian.net",
"issues_url": "https://github.com/simp/pupmod-simp-simplib/issues",
"tags": [
"simp",
"functions",
Expand All @@ -22,81 +22,54 @@
},
{
"name": "simp/simpkv",
"version_requirement": ">= 0.7.0 < 1.0.0"
"version_requirement": ">= 0.7.0 < 2.0.0"
}
],
"operatingsystem_support": [
{
"operatingsystem": "AlmaLinux"
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"9",
"10"
]
},
{
"operatingsystem": "Amazon"
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"8",
"9",
"10"
]
},
{
"operatingsystem": "Archlinux"
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"8",
"9",
"10"
]
},
{
"operatingsystem": "CentOS"
"operatingsystem": "Rocky",
"operatingsystemrelease": [
"8",
"9",
"10"
]
},
{
"operatingsystem": "Darwin"
},
{
"operatingsystem": "Debian"
},
{
"operatingsystem": "Fedora"
},
{
"operatingsystem": "FreeBSD"
},
{
"operatingsystem": "Gentoo"
},
{
"operatingsystem": "LinuxMint"
},
{
"operatingsystem": "OpenBSD"
},
{
"operatingsystem": "OpenSUSE"
},
{
"operatingsystem": "OracleLinux"
},
{
"operatingsystem": "RedHat"
},
{
"operatingsystem": "Pop!_OS"
},
{
"operatingsystem": "Rocky"
},
{
"operatingsystem": "SLES"
},
{
"operatingsystem": "Scientific"
},
{
"operatingsystem": "Solaris"
},
{
"operatingsystem": "Ubuntu"
},
{
"operatingsystem": "VirtuozzoLinux"
},
{
"operatingsystem": "Windows"
"operatingsystem": "AlmaLinux",
"operatingsystemrelease": [
"8",
"9",
"10"
]
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 9.0.0"
"name": "openvox",
"version_requirement": ">= 8.0.0 < 9.0.0"
}
],
"package_release_version": "0"
Expand Down
19 changes: 19 additions & 0 deletions spec/acceptance/nodesets/almalinux10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
HOSTS:
almalinux10:
roles:
- default
- master
- server
- el10
platform: el-10-x86_64
box: almalinux/10
hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
vagrant_memsize: 2048
vagrant_cpus: 2
family: almalinux-cloud/almalinux-10
gce_machine_type: n1-standard-2
CONFIG:
log_level: verbose
type: aio
puppet_collection: "<%= ENV.fetch('BEAKER_PUPPET_COLLECTION', 'openvox8') %>"
Loading
Loading