Showing with 61 additions and 41 deletions.
  1. +1 −3 .github/workflows/ci.yml
  2. +2 −1 .gitignore
  3. +16 −0 CHANGELOG.md
  4. +1 −1 CONTRIBUTING.md
  5. +5 −13 Gemfile
  6. +0 −2 data/Ubuntu-18.04.yaml
  7. +1 −0 data/common.yaml
  8. +2 −0 manifests/init.pp
  9. +4 −2 manifests/install.pp
  10. +5 −13 metadata.json
  11. +23 −5 spec/classes/init_spec.rb
  12. +1 −1 spec/spec_helper_acceptance.rb
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI

on:
pull_request:
schedule:
- cron: '4 4 * * *'


concurrency:
Expand All @@ -14,7 +12,7 @@ concurrency:
jobs:
puppet:
name: Puppet
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
with:
pidfile_workaround: 'false'
rubocop: false
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ vendor/
.ruby-*

## rspec
spec/fixtures/
spec/fixtures/manifests
spec/fixtures/modules
junit/

## Puppet module
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [9.0.0](https://github.com/theforeman/puppet-tftp/tree/9.0.0) (2023-11-14)

[Full Changelog](https://github.com/theforeman/puppet-tftp/compare/8.0.0...9.0.0)

**Breaking changes:**

- Drop Fedora support [\#145](https://github.com/theforeman/puppet-tftp/pull/145) ([ekohl](https://github.com/ekohl))
- Drop Puppet 6 support [\#144](https://github.com/theforeman/puppet-tftp/pull/144) ([ekohl](https://github.com/ekohl))
- Drop Ubuntu 18.04 & Debian 9, add Red Hat 9 support [\#142](https://github.com/theforeman/puppet-tftp/pull/142) ([dvo-rak](https://github.com/dvo-rak))

**Implemented enhancements:**

- Add Puppet 8 support [\#140](https://github.com/theforeman/puppet-tftp/pull/140) ([bastelfreak](https://github.com/bastelfreak))
- puppetlabs/stdlib: Allow 9.x [\#139](https://github.com/theforeman/puppet-tftp/pull/139) ([bastelfreak](https://github.com/bastelfreak))
- make syslinux package management optional [\#138](https://github.com/theforeman/puppet-tftp/pull/138) ([UiP9AV6Y](https://github.com/UiP9AV6Y))

## [8.0.0](https://github.com/theforeman/puppet-tftp/tree/8.0.0) (2022-10-27)

[Full Changelog](https://github.com/theforeman/puppet-tftp/compare/7.2.0...8.0.0)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ More filter info available [here](https://relishapp.com/rspec/rspec-core/v/3-9/d
To run OS specific tests:

```shell
SPEC_FACTS_OS=redhat-7-x86_64 bundle exec rspec spec/classes/foreman_spec.rb
SPEC_FACTS_OS=redhat-8-x86_64 bundle exec rspec spec/classes/foreman_spec.rb
```

If you have more than one version of `redhat` OS specified in metadata.json,
Expand Down
18 changes: 5 additions & 13 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,16 @@

source 'https://rubygems.org'

gem 'puppet', ENV['PUPPET_GEM_VERSION'] || '>= 5.5', groups: ['development', 'test']
gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '>= 7'), groups: ['development', 'test']
gem 'rake'

gem 'kafo_module_lint', {"groups"=>["test"]}
gem 'puppet-lint-empty_string-check', {"groups"=>["test"]}
gem 'puppet-lint-file_ensure-check', {"groups"=>["test"]}
gem 'puppet-lint-param-docs', '>= 1.3.0', {"groups"=>["test"]}
gem 'puppet-lint-spaceship_operator_without_tag-check', {"groups"=>["test"]}
gem 'puppet-lint-strict_indent-check', {"groups"=>["test"]}
gem 'puppet-lint-undef_in_function-check', {"groups"=>["test"]}
gem 'voxpupuli-test', '~> 5.0', {"groups"=>["test"]}
gem 'puppet-lint-spaceship_operator_without_tag-check', '~> 1.0', {"groups"=>["test"]}
gem 'voxpupuli-test', '~> 7.0', {"groups"=>["test"]}
gem 'github_changelog_generator', '>= 1.15.0', {"groups"=>["development"]}
gem 'puppet_metadata', '~> 1.3'
gem 'puppet_metadata', '~> 3.4'
gem 'puppet-blacksmith', '>= 6.0.0', {"groups"=>["development"]}
gem 'voxpupuli-acceptance', '~> 1.0', {"groups"=>["system_tests"]}
gem 'voxpupuli-acceptance', '~> 2.0', {"groups"=>["system_tests"]}
gem 'puppetlabs_spec_helper', {"groups"=>["system_tests"]}

# Pin rdoc to prevent updating bundled psych (https://github.com/ruby/rdoc/commit/ebe185c8775b2afe844eb3da6fa78adaa79e29a4)
gem 'rdoc', '< 6.4'

# vim:ft=ruby
2 changes: 0 additions & 2 deletions data/Ubuntu-18.04.yaml

This file was deleted.

1 change: 1 addition & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
tftp::manage_root_dir: true
tftp::manage_syslinux_package: true
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
# @param root Configures the root directory for the TFTP server
# @param package Name of the TFTP server package
# @param syslinux_package Name of the syslinux package, essential for pxe boot
# @param manage_syslinux_package manages the syslinux package, defaults to true
# @param manage_root_dir manages the root dir, which tftpd will serve, defaults to true
# @param service Name of the TFTP service, when daemon is true
# @param service_provider Override TFTP service provider, when daemon is true
class tftp (
Stdlib::Absolutepath $root,
String $package,
Variant[String, Array[String]] $syslinux_package,
Boolean $manage_syslinux_package,
Boolean $manage_root_dir,
Optional[String] $service = undef,
Optional[String] $service_provider = undef,
Expand Down
6 changes: 4 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
alias => 'tftp-server',
}

package { $tftp::syslinux_package:
ensure => installed,
if $tftp::manage_syslinux_package {
package { $tftp::syslinux_package:
ensure => installed,
}
}
}
18 changes: 5 additions & 13 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-tftp",
"version": "8.0.0",
"version": "9.0.0",
"author": "theforeman",
"summary": "TFTP server configuration",
"license": "GPL-3.0+",
Expand All @@ -15,21 +15,22 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.1 < 9.0.0"
"version_requirement": ">= 4.13.1 < 10.0.0"
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 6.15.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 9.0.0"
}
],
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8"
"8",
"9"
]
},
{
Expand All @@ -46,25 +47,16 @@
"7"
]
},
{
"operatingsystem": "Fedora",
"operatingsystemrelease": [
"30",
"31"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"9",
"10",
"11"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04"
]
},
Expand Down
28 changes: 23 additions & 5 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
let(:syslinux_package) do
case facts[:osfamily]
when 'Debian'
%w[syslinux-common pxelinux]
else
%w[syslinux]
end
end

it { should compile.with_all_deps }

Expand All @@ -27,11 +35,8 @@
.with_ensure('installed')
.with_alias('tftp-server')

if facts[:operatingsystem] == 'Debian' || facts[:operatingsystem] == 'Ubuntu'
should contain_package('pxelinux').with_ensure('installed')
should contain_package('syslinux-common').with_ensure('installed')
else
should contain_package('syslinux').with_ensure('installed')
syslinux_package.each do |p|
should contain_package(p).with_ensure('installed')
end
end

Expand Down Expand Up @@ -94,6 +99,19 @@
should contain_package('my-own-syslinux').with_ensure('installed')
end
end

context 'with syslinux package management set to false' do
let :params do
{
manage_syslinux_package: false
}
end
it 'should not install a syslinux package' do
syslinux_package.each do |p|
should_not contain_package(p)
end
end
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'voxpupuli/acceptance/spec_helper_acceptance'

ENV['BEAKER_setfile'] ||= 'centos7-64{hostname=centos7-64.example.com}'
ENV['BEAKER_setfile'] ||= 'centos8-64{hostname=centos8-64.example.com}'

configure_beaker(modules: :fixtures) do |host|
if fact_on(host, 'os.family') == 'RedHat'
Expand Down