19 changes: 17 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,24 @@ you must set an environment variable such as:

export PUPPET_VERSION="~> 4.2.0"

Install the dependencies like so...
You can install all needed gems for spec tests into the modules directory by
running:

bundle install
```sh
bundle install --path .vendor/ --without development --without system_tests --without release
```

If you also want to run acceptance tests:

```sh
bundle install --path .vendor/ --without development --with system_tests --without release
```

Our all in one solution if you don't know if you need to install or update gems:

```sh
bundle install --path .vendor/ --without development --with system_tests --without release; bundle update; bundle clean
```

## Syntax and style

Expand Down
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ Thank you for contributing to this project!
- Our vulnerabilities reporting process is at https://voxpupuli.org/security/
-->
#### Pull Request (PR) description
<!--
Replace this comment with a description of your pull request.
-->

#### This Pull Request (PR) fixes the following issues
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '1.5.0'
modulesync_config_version: '1.9.2'
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Style/HashSyntax:
Style/RedundantReturn:
Enabled: True

Style/EndOfLine:
Layout/EndOfLine:
Enabled: False

Lint/AmbiguousOperator:
Expand Down
21 changes: 11 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,29 @@ sudo: false
dist: trusty
language: ruby
cache: bundler
# related to https://github.com/rubygems/rubygems/issues/2123
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v
- 'rm -f Gemfile.lock'
- 'gem update --system'
- 'gem install bundler'
script:
- 'bundle exec rake $CHECK'
matrix:
fast_finish: true
include:
- rvm: 2.1.9
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=16
- rvm: 2.4.2
env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.5.1
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls
- rvm: 2.4.2
- rvm: 2.4.4
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=rubocop
- rvm: 2.4.2
- rvm: 2.5.1
bundler_args: --without system_tests development release
env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
Expand Down
29 changes: 23 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ 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.

## [v3.2.0](https://github.com/voxpupuli/puppet-unattended_upgrades/tree/v3.2.0) (2018-06-12)

