Puppet 3.5.0 introduced strict variables and the module handles strict
variables by using the defined() function. This does not work on prior
versions of puppet so we must gate based on that version.
Puppet 4 series has a new setting `strict` that may be set to enforce
strict variables while `strict_variables` remains unset (see PUP-6358)
which causes this conditional to erroniously use non-strict 3.5-era
parsing and fail.
The new conditional corrects the cases such that strict variable
behavior happens on versions 3.5.0 and later.
Instead of adding every newer release of Ubuntu, let's assume that the
package name that is used today will be used in the future, until the
next change is necessary.
In Ubuntu 15.10 the path of the apt sources file, which is generated by
apt-add-repository, changed to include the distid. This breaks apt::ppa
idempotency, since it does not recognize the repository is already
added.
Reported on puppet-users as well:
https://groups.google.com/forum/#!topic/puppet-users/YzeMyZYUo98
"man apt-add-repository" notes: "REPOSITORY can be either a line that
can be added directly to sources.list(5), in the form ppa:<user>/<ppa-name>
for adding Personal Package Archives".
Fix the tests to always use the format ppa:<user>/<ppa-name> when adding
PPAs.
It looks like add-apt-repository changes pluses to underscores when
creating the sources.list.d file. So the name it creates doesn't match
what Puppet expects, and the resource keeps applying on every Puppet
run.
This works around that problem.
The 2.x series added a changed behavior for backport pinning to pin to
origin instead of release. Pinning to release is the correct behavior
for backports though.
* Expose the underlying notify_update setting of the apt::settings resource
This is because not all configuration file changes should trigger an apt::update notification
* apt::pin also shouldn't result in an apt-update call
Adding a pin configuration should apply to the next apt-get update call it shouldn't trigger one itself.
* Added documentation
* Add tests for apt::conf notify_update
NOTE: While out-of-the box support is disabled, it is still possible to
get the same configurations, it will just require explicitly setting the
necessary codename-munging.
This should only affect `apt::ppa`