11 changes: 7 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,21 @@ simple tests against it after applying the module. You can run this
with:

```sh
BEAKER_setfile=debian11-64 bundle exec rake beaker
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_setfile=debian11-64 bundle exec rake beaker
```

You can replace the string `debian10` with any common operating system.
You can replace the string `debian11` with any common operating system.
The following strings are known to work:

* ubuntu1804
* ubuntu2004
* debian10
* ubuntu2204
* debian11
* centos7
* centos8
* centos9
* almalinux8
* almalinux9
* fedora36

For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).

Expand Down
36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

pkg/
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
/pkg/
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.librarian/
/Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
/.yardoc/
/Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '5.4.0'
modulesync_config_version: '7.0.0'
64 changes: 32 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

docs/
pkg/
Gemfile
Gemfile.lock
Gemfile.local
vendor/
.vendor/
spec/
Rakefile
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.github/
.librarian/
Puppetfile.lock
/docs/
/pkg/
/Gemfile
/Gemfile.lock
/Gemfile.local
/vendor/
/.vendor/
/spec/
/Rakefile
/.vagrant/
/.bundle/
/.ruby-version
/coverage/
/log/
/.idea/
/.dependencies/
/.github/
/.librarian/
/Puppetfile.lock
*.iml
.editorconfig
.fixtures.yml
.gitignore
.msync.yml
.overcommit.yml
.pmtignore
.rspec
.rspec_parallel
.rubocop.yml
.sync.yml
/.editorconfig
/.fixtures.yml
/.gitignore
/.msync.yml
/.overcommit.yml
/.pmtignore
/.rspec
/.rspec_parallel
/.rubocop.yml
/.sync.yml
.*.sw?
.yardoc/
.yardopts
Dockerfile
/.yardoc/
/.yardopts
/Dockerfile
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v10.0.0](https://github.com/voxpupuli/puppet-letsencrypt/tree/v10.0.0) (2023-09-27)

[Full Changelog](https://github.com/voxpupuli/puppet-letsencrypt/compare/v9.2.0...v10.0.0)

**Breaking changes:**

- Drop support for Debian 10 \(EOL\) [\#330](https://github.com/voxpupuli/puppet-letsencrypt/pull/330) ([evgeni](https://github.com/evgeni))
- Drop support for Ubuntu 18.04 \(EOL\) [\#329](https://github.com/voxpupuli/puppet-letsencrypt/pull/329) ([evgeni](https://github.com/evgeni))
- Drop Puppet 6 support [\#318](https://github.com/voxpupuli/puppet-letsencrypt/pull/318) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- Allow puppetlabs/inifile 6.x, puppet/epel 5.x [\#327](https://github.com/voxpupuli/puppet-letsencrypt/pull/327) ([evgeni](https://github.com/evgeni))
- puppetlabs/stdlib: Allow 9.x [\#323](https://github.com/voxpupuli/puppet-letsencrypt/pull/323) ([bastelfreak](https://github.com/bastelfreak))
- Add a `certbot_version` fact [\#322](https://github.com/voxpupuli/puppet-letsencrypt/pull/322) ([martijndegouw](https://github.com/martijndegouw))

**Fixed bugs:**

- Propagate the package\_ensure parameter to all plugins [\#321](https://github.com/voxpupuli/puppet-letsencrypt/pull/321) ([martijndegouw](https://github.com/martijndegouw))

## [v9.2.0](https://github.com/voxpupuli/puppet-letsencrypt/tree/v9.2.0) (2023-04-04)

[Full Changelog](https://github.com/voxpupuli/puppet-letsencrypt/compare/v9.1.0...v9.2.0)
Expand Down
14 changes: 7 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 5.4', :require => false
gem 'voxpupuli-test', '~> 7.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 2.0', :require => false
gem 'puppet_metadata', '~> 3.0', :require => false
end

group :development do
Expand All @@ -16,19 +16,19 @@ group :development do
end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
gem 'voxpupuli-acceptance', '~> 2.0', :require => false
end

group :release do
gem 'github_changelog_generator', '>= 1.16.1', :require => false if RUBY_VERSION >= '2.5'
gem 'voxpupuli-release', '>= 1.2.0', :require => false
gem 'puppet-strings', '>= 2.2', :require => false
gem 'github_changelog_generator', '>= 1.16.1', :require => false
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'faraday-retry', '~> 2.1', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_GEM_VERSION'] || '>= 6.0'
puppetversion = ENV['PUPPET_GEM_VERSION'] || '~> 7.24'
gem 'puppet', puppetversion, :require => false, :groups => [:test]

# vim: syntax=ruby
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,15 @@ letsencrypt::renew_deploy_hook_commands:

## Facts

* [certbot_version](#fact-certbotversion)
* [letsencrypt_directory](#fact-letsencryptdirectory)

### Fact: certbot_version

A fact that contains the current version of certbot installed on your operating system/distribution.

### Fact: letsencrypt_directory

Facts about your live certificates are available through facter. You can query the list of live certificates from puppet using `$::letsencrypt_directory` in your puppet code, hiera data or from the command line.

```
Expand Down
36 changes: 4 additions & 32 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ end
begin
require 'voxpupuli/release/rake_tasks'
rescue LoadError
# voxpupuli-release not present
else
GCGConfig.user = 'voxpupuli'
GCGConfig.project = 'puppet-letsencrypt'
end

desc "Run main 'test' task and report merged results to coveralls"
Expand All @@ -37,36 +41,4 @@ task test_with_coveralls: [:test] do
end
end

desc 'Generate REFERENCE.md'
task :reference, [:debug, :backtrace] do |t, args|
patterns = ''
Rake::Task['strings:generate:reference'].invoke(patterns, args[:debug], args[:backtrace])
end

begin
require 'github_changelog_generator/task'
require 'puppet_blacksmith'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
metadata = Blacksmith::Modulefile.new
config.future_release = "v#{metadata.version}" if metadata.version =~ /^\d+\.\d+.\d+$/
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file.\nEach new release typically also includes the latest modulesync defaults.\nThese should not affect the functionality of the module."
config.exclude_labels = %w{duplicate question invalid wontfix wont-fix modulesync skip-changelog}
config.user = 'voxpupuli'
config.project = 'puppet-letsencrypt'
end

# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /linux/
task :changelog do
puts 'Fixing line endings...'
changelog_file = File.join(__dir__, 'CHANGELOG.md')
changelog_txt = File.read(changelog_file)
new_contents = changelog_txt.gsub(%r{\r\n}, "\n")
File.open(changelog_file, "w") {|file| file.puts new_contents }
end
end

rescue LoadError
end
# vim: syntax=ruby
10 changes: 10 additions & 0 deletions lib/facter/certbot_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

Facter.add(:certbot_version) do
confine { Facter::Core::Execution.which('certbot') }

setcode do
output = Facter::Core::Execution.execute('certbot --version 2>/dev/null')
output[%r{^certbot (.*)$}, 1] if output
end
end
4 changes: 2 additions & 2 deletions manifests/plugin/dns_cloudflare.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
Boolean $manage_package = true,
Integer $propagation_seconds = 10,
) {
require letsencrypt::install
require letsencrypt

if ! $api_key and ! $api_token {
fail('No authentication method provided, please specify either api_token or api_key and api_email.')
Expand All @@ -35,7 +35,7 @@
}

package { $package_name:
ensure => installed,
ensure => $letsencrypt::package_ensure,
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dns_rfc2136.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

if $manage_package {
package { $package_name:
ensure => installed,
ensure => $letsencrypt::package_ensure,
}
}

Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dns_route53.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

if $manage_package {
package { $package_name:
ensure => installed,
ensure => $letsencrypt::package_ensure,
}
}
}
4 changes: 3 additions & 1 deletion manifests/plugin/nginx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
Boolean $manage_package = true,
String[1] $package_name = 'python3-certbot-nginx',
) {
require letsencrypt

if $manage_package {
package { $package_name:
ensure => installed,
ensure => $letsencrypt::package_ensure,
}
}
}
12 changes: 5 additions & 7 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-letsencrypt",
"version": "9.2.0",
"version": "10.0.0",
"author": "Vox Pupuli",
"summary": "Manages lets-encrypt and certbot + related certs",
"license": "Apache-2.0",
Expand Down Expand Up @@ -53,15 +53,13 @@
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"18.04",
"20.04",
"22.04"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"10",
"11"
]
},
Expand All @@ -82,21 +80,21 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 6.1.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 8.0.0"
}
],
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.13.1 < 9.0.0"
"version_requirement": ">= 4.13.1 < 10.0.0"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 2.5.0 < 6.0.0"
"version_requirement": ">= 2.5.0 < 7.0.0"
},
{
"name": "puppet/epel",
"version_requirement": ">= 3.0.1 < 5.0.0"
"version_requirement": ">= 3.0.1 < 6.0.0"
}
]
}
Loading