[Full Changelog](https://github.com/voxpupuli/puppet-unattended_upgrades/compare/v3.1.0...v3.2.0)

**Implemented enhancements:**

- Allow configuration of Unattended-Upgrade::Sender parameter [\#119](https://github.com/voxpupuli/puppet-unattended_upgrades/issues/119)
- Optional argument for specifing the Unattended-Upgrade::Sender config flag [\#120](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/120) ([LarsErikP](https://github.com/LarsErikP))

**Closed issues:**

- \(Confirm\) Ubuntu 18.04 support [\#124](https://github.com/voxpupuli/puppet-unattended_upgrades/issues/124)
- Typo - README.md - Reference/options "force\_connew" [\#109](https://github.com/voxpupuli/puppet-unattended_upgrades/issues/109)

**Merged pull requests:**

- Add Ubuntu 18.04 LTS "bionic" to the list of supported OSes \(fixes \#124\) [\#125](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/125) ([mpdude](https://github.com/mpdude))
- Remove docker nodesets [\#123](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/123) ([bastelfreak](https://github.com/bastelfreak))
- drop EOL OSs; fix puppet version range [\#121](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/121) ([bastelfreak](https://github.com/bastelfreak))
- Fix typo [\#117](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/117) ([6uhrmittag](https://github.com/6uhrmittag))

## [v3.1.0](https://github.com/voxpupuli/puppet-unattended_upgrades/tree/v3.1.0) (2017-12-09)

[Full Changelog](https://github.com/voxpupuli/puppet-unattended_upgrades/compare/v3.0.1...v3.1.0)
Expand All @@ -14,8 +35,8 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- release 3.1.0 [\#116](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/116) ([bastelfreak](https://github.com/bastelfreak))
- Add Ubuntu artful [\#115](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/115) ([danielhoherd](https://github.com/danielhoherd))
- Release 3.0.1 [\#113](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/113) ([alexjfisher](https://github.com/alexjfisher))

## [v3.0.1](https://github.com/voxpupuli/puppet-unattended_upgrades/tree/v3.0.1) (2017-10-28)

Expand All @@ -28,7 +49,6 @@ These should not affect the functionality of the module.
**Merged pull requests:**

- Don't `contain` `apt` but `include` instead [\#111](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/111) ([alexjfisher](https://github.com/alexjfisher))
- Release 3.0.0 [\#104](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/104) ([bastelfreak](https://github.com/bastelfreak))

## [v3.0.0](https://github.com/voxpupuli/puppet-unattended_upgrades/tree/v3.0.0) (2017-07-07)

Expand Down Expand Up @@ -67,7 +87,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- release 2.2.0 [\#81](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/81) ([bastelfreak](https://github.com/bastelfreak))
- Bump min version\_requirement for Puppet [\#79](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/79) ([juniorsysadmin](https://github.com/juniorsysadmin))
- Include the release pocket on Ubuntu Xenial and Yakkety. [\#75](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/75) ([MichaelGooden](https://github.com/MichaelGooden))
- Add missing badges [\#73](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/73) ([dhoppe](https://github.com/dhoppe))
Expand Down Expand Up @@ -122,7 +141,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- release: 1.1.1 [\#47](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/47) ([daenney](https://github.com/daenney))
- Fix typo [\#46](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/46) ([mcanevet](https://github.com/mcanevet))

## [v1.1.0](https://github.com/voxpupuli/puppet-unattended_upgrades/tree/v1.1.0) (2016-01-09)
Expand All @@ -147,7 +165,6 @@ These should not affect the functionality of the module.

**Merged pull requests:**

- prepare release of 1.1.0 [\#45](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/45) ([igalic](https://github.com/igalic))
- Doc and implementation fixes [\#44](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/44) ([daenney](https://github.com/daenney))
- Remediate rubocop offenses [\#43](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/43) ([rnelson0](https://github.com/rnelson0))
- cleanup\(params\) make linter happy [\#42](https://github.com/voxpupuli/puppet-unattended_upgrades/pull/42) ([igalic](https://github.com/igalic))
Expand Down Expand Up @@ -202,4 +219,4 @@ These should not affect the functionality of the module.



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
15 changes: 8 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'puppetlabs_spec_helper', '~> 2.5.0', :require => false
gem 'puppetlabs_spec_helper', '~> 2.6.0', :require => false
gem 'rspec-puppet', '~> 2.5', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'rspec-puppet-utils', :require => false
Expand All @@ -25,7 +25,7 @@ group :test do
gem 'redcarpet', :require => false
gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0'
gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0'
gem 'mocha', '>= 1.2.1', :require => false
gem 'mocha', '~> 1.4.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2'
Expand All @@ -40,7 +40,7 @@ group :development do
end

group :system_tests do
gem 'winrm', :require => false
gem 'winrm', :require => false
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
else
Expand All @@ -51,13 +51,14 @@ group :system_tests do
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
gem 'serverspec', :require => false
gem 'beaker-hostgenerator', '>= 1.1.10', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-module_install_helper', :require => false
end

group :release do
gem 'github_changelog_generator', :require => false if RUBY_VERSION >= '2.2.2'
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' if RUBY_VERSION >= '2.2.2'
gem 'puppet-blacksmith', :require => false
gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem'
gem 'puppet-strings', '~> 1.0', :require => false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ altering some of the default settings.
* `install_on_shutdown` (`false`): Install updates on shutdown instead of in the
background.
* `legacy_origin` (`true` for Debian (squeeze), Ubuntu (precise, trusty, utopic,
vivid, wily, xenial, yakkety, zesty, artful, and default), `false` for Debian (wheezy and default)):
vivid, wily, xenial, yakkety, zesty, artful, bionic and default), `false` for Debian (wheezy and default)):
Use the legacy `Unattended-Upgrade::Allowed-Origins` setting or the modern `Unattended-Upgrade::Origins-Pattern`.
* `mail`: A hash to configure email behaviour with two possible keys:
* `only_on_error` (`true`): Only send mail when something went wrong
Expand Down Expand Up @@ -158,7 +158,7 @@ altering some of the default settings.
is available, don't prompt. If no default can be found, you will be prompted
unless one of the confold or confnew options is also given
* `force_confold` (`true`): Always use the old config files, don't prompt
* `force_connew` (`false`): Always use the new config files, don't prompt
* `force_confnew` (`false`): Always use the new config files, don't prompt
* `force_conmiss` (`false`): Always install missing config files

## Limitations
Expand Down
27 changes: 27 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ exclude_paths = %w(
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc 'Auto-correct puppet-lint offenses'
task 'lint:auto_correct' do
PuppetLint.configuration.fix = true
Rake::Task[:lint].invoke
end

desc 'Run acceptance tests'
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
Expand All @@ -48,6 +54,27 @@ task test_with_coveralls: [:test] do
end
end

desc "Print supported beaker sets"
task 'beaker_sets', [:directory] do |t, args|
directory = args[:directory]

metadata = JSON.load(File.read('metadata.json'))

(metadata['operatingsystem_support'] || []).each do |os|
(os['operatingsystemrelease'] || []).each do |release|
if directory
beaker_set = "#{directory}/#{os['operatingsystem'].downcase}-#{release}"
else
beaker_set = "#{os['operatingsystem'].downcase}-#{release}-x64"
end

filename = "spec/acceptance/nodesets/#{beaker_set}.yml"

puts beaker_set if File.exists? filename
end
end
end

begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Array $origins = $::unattended_upgrades::params::origins,
String $package_ensure = installed,
Optional[Integer[0]] $random_sleep = undef,
Optional[String] $sender = undef,
Integer[0] $size = 0,
Integer[0] $update = 1,
Integer[0] $upgrade = 1,
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
'${distro_id}:${distro_codename}-security', #lint:ignore:single_quote_string_with_variables
]
}
'xenial', 'yakkety', 'zesty', 'artful': {
'xenial', 'yakkety', 'zesty', 'artful', 'bionic': {
$legacy_origin = true
$origins = [
'${distro_id}:${distro_codename}', #lint:ignore:single_quote_string_with_variables
Expand Down
10 changes: 4 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-unattended_upgrades",
"version": "3.1.0",
"version": "3.2.0",
"author": "Vox Pupuli",
"summary": "Provides an interface for managing Apt unattended_upgrades with Puppet",
"license": "Apache-2.0",
Expand All @@ -19,28 +19,26 @@
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"6",
"7",
"8",
"9"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"12.04",
"14.04",
"16.04",
"16.10",
"17.04",
"17.10"
"17.10",
"18.04"
]
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 4.7.1 < 6.0.0"
"version_requirement": ">= 4.10.0 < 6.0.0"
}
],
"dependencies": [
Expand Down
19 changes: 0 additions & 19 deletions spec/acceptance/nodesets/docker/centos-5.yml

This file was deleted.

20 changes: 0 additions & 20 deletions spec/acceptance/nodesets/docker/centos-6.yml

This file was deleted.

19 changes: 0 additions & 19 deletions spec/acceptance/nodesets/docker/centos-7.yml

This file was deleted.

Loading