+.git/
.*.sw[op]
.metadata
.yardoc
+.git/
.*.sw[op]
.metadata
.yardoc
Style/Documentation:
Exclude:
- lib/puppet/parser/functions/**/*
+ - spec/**/*
Style/WordArray:
EnforcedStyle: brackets
Style/CollectionMethods:
Enabled: true
Layout/EndOfLine:
Enabled: false
+Layout/IndentHeredoc:
+ Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
- mswin
- mingw
- x64_mingw
- - gem: beaker
- version: '~> 3.13'
- from_env: BEAKER_VERSION
- - gem: beaker-abs
- from_env: BEAKER_ABS_VERSION
- version: '~> 0.1'
- - gem: beaker-pe
- - gem: beaker-hostgenerator
- from_env: BEAKER_HOSTGENERATOR_VERSION
- - gem: beaker-rspec
- from_env: BEAKER_RSPEC_VERSION
appveyor.yml:
delete: true
- 'bundle exec rake $CHECK'
bundler_args: --without system_tests
rvm:
- - 2.4.1
+ - 2.4.4
env:
global:
- BEAKER_PUPPET_COLLECTION=puppet5 PUPPET_GEM_VERSION="~> 5.0"
-
bundler_args:
dist: trusty
- env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/debian-8
- rvm: 2.4.1
+ env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/debian-8 BEAKER_TESTMODE=apply
+ rvm: 2.4.4
script: bundle exec rake beaker
services: docker
sudo: required
-
bundler_args:
dist: trusty
- env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/ubuntu-14.04
- rvm: 2.4.1
+ env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
+ rvm: 2.4.4
script: bundle exec rake beaker
services: docker
sudo: required
-# Changelog
+# Change log
-All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
-and this project adheres to [Semantic Versioning](http://semver.org).
+All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
+
+## [5.0.1](https://github.com/puppetlabs/puppetlabs-apt/tree/5.0.1) (2018-07-27)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-apt/compare/5.0.0...5.0.1)
+
+### Fixed
+
+- \(MODULES-7540\) - add apt-transport-https with https [\#775](https://github.com/puppetlabs/puppetlabs-apt/pull/775) ([tphoney](https://github.com/tphoney))
+
+## [5.0.0](https://github.com/puppetlabs/puppetlabs-apt/tree/5.0.0) (2018-07-18)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-apt/compare/4.5.1...5.0.0)
+
+### Changed
+
+- \[FM-6956\] Removal of unsupported Debian 7 from apt [\#760](https://github.com/puppetlabs/puppetlabs-apt/pull/760) ([david22swan](https://github.com/david22swan))
+
+### Added
+
+- \(MODULES-7467\) Update apt to support Ubuntu 18.04 [\#769](https://github.com/puppetlabs/puppetlabs-apt/pull/769) ([david22swan](https://github.com/david22swan))
+- Support managing login configurations in /etc/apt/auth.conf [\#752](https://github.com/puppetlabs/puppetlabs-apt/pull/752) ([antaflos](https://github.com/antaflos))
+
+### Fixed
+
+- \(MODULES-7327\) - Update README with supported OS [\#767](https://github.com/puppetlabs/puppetlabs-apt/pull/767) ([pmcmaw](https://github.com/pmcmaw))
+- \(bugfix\) Dont run ftp tests in travis [\#766](https://github.com/puppetlabs/puppetlabs-apt/pull/766) ([tphoney](https://github.com/tphoney))
+- \(maint\) make apt testing more stable, cleanup [\#764](https://github.com/puppetlabs/puppetlabs-apt/pull/764) ([tphoney](https://github.com/tphoney))
+- Remove .length from variable $pin\_release in app [\#754](https://github.com/puppetlabs/puppetlabs-apt/pull/754) ([paladox](https://github.com/paladox))
+- Replace UTF-8 whitespace in comment [\#748](https://github.com/puppetlabs/puppetlabs-apt/pull/748) ([bernhardschmidt](https://github.com/bernhardschmidt))
+- Fix "E: Unable to locate package -y" [\#747](https://github.com/puppetlabs/puppetlabs-apt/pull/747) ([aboks](https://github.com/aboks))
+- Fix automatic coercion warning [\#743](https://github.com/puppetlabs/puppetlabs-apt/pull/743) ([smortex](https://github.com/smortex))
## Supported Release [4.5.1]
### Summary
* 87777d8 Typo in README
* f848bac First commit
+[5.0.1]:https://github.com/puppetlabs/puppetlabs-apt/compare/5.0.0...5.0.1
+[5.0.0]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.5.1...5.0.0
+[4.5.1]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.5.0...4.5.1
[4.5.0]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.4.1...4.5.0
[4.4.1]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.4.0...4.4.1
[4.4.0]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.3.0...4.4.0
[4.3.0]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.2.0...4.3.0
[4.2.0]:https://github.com/puppetlabs/puppetlabs-apt/compare/4.1.0...4.2.0
+
+
+\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
- gem "puppet-blacksmith", '~> 3.4', require: false, platforms: [:ruby]
end
group :system_tests do
- gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
- gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
- gem "beaker", *location_for(ENV['BEAKER_VERSION'] || '~> 3.13')
- gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || '~> 0.1')
- gem "beaker-pe", require: false
- gem "beaker-hostgenerator"
- gem "beaker-rspec"
+ gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
+ gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
end
puppet_version = ENV['PUPPET_GEM_VERSION']
### Manage login configuration settings for an APT source or proxy in `/etc/apt/auth.conf`
-Starting with APT version 1.5 you can define login configuration settings (like
-username and password) for APT sources or proxies that require authentication
-in the file `/etc/apt/auth.conf`. This is preferable to embedding login
-information directly in `source.list` entries which are usually world-readable.
+Starting with APT version 1.5, you can define login configuration settings, such as
+username and password, for APT sources or proxies that require authentication
+in the `/etc/apt/auth.conf` file. This is preferable to embedding login
+information directly in `source.list` entries, which are usually world-readable.
-The file `/etc/apt/auth.conf` follows the format of netrc (as used by ftp or
+The `/etc/apt/auth.conf` file follows the format of netrc (used by ftp or
curl) and has restrictive file permissions. See
https://manpages.debian.org/testing/apt/apt_auth.conf.5.en.html for details.
Use the optional `apt::auth_conf_entries` parameter to specify an array of
hashes containing login configuration settings. These hashes may only contain
-the keys `machine`, `login` and `password`.
+the `machine`, `login` and `password` keys.
```puppet
class { 'apt':
## Limitations
-This module is tested and officially supported on Debian 8 and 9 and Ubuntu 14.04, and 16.04. Testing on other platforms has been light and cannot be guaranteed.
-
This module is not designed to be split across [run stages](https://docs.puppetlabs.com/puppet/latest/reference/lang_run_stages.html).
+For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-apt/blob/master/metadata.json)
+
### Adding new sources or PPAs
If you are adding a new source or PPA and trying to install packages from the new source or PPA on the same Puppet run, your `package` resource should depend on `Class['apt::update']`, in addition to depending on the `Apt::Source` or the `Apt::Ppa`. You can also add [collectors](https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html) to ensure that all packages happen after `apt::update`, but this can lead to dependency cycles and has implications for [virtual resources](https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html#behavior).
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
+require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
+
+def changelog_user
+ return unless Rake.application.top_level_tasks.include? "changelog"
+ returnVal = nil || JSON.load(File.read('metadata.json'))['author']
+ raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
+ puts "GitHubChangelogGenerator user:#{returnVal}"
+ returnVal
+end
+
+def changelog_project
+ return unless Rake.application.top_level_tasks.include? "changelog"
+ returnVal = nil || JSON.load(File.read('metadata.json'))['name']
+ raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
+ puts "GitHubChangelogGenerator project:#{returnVal}"
+ returnVal
+end
+
+def changelog_future_release
+ return unless Rake.application.top_level_tasks.include? "changelog"
+ returnVal = JSON.load(File.read('metadata.json'))['version']
+ raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
+ puts "GitHubChangelogGenerator future_release:#{returnVal}"
+ returnVal
+end
PuppetLint.configuration.send('disable_relative')
+if Bundler.rubygems.find_name('github_changelog_generator').any?
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
+ raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil?
+ config.user = "#{changelog_user}"
+ config.project = "#{changelog_project}"
+ config.future_release = "#{changelog_future_release}"
+ config.exclude_labels = ['maintenance']
+ config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)."
+ config.add_pr_wo_labels = true
+ config.issues = false
+ config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"
+ config.configure_sections = {
+ "Changed" => {
+ "prefix" => "### Changed",
+ "labels" => ["backwards-incompatible"],
+ },
+ "Added" => {
+ "prefix" => "### Added",
+ "labels" => ["feature", "enhancement"],
+ },
+ "Fixed" => {
+ "prefix" => "### Fixed",
+ "labels" => ["bugfix"],
+ },
+ }
+ end
+else
+ desc 'Generate a Changelog from GitHub'
+ task :changelog do
+ raise <<EOM
+The changelog tasks depends on unreleased features of the github_changelog_generator gem.
+Please manually add it to your .sync.yml for now, and run `pdk update`:
+---
+Gemfile:
+ optional:
+ ':development':
+ - gem: 'github_changelog_generator'
+ git: 'https://github.com/skywinder/github-changelog-generator'
+ ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
+ condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
+EOM
+ end
+end
+
$provider = '/usr/bin/apt-get'
$sources_list = "${root}/sources.list"
$sources_list_d = "${root}/sources.list.d"
+ $trusted_gpg_d = "${root}/trusted.gpg.d"
$conf_d = "${root}/apt.conf.d"
$preferences = "${root}/preferences"
$preferences_d = "${root}/preferences.d"
if versioncmp($facts['lsbdistrelease'], '15.10') >= 0 {
$distid = downcase($facts['lsbdistid'])
- $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2-${release}")
+ $dash_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2")
+ $underscore_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1_${distid}_\\2")
} else {
- $filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-\\2-${release}")
+ $dash_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-\\2")
+ $underscore_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1_\\2")
}
- $filename_no_slashes = regsubst($filename, '/', '-', 'G')
- $filename_no_specialchars = regsubst($filename_no_slashes, '[\.\+]', '_', 'G')
- $sources_list_d_filename = "${filename_no_specialchars}.list"
+ $dash_filename_no_slashes = regsubst($dash_filename, '/', '-', 'G')
+ $dash_filename_no_specialchars = regsubst($dash_filename_no_slashes, '[\.\+]', '_', 'G')
+ $underscore_filename_no_slashes = regsubst($underscore_filename, '/', '-', 'G')
+ $underscore_filename_no_specialchars = regsubst($underscore_filename_no_slashes, '[\.\+]', '_', 'G')
+
+ $sources_list_d_filename = "${dash_filename_no_specialchars}-${release}.list"
+
+ if versioncmp($facts['lsbdistrelease'], '15.10') >= 0 {
+ $trusted_gpg_d_filename = "${underscore_filename_no_specialchars}.gpg"
+ } else {
+ $trusted_gpg_d_filename = "${dash_filename_no_specialchars}.gpg"
+ }
if $ensure == 'present' {
if $package_manage {
exec { "add-apt-repository-${name}":
environment => $_proxy_env,
command => "/usr/bin/add-apt-repository ${options} ${name} || (rm ${::apt::sources_list_d}/${sources_list_d_filename} && false)",
- unless => "/usr/bin/test -f ${::apt::sources_list_d}/${sources_list_d_filename}",
+ unless => "/usr/bin/test -f ${::apt::sources_list_d}/${sources_list_d_filename} && /usr/bin/test -f ${::apt::trusted_gpg_d}/${trusted_gpg_d_filename}",
user => 'root',
logoutput => 'on_failure',
notify => Class['apt::update'],
if ! $location {
fail('cannot create a source entry without specifying a location')
}
+ # Newer oses, do not need the package for HTTPS transport.
+ $_transport_https_releases = [ 'wheezy', 'jessie', 'stretch', 'trusty', 'xenial' ]
+ if $_release in $_transport_https_releases and $location =~ /(?i:^https:\/\/)/ {
+ ensure_packages('apt-transport-https')
+ }
}
$includes = merge($::apt::include_defaults, $include)
{
"name": "puppetlabs-apt",
- "version": "4.5.1",
+ "version": "5.0.1",
"author": "Puppet Labs",
"summary": "Provides an interface for managing Apt source, key, and definitions with Puppet",
"license": "Apache-2.0",
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04",
- "16.04"
+ "16.04",
+ "18.04"
]
}
],
"requirements": [
{
"name": "puppet",
- "version_requirement": ">= 4.7.0 < 6.0.0"
+ "version_requirement": ">= 4.8.0 < 6.0.0"
}
],
"template-url": "https://github.com/puppetlabs/pdk-templates",
- "template-ref": "heads/master-0-g34e3266",
- "pdk-version": "1.5.0"
+ "template-ref": "1.7.0-0-g57412ed",
+ "pdk-version": "1.7.0"
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow+type').that_notifies('Class[Apt::Update]').with(environment: [],
command: '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type || (rm /etc/apt/sources.list.d/needs-such_substitution-wow_type-trusty.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-trusty.list', # rubocop:disable Metrics/LineLength
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow_type.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: [],
command: '/usr/bin/add-apt-repository -y ppa:user/foo || (rm /etc/apt/sources.list.d/user-ubuntu-foo-wily.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user_ubuntu_foo.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Class[Apt::Update]').with('environment' => [],
'command' => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && false)', # rubocop:disable Metrics/LineLength
- 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list', # rubocop:disable Metrics/LineLength
+ 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow.gpg', # rubocop:disable Metrics/LineLength
'user' => 'root',
'logoutput' => 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Class[Apt::Update]').with('environment' => [],
'command' => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow || (rm /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && false)', # rubocop:disable Metrics/LineLength
- 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list', # rubocop:disable Metrics/LineLength
+ 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs-such_substitution-wow.gpg', # rubocop:disable Metrics/LineLength
'user' => 'root',
'logoutput' => 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: [],
command: '/usr/bin/add-apt-repository ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8080'],
command: '/usr/bin/add-apt-repository ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8180'],
command: '/usr/bin/add-apt-repository ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: ['http_proxy=http://localhost:8180', 'https_proxy=https://localhost:8180'],
command: '/usr/bin/add-apt-repository ppa:user/foo || (rm /etc/apt/sources.list.d/user-foo-trusty.list && false)', # rubocop:disable Metrics/LineLength
- unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-foo-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/user-foo.gpg', # rubocop:disable Metrics/LineLength
user: 'root',
logoutput: 'on_failure')
}
it {
is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').without_content(%r{# my_source\ndeb-src hello.there wheezy main\n})
+ is_expected.not_to contain_package('apt-transport-https')
}
end
end
}
end
+ context 'with a https location, install apt-transport-https' do
+ let :facts do
+ {
+ os: { family: 'Debian', name: 'Debian', release: { major: '8', full: '8.0' } },
+ lsbdistid: 'Debian',
+ lsbdistcodename: 'jessie',
+ osfamily: 'Debian',
+ puppetversion: Puppet.version,
+ }
+ end
+ let :params do
+ {
+ location: 'HTTPS://foo.bar',
+ allow_unsigned: false,
+ }
+ end
+
+ it {
+ is_expected.to contain_package('apt-transport-https')
+ }
+ end
+
+ context 'with a https location, do not install apt-transport-https on oses not in list eg buster' do
+ let :facts do
+ {
+ os: { family: 'Debian', name: 'Debian', release: { major: '10', full: '10.0' } },
+ lsbdistid: 'Debian',
+ lsbdistcodename: 'buster',
+ osfamily: 'Debian',
+ puppetversion: Puppet.version,
+ }
+ end
+ let :params do
+ {
+ location: 'https://foo.bar',
+ allow_unsigned: false,
+ }
+ end
+
+ it {
+ is_expected.not_to contain_package('apt-transport-https')
+ }
+ end
+
context 'with architecture equals x86_64' do
let :facts do
{
-
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-puppet-facts'
Puppet.settings[:strict] = :warning
end
end
+
+def ensure_module_defined(module_name)
+ module_name.split('::').reduce(Object) do |last_module, next_module|
+ last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module)
+ last_module.const_get(next_module)
+ end
+end
+
+# 'spec_overrides' from sync.yml will appear below this line