Showing with 1,493 additions and 969 deletions.
  1. +4 −0 .github/CONTRIBUTING.md
  2. +5 −0 .gitignore
  3. +1 −1 .msync.yml
  4. +63 −0 .overcommit.yml
  5. +20 −0 .pmtignore
  6. +1 −0 .rspec_parallel
  7. +17 −2 .rubocop.yml
  8. +17 −16 .travis.yml
  9. +1 −0 .yardopts
  10. +163 −90 CHANGELOG.md
  11. +15 −9 Gemfile
  12. +8 −8 README.md
  13. +11 −0 Rakefile
  14. +29 −74 manifests/init.pp
  15. +14 −4 manifests/params.pp
  16. +19 −7 metadata.json
  17. +13 −0 spec/acceptance/nodesets/archlinux-2-x64.yml
  18. +15 −0 spec/acceptance/nodesets/centos-6-x64.yml
  19. +15 −0 spec/acceptance/nodesets/centos-7-x64.yml
  20. +2 −1 spec/acceptance/nodesets/docker/centos-7.yml
  21. +1 −0 spec/acceptance/nodesets/docker/debian-8.yml
  22. +1 −1 spec/acceptance/nodesets/docker/ubuntu-16.04.yml
  23. +31 −0 spec/acceptance/nodesets/ec2/amazonlinux-2016091.yml
  24. +34 −0 spec/acceptance/nodesets/ec2/image_templates.yaml
  25. +29 −0 spec/acceptance/nodesets/ec2/rhel-73-x64.yml
  26. +29 −0 spec/acceptance/nodesets/ec2/sles-12sp2-x64.yml
  27. +29 −0 spec/acceptance/nodesets/ec2/ubuntu-1604-x64.yml
  28. +29 −0 spec/acceptance/nodesets/ec2/windows-2016-base-x64.yml
  29. +1 −1 spec/acceptance/nodesets/fedora-25-x64.yml
  30. +181 −0 spec/classes/debian_spec.rb
  31. +128 −0 spec/classes/other_debians_spec.rb
  32. +131 −0 spec/classes/ubuntu_spec.rb
  33. +387 −752 spec/classes/unattended_upgrades_spec.rb
  34. +1 −1 spec/spec_helper.rb
  35. +7 −2 templates/unattended-upgrades.erb
  36. +6 −0 types/age.pp
  37. +9 −0 types/auto.pp
  38. +6 −0 types/backup.pp
  39. +6 −0 types/mail.pp
  40. +8 −0 types/options.pp
  41. +6 −0 types/upgradeable_packages.pp
4 changes: 4 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,7 @@ If you don't want to have to recreate the virtual machine every time you
can use `BEAKER_DESTROY=no` and `BEAKER_PROVISION=no`. On the first run you will
at least need `BEAKER_PROVISION` set to yes (the default). The Vagrantfile
for the created virtual machines will be in `.vagrant/beaker_vagrant_fies`.

The easiest way to debug in a docker container is to open a shell:

docker exec -it -u root ${container_id_or_name} bash
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ spec/fixtures/manifests/
spec/fixtures/modules/
.vagrant/
.bundle/
.ruby-version
coverage/
log/
.idea/
.dependencies/
.librarian/
Puppetfile.lock
*.iml
.*.sw?
.yardoc/
Guardfile
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
modulesync_config_version: '0.16.7'
modulesync_config_version: '0.21.3'
63 changes: 63 additions & 0 deletions .overcommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Managed by https://github.com/voxpupuli/modulesync_configs
#
# Hooks are only enabled if you take action.
#
# To enable the hooks run:
#
# ```
# bundle exec overcommit --install
# # ensure .overcommit.yml does not harm to you and then
# bundle exec overcommit --sign
# ```
#
# (it will manage the .git/hooks directory):
#
# Examples howto skip a test for a commit or push:
#
# ```
# SKIP=RuboCop git commit
# SKIP=PuppetLint git commit
# SKIP=RakeTask git push
# ```
#
# Don't invoke overcommit at all:
#
# ```
# OVERCOMMIT_DISABLE=1 git commit
# ```
#
# Read more about overcommit: https://github.com/brigade/overcommit
#
# To manage this config yourself in your module add
#
# ```
# .overcommit.yml:
# unmanaged: true
# ```
#
# to your modules .sync.yml config
---
PreCommit:
RuboCop:
enabled: true
description: 'Runs rubocop on modified files only'
command: ['bundle', 'exec', 'rubocop']
PuppetLint:
enabled: true
description: 'Runs puppet-lint on modified files only'
command: ['bundle', 'exec', 'puppet-lint']
YamlSyntax:
enabled: true
JsonSyntax:
enabled: true
TrailingWhitespace:
enabled: true

PrePush:
RakeTarget:
enabled: true
description: 'Run rake targets'
targets:
- 'test'
- 'rubocop'
command: [ 'bundle', 'exec', 'rake' ]
20 changes: 20 additions & 0 deletions .pmtignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
docs/
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/
1 change: 1 addition & 0 deletions .rspec_parallel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--format progress
19 changes: 17 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ AllCops:
- .vendor/**/*
- pkg/**/*
- spec/fixtures/**/*
- Gemfile
- Rakefile
- Guardfile
Lint/ConditionPosition:
Enabled: True

Expand Down Expand Up @@ -74,7 +77,7 @@ Style/WhileUntilModifier:
Lint/AmbiguousRegexpLiteral:
Enabled: True

Lint/Eval:
Security/Eval:
Enabled: True

Lint/BlockAlignment:
Expand Down Expand Up @@ -302,7 +305,7 @@ Style/EmptyLiteral:
Metrics/LineLength:
Enabled: False

Style/MethodCallParentheses:
Style/MethodCallWithoutArgsParentheses:
Enabled: True

Style/MethodDefParentheses:
Expand Down Expand Up @@ -500,6 +503,10 @@ Style/ClosingParenthesisIndentation:

# RSpec

RSpec/BeforeAfterAll:
Exclude:
- spec/acceptance/**/*

# We don't use rspec in this way
RSpec/DescribeClass:
Enabled: False
Expand All @@ -518,3 +525,11 @@ RSpec/RepeatedDescription:

RSpec/NestedGroups:
Enabled: False

# this is broken on ruby1.9
Style/IndentHeredoc:
Enabled: False

# disable Yaml safe_load. This is needed to support ruby2.0.0 development envs
Security/YAMLLoad:
Enabled: false
33 changes: 17 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sudo: false
dist: trusty
language: ruby
cache: bundler
bundler_args: --without system_tests development
before_install:
- bundle -v
- rm Gemfile.lock || true
Expand All @@ -15,26 +15,27 @@ script:
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" FUTURE_PARSER="yes" CHECK=test
- rvm: 2.1.9
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1.9
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.2.6
- rvm: 2.2.7
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.3.3
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
- rvm: 2.3.3
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.3.3
- rvm: 2.3.4
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=test
allow_failures:
- rvm: 2.4.0
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 5.0" CHECK=test
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=rubocop
- rvm: 2.4.1
bundler_args: --without system_tests development
env: PUPPET_VERSION="~> 4.0" CHECK=build DEPLOY_TO_FORGE=yes
branches:
only:
- master
Expand Down
1 change: 1 addition & 0 deletions .yardopts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
--markup markdown
--output-dir docs/
Loading