Skip to content
Open
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
5 changes: 3 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ fixtures:
repo: puppetlabs/stdlib
firewall:
repo: puppetlabs/firewall
ref: '5.0.0'
mysql:
repo: puppetlabs/mysql
concat:
repo: puppetlabs/concat
augeasproviders_core:
repo: herculesteam/augeasproviders_core
repo: puppet/augeasproviders_core
augeasproviders_sysctl:
repo: herculesteam/augeasproviders_sysctl
repo: puppet/augeasproviders_sysctl
logrotate:
repo: puppet/logrotate
epel:
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ jobs:
fail-fast: false
matrix:
include:
- ruby: 2.5.9
puppet: 6
- ruby: 2.7.7
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7.6
puppet: 7
- ruby: 3.2.2
puppet: 8
fixtures: .fixtures.yml
allow_failure: false
env:
BUNDLE_WITHOUT: system_tests:release
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
FACTER_GEM_VERSION: "< 4.0"
FIXTURES_YML: ${{ matrix.fixtures }}
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }})
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Validate
run: bundle exec rake check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint
Expand All @@ -50,12 +50,13 @@ jobs:
set:
- "el7"
- "el8"
- "debian-10"
- "ubuntu-1804"
- "el9"
- "debian-11"
- "ubuntu-2004"
- "ubuntu-2204"
puppet:
- "puppet6"
- "puppet7"
- "puppet8"
env:
BUNDLE_WITHOUT: development:release
BEAKER_debug: true
Expand All @@ -70,14 +71,16 @@ jobs:
run: |
set -x
sudo apt-get remove mysql-server --purge
sudo apt-get update
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
cache-version: 2
bundler: '2.1.0'
- name: Run tests
run: bundle exec rake beaker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
13 changes: 12 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.5'
Include:
- "./**/*.rb"
- "**/*.rb"
Exclude:
- bin/*
- ".vendor/**/*"
Expand Down Expand Up @@ -63,6 +63,17 @@ Style/TrailingCommaInArguments:
Style/SymbolArray:
Description: Using percent style obscures symbolic intent of array's contents.
EnforcedStyle: brackets
RSpec/ImplicitSubject:
Enabled: false
Lint/BooleanSymbol:
Enabled: false
Naming/MethodParameterName:
AllowedNames:
- is
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/RepeatedExampleGroupBody:
Enabled: false
RSpec/MessageSpies:
EnforcedStyle: receive
Style/Documentation:
Expand Down
28 changes: 18 additions & 10 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@
set:
- el7
- el8
- ---el9
- debian-10
- ubuntu-1804
- el9
- debian-11
- ubuntu-2004
- ubuntu-2204
puppet:
- puppet6
- puppet7
- puppet8
.gitlab-ci.yml:
delete: true
.rubocop.yml:
profiles:
strict:
configs:
RSpec/MultipleMemoizedHelpers:
Enabled: false
RSpec/RepeatedExampleGroupBody:
Enabled: false
appveyor.yml:
delete: true
spec/acceptance/nodesets/el7.yml:
Expand All @@ -24,16 +32,16 @@ spec/acceptance/nodesets/el8.yml:
packages:
- crontabs
spec/acceptance/nodesets/el9.yml:
delete: true
spec/acceptance/nodesets/debian-9.yml:
delete: true
spec/acceptance/nodesets/debian-10.yml:
unmanaged: true
packages:
- crontabs
spec/acceptance/nodesets/debian-11.yml:
delete: true
spec/acceptance/nodesets/ubuntu-1804.yml:
unmanaged: true
spec/acceptance/nodesets/ubuntu-2004.yml:
unmanaged: true
packages:
- cron
spec/acceptance/nodesets/ubuntu-2204.yml:
unmanaged: true
packages:
- cron
21 changes: 5 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-lint-param-docs", require: false
gem "faraday", '~> 1.0', require: false
gem "github_changelog_generator", require: false
gem "voxpupuli-test", '7.0.0', require: false
gem "faraday", '~> 1.0', require: false
gem "github_changelog_generator", require: false
gem "puppet-blacksmith", require: false
gem "puppet-strings", require: false
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 4.29')
gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
gem "beaker-pe", require: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ slurm::conf { 'ascend':
This module has been tested on:

* RedHat/CentOS 7 x86_64
* RedHat/Rocky 8 x86_64
* RedHat/Rocky/AlmaLinux 8 x86_64
* Debian 10 x86_64
* Ubuntu 18.04 and 20.04 x86_64
* Ubuntu 20.04 x86_64
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'beaker-rspec/rake_task' if Bundler.rubygems.find_name('beaker-rspec').any?
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
Expand Down
1 change: 1 addition & 0 deletions data/os/Debian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ slurm::source_dependencies:
- libssl-dev
- libcurl4-openssl-dev
- libcgroup-dev
- libdbus-1-dev
- liblz4-dev
- libfreeipmi-dev
- python3
Expand Down
1 change: 1 addition & 0 deletions data/os/RedHat/7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ slurm::source_dependencies:
- openssl-devel
- curl-devel
- libcgroup-devel
- dbus-devel
- lz4-devel
- freeipmi-devel
- man2html
Expand Down
1 change: 1 addition & 0 deletions data/os/RedHat/8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ slurm::source_dependencies:
- openssl-devel
- curl-devel
- libcgroup
- dbus-devel
- lz4-devel
- freeipmi-devel
- python3
Expand Down
24 changes: 24 additions & 0 deletions data/os/RedHat/9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
slurm::source_dependencies:
- bzip2
- gcc
- make
- perl-devel
- munge-devel
- readline-devel
- numactl-devel
- pam-devel
- glib2-devel
- hwloc-devel
- openssl-devel
- curl-devel
- dbus-devel
- lz4-devel
- freeipmi-devel
- python3
- mariadb-devel
- libjwt-devel
- http-parser-devel
- json-c-devel
- libyaml-devel
slurm::logrotate_syslog_pid_path: /var/run/rsyslogd.pid
3 changes: 3 additions & 0 deletions data/os/Ubuntu/22.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
slurm::slurmdbd_db_charset: utf8mb3
slurm::slurmdbd_db_collate: utf8mb3_general_ci
2 changes: 2 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ defaults: # Used for any hierarchy level that omits these keys.
data_hash: yaml_data # Use the built-in YAML backend.

hierarchy:
- name: 'os name major release'
path: "os/%{facts.os.name}/%{facts.os.release.major}.yaml"
- name: 'os family major release'
path: "os/%{facts.os.family}/%{facts.os.release.major}.yaml"
- name: 'os family'
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_core_count_per_cpu.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Fact: slurm_core_count_per_cpu
#
# Purpose: Return the number of cores per physical processor
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_nodes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# slurmctld_nodes.rb

Facter.add(:slurm_nodes) do
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_processor_siblings_count.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Fact: slurm_processor_siblings_count
#
# Purpose: Return the number of siblings per physical processor
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_real_memory.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Fact: slurm_real_memory
#
# Purpose: Return the system memory rounded to nearest
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_thread_count_per_core.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Fact: slurm_thread_count_per_core
#
# Purpose: Return the number of threads per core
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurm_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# slurm_version.rb

Facter.add(:slurm_version) do
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurmctld_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# slurmctld_version.rb

Facter.add(:slurmctld_version) do
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurmd_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# slurmd_version.rb

Facter.add(:slurmd_version) do
Expand Down
2 changes: 2 additions & 0 deletions lib/facter/slurmdbd_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# slurmdbd_version.rb

Facter.add(:slurmdbd_version) do
Expand Down
3 changes: 3 additions & 0 deletions lib/facter/util/slurm.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# SLURM fact util class
class Facter::Util::Slurm
# Reads the contents of path in procfs
Expand All @@ -9,6 +11,7 @@ def self.read_procfs(path)
output = nil
output = Facter::Util::Resolution.exec(['cat ', path].join) if File.exist?(path)
return nil if output.nil?

output.strip
end

Expand Down
2 changes: 0 additions & 2 deletions manifests/client.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# @api private
class slurm::client {

contain slurm::common::munge
contain slurm::common::user
contain slurm::common::install
Expand All @@ -11,5 +10,4 @@
-> Class['slurm::common::install']
-> Class['slurm::common::setup']
-> Class['slurm::common::config']

}
Loading