Showing with 114 additions and 124 deletions.
  1. +7 −4 .github/CONTRIBUTING.md
  2. +0 −3 .github/SECURITY.md
  3. +7 −2 .github/workflows/ci.yml
  4. +1 −1 .github/workflows/release.yml
  5. +18 −18 .gitignore
  6. +1 −1 .msync.yml
  7. +33 −32 .pmtignore
  8. +1 −2 .rubocop.yml
  9. +13 −1 CHANGELOG.md
  10. +5 −7 Gemfile
  11. +15 −15 REFERENCE.md
  12. +4 −32 Rakefile
  13. +4 −4 lib/puppet/provider/windowsfeature/default.rb
  14. +2 −2 metadata.json
  15. +3 −0 spec/spec_helper.rb
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
3 changes: 0 additions & 3 deletions .github/SECURITY.md

This file was deleted.

9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

name: CI

on: pull_request
on:
pull_request: {}
push:
branches:
- main
- master

concurrency:
group: ${{ github.ref_name }}
Expand All @@ -13,6 +18,6 @@ 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'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
release:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v1
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
with:
allowed_owner: 'voxpupuli'
secrets:
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.3.0'
modulesync_config_version: '7.3.0'
65 changes: 33 additions & 32 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
# 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
/HISTORY.md
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
inherit_from: .rubocop_todo.yml

# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

inherit_from: .rubocop_todo.yml
inherit_gem:
voxpupuli-test: rubocop.yml
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ 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.

## [v5.0.0](https://github.com/voxpupuli/puppet-windowsfeature/tree/v5.0.0) (2024-02-16)

[Full Changelog](https://github.com/voxpupuli/puppet-windowsfeature/compare/v4.0.0...v5.0.0)

**Breaking changes:**

- Drop Puppet 6 support [\#153](https://github.com/voxpupuli/puppet-windowsfeature/pull/153) ([bastelfreak](https://github.com/bastelfreak))

**Implemented enhancements:**

- Add Puppet 8 support [\#155](https://github.com/voxpupuli/puppet-windowsfeature/pull/155) ([bastelfreak](https://github.com/bastelfreak))

## [v4.0.0](https://github.com/voxpupuli/puppet-windowsfeature/tree/v4.0.0) (2022-06-03)

[Full Changelog](https://github.com/voxpupuli/puppet-windowsfeature/compare/v3.2.2...v4.0.0)
Expand All @@ -30,7 +42,7 @@ These should not affect the functionality of the module.

- Dependency and Support Bump [\#148](https://github.com/voxpupuli/puppet-windowsfeature/pull/148) ([trevor-vaughan](https://github.com/trevor-vaughan))
- \(GH-143\) Add puppet 7 support [\#145](https://github.com/voxpupuli/puppet-windowsfeature/pull/145) ([TraGicCode](https://github.com/TraGicCode))
- Ignore PowerShell progress bar [\#139](https://github.com/voxpupuli/puppet-windowsfeature/pull/139) ([AndyAdrian-OP](https://github.com/AndyAdrian-OP))
- Ignore PowerShell progress bar [\#139](https://github.com/voxpupuli/puppet-windowsfeature/pull/139) ([Andy-Adrian](https://github.com/Andy-Adrian))
- Remove duplicate CONTRIBUTING.md file [\#133](https://github.com/voxpupuli/puppet-windowsfeature/pull/133) ([dhoppe](https://github.com/dhoppe))
- Remove Linux acceptance nodesets [\#128](https://github.com/voxpupuli/puppet-windowsfeature/pull/128) ([ekohl](https://github.com/ekohl))

Expand Down
12 changes: 5 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', '~> 1.0', :require => false
gem 'puppet_metadata', '~> 3.5', :require => false
end

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

group :system_tests do
gem 'voxpupuli-acceptance', '~> 1.0', :require => false
gem 'voxpupuli-acceptance', '~> 3.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 'voxpupuli-release', '~> 3.0', :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
30 changes: 15 additions & 15 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,38 @@ Default value: `present`

The following parameters are available in the `windowsfeature` type.

* [`installmanagementtools`](#installmanagementtools)
* [`installsubfeatures`](#installsubfeatures)
* [`name`](#name)
* [`provider`](#provider)
* [`restart`](#restart)
* [`source`](#source)
* [`installmanagementtools`](#-windowsfeature--installmanagementtools)
* [`installsubfeatures`](#-windowsfeature--installsubfeatures)
* [`name`](#-windowsfeature--name)
* [`provider`](#-windowsfeature--provider)
* [`restart`](#-windowsfeature--restart)
* [`source`](#-windowsfeature--source)

##### <a name="installmanagementtools"></a>`installmanagementtools`
##### <a name="-windowsfeature--installmanagementtools"></a>`installmanagementtools`

Valid values: ``true``, ``false``, `yes`, `no`
Valid values: `true`, `false`, `yes`, `no`


##### <a name="installsubfeatures"></a>`installsubfeatures`
##### <a name="-windowsfeature--installsubfeatures"></a>`installsubfeatures`

Valid values: ``true``, ``false``, `yes`, `no`
Valid values: `true`, `false`, `yes`, `no`


##### <a name="name"></a>`name`
##### <a name="-windowsfeature--name"></a>`name`

namevar


##### <a name="provider"></a>`provider`
##### <a name="-windowsfeature--provider"></a>`provider`

The specific backend to use for this `windowsfeature` resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.

##### <a name="restart"></a>`restart`
##### <a name="-windowsfeature--restart"></a>`restart`

Valid values: ``true``, ``false``, `yes`, `no`
Valid values: `true`, `false`, `yes`, `no`


##### <a name="source"></a>`source`
##### <a name="-windowsfeature--source"></a>`source`


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-windowsfeature'
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 = metadata.metadata['name']
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
8 changes: 4 additions & 4 deletions lib/puppet/provider/windowsfeature/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
confine :kernel => :windows
# powershell, powershell, powershell. where to find it.
commands :ps =>
if File.exist?("#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe")
"#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe"
elsif File.exist?("#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe")
"#{ENV['SYSTEMROOT']}\\system32\\WindowsPowershell\\v1.0\\powershell.exe"
if File.exist?("#{ENV.fetch('SYSTEMROOT', nil)}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe")
"#{ENV.fetch('SYSTEMROOT', nil)}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe"
elsif File.exist?("#{ENV.fetch('SYSTEMROOT', nil)}\\system32\\WindowsPowershell\\v1.0\\powershell.exe")
"#{ENV.fetch('SYSTEMROOT', nil)}\\system32\\WindowsPowershell\\v1.0\\powershell.exe"
else
'powershell.exe'
end
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-windowsfeature",
"version": "4.0.0",
"version": "5.0.0",
"author": "Vox Pupuli",
"license": "MIT",
"summary": "A module that will turn windows features on or off for Windows Server 2008 and above",
Expand Down Expand Up @@ -29,7 +29,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 6.1.0 < 8.0.0"
"version_requirement": ">= 7.0.0 < 9.0.0"
}
]
}
Loading