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
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# Changelog

## [25.1.0](https://github.com/theforeman/puppet-foreman_proxy/tree/25.1.0) (2023-08-16)
## [25.2.0](https://github.com/theforeman/puppet-foreman_proxy/tree/25.2.0) (2023-11-15)

[Full Changelog](https://github.com/theforeman/puppet-foreman_proxy/compare/25.1.0...25.2.0)

**Implemented enhancements:**

- Mark compatible with theforeman/foreman 24.x & theforeman/tftp 9.x [\#819](https://github.com/theforeman/puppet-foreman_proxy/pull/819) ([ekohl](https://github.com/ekohl))
- Mark compatible with puppet-extlib 7.x [\#818](https://github.com/theforeman/puppet-foreman_proxy/pull/818) ([ekohl](https://github.com/ekohl))
- allow puppet/mosquitto 2.x [\#816](https://github.com/theforeman/puppet-foreman_proxy/pull/816) ([jhoblitt](https://github.com/jhoblitt))
- Fixes [\#36772](https://projects.theforeman.org/issues/36772) - Add support for container gateway sqlite timeout tuning [\#813](https://github.com/theforeman/puppet-foreman_proxy/pull/813) ([ianballou](https://github.com/ianballou))
- Add Puppet 8 support [\#811](https://github.com/theforeman/puppet-foreman_proxy/pull/811) ([bastelfreak](https://github.com/bastelfreak))

**Fixed bugs:**

- Set group owner to foreman-proxy for Salt config [\#815](https://github.com/theforeman/puppet-foreman_proxy/pull/815) ([maximiliankolb](https://github.com/maximiliankolb))

## [25.1.0](https://github.com/theforeman/puppet-foreman_proxy/tree/25.1.0) (2023-08-17)

[Full Changelog](https://github.com/theforeman/puppet-foreman_proxy/compare/25.0.0...25.1.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
3 changes: 3 additions & 0 deletions manifests/plugin/container_gateway.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#
# $sqlite_db_path:: Absolute path for the SQLite DB file to exist at
#
# $sqlite_timeout:: Database busy timeout in milliseconds
#
# === Advanced parameters:
#
# $enabled:: enables/disables the pulp plugin
Expand All @@ -21,6 +23,7 @@
Foreman_proxy::ListenOn $listen_on = 'https',
Stdlib::HTTPUrl $pulp_endpoint = "https://${facts['networking']['fqdn']}",
Stdlib::Absolutepath $sqlite_db_path = '/var/lib/foreman-proxy/smart_proxy_container_gateway.db',
Optional[Integer] $sqlite_timeout = undef,
) {
foreman_proxy::plugin::module { 'container_gateway':
version => $version,
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/salt.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
ensure => file,
content => template('foreman_proxy/plugin/salt_master.conf.erb'),
owner => 'root',
group => pick($group, $user),
group => pick($group, $foreman_proxy::user),
mode => '0640',
}
}
12 changes: 6 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "theforeman-foreman_proxy",
"version": "25.1.0",
"version": "25.2.0",
"author": "theforeman",
"summary": "Foreman Smart Proxy configuration",
"license": "GPL-3.0+",
Expand Down Expand Up @@ -28,33 +28,33 @@
},
{
"name": "theforeman/foreman",
"version_requirement": ">= 19.0.0 < 24.0.0"
"version_requirement": ">= 19.0.0 < 25.0.0"
},
{
"name": "theforeman/tftp",
"version_requirement": ">= 3.0.0 < 9.0.0"
"version_requirement": ">= 3.0.0 < 10.0.0"
},
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.19.0 < 10.0.0"
},
{
"name": "puppet/extlib",
"version_requirement": ">= 3.0.0 < 7.0.0"
"version_requirement": ">= 3.0.0 < 8.0.0"
},
{
"name": "richardc/datacat",
"version_requirement": ">= 0.6.0 < 1.0.0"
},
{
"name": "puppet/mosquitto",
"version_requirement": ">= 1.1.0 < 2.0.0"
"version_requirement": ">= 1.1.0 < 3.0.0"
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 7.0.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 9.0.0"
}
],
"operatingsystem_support": [
Expand Down
2 changes: 1 addition & 1 deletion spec/acceptance/netboot_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
end

describe 'ensure tftp client is installed' do
on hosts, puppet('resource', 'package', 'tftp', 'ensure=installed')
on hosts, 'puppet resource package tftp ensure=installed'
end

describe command("echo get /grub2/grub.cfg /tmp/downloaded_file | tftp #{fact('fqdn')}") do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
let :params do {
:pulp_endpoint => 'https://test.example.com',
:sqlite_db_path => '/dev/null.db',
:sqlite_timeout => 12345,
} end

it 'container_gateway.yml should contain the correct configuration' do
verify_exact_contents(catalogue, '/etc/foreman-proxy/settings.d/container_gateway.yml', [
'---',
':enabled: https',
':pulp_endpoint: https://test.example.com',
':sqlite_db_path: /dev/null.db'
':sqlite_db_path: /dev/null.db',
':sqlite_timeout: 12345'
])
end
end
Expand Down
3 changes: 3 additions & 0 deletions templates/plugin/container_gateway.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
:enabled: <%= @module_enabled %>
:pulp_endpoint: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::pulp_endpoint") %>
:sqlite_db_path: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::sqlite_db_path") %>
<% if scope.lookupvar("foreman_proxy::plugin::container_gateway::sqlite_timeout") -%>
:sqlite_timeout: <%= scope.lookupvar("foreman_proxy::plugin::container_gateway::sqlite_timeout") %>
<% end -%>