Commit graph

328 commits

Author SHA1 Message Date
Hunter Haugen
360f04dcc1
(MODULES-3414) Limit non-strict parsing to pre-3.5.0 only
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.
2016-07-27 08:39:42 -07:00
Nick Berard
38263ac768 After the repository is added, the ${::apt::sources_list_d}/${sources_list_d_filename} file is created as an empty file.
The unless condition of Exec["add-apt-repository-${name}"] calls test -s, which returns 1 if the file is empty. Because
the file is empty, the unless condition is never true and the repository is added on every execution. This commit
replaces the -s test condition with -f, which is true if the file exists or false otherwise.
2016-07-01 17:31:05 -07:00
Bryan Jen
5476d9033b Merge pull request #610 from puppetlabs/unused-lsb
apt/params: Remove unused LSB facts
2016-06-07 09:20:12 -07:00
Daniele Sluijters
47b9b6dee7 apt/params: Remove unused LSB facts 2016-06-05 12:29:00 +02:00
OKUMURA Takahiro
459f515879 Fix regexp for $ensure params
/\Aabsent|present\Z/ match wrong values like 'absentaaa' or 'aaapresent'.

And add tests to the context of 'invalid ensure'.
2016-06-05 18:44:25 +09:00
Philipp Wagner
e651d7d25c Install software-properties-common for xenial
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.
2016-05-02 13:53:09 +02:00
Tim Bishop
1f444343b4 Fix version check on 16.04.
The old test obviously broke on 16.04. Switch to using versioncmp
since it does the right thing for us.
2016-04-27 16:26:25 +01:00
Mathias Merscher
e5d5123521 apt::setting expects priority to be an integer, set defaults accordingly
Signed-off-by: Mathias Merscher <Mathias.Merscher@dg-i.net>
2016-04-19 12:31:00 +02:00
Daniel Hoherd
91092bdc80 Exposing notify_update to apt::source 2016-03-18 10:08:30 -07:00
Philipp Wagner
a02654e36c Look for correct sources.list.d file for apt::ppa
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
2016-02-03 17:24:06 +01:00
matt.cover
08c8b58264 MODULES-2873 - Avoid duplicate package resources when package_manage => true 2016-02-02 08:54:43 -07:00
Tim Bishop
7fa207e335 Handle PPA names that contain a plus character.
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.
2016-01-19 10:38:47 +00:00
Patrick Hervieux
b11a45ec69 Add 15.10 support 2015-11-04 16:48:22 +01:00
David Schmitt
2778c8588e Merge pull request #564 from rfdrake/apt_pin
Add support for creating pins from main class
2015-09-07 12:11:31 +01:00
Robert Drake
0dce05adae Add support for creating pins from main class
This lets you create apt::pin resources as an apt param hash.  It also
supplies appropriate tests and documentation.
2015-09-04 22:31:13 -04:00
Vincent
a531b2b424 Corrected regression with preference files name
Signed-off-by: Vincent Deygas <Vincent.Deygas@rewardgateway.com>
2015-09-02 12:06:16 +01:00
Morgan Haskel
9f43b2db26 MODULES-2446 - Fix pinning for backports
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.
2015-08-26 16:29:54 -07:00
Brett Delle Grazie
9ad4fd682d MODULES-2269: Expose notify_update setting
* 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
2015-08-16 19:16:36 +01:00
Callahan, Michael Joseph
afa4d45ee9 Added an ensure parameter for user control of proxy presence. Defaults to undef to resist breaking any current setup.
added spec entry

Added validation

fixed ensure hash
2015-08-05 16:03:28 -04:00
Daniele Sluijters
2cf089576d Merge pull request #545 from raoulbhatia/master
Use Debian's new official mirrors redirector
2015-07-23 14:10:47 +02:00
Morgan Haskel
cd37fc34f2 MODULES-2190 - Fix anchor issues 2015-07-21 10:19:15 -07:00
Raoul Bhatia
b8462bdc43 Use Debian's new official mirrors redirector
See https://www.debian.org/News/weekly/2015/05/#httpredir
2015-07-05 09:17:12 +02:00
Morgan Haskel
70c18639c1 Revert "Fix use of $::apt::params::backports and $::apt::params::xfacts." 2015-06-22 09:30:15 -07:00
Farzad FARID
93f40ca892 Fix use of $::apt::params::backports and $::apt::params::xfacts. 2015-06-22 15:27:44 +02:00
Ed Szynaka
ec1c50a4ad Added additional header template for apt.conf style comments 2015-06-19 02:01:48 -04:00
Vincent
c1d49048c0 Update update.pp
Corrected typo
2015-06-17 12:05:37 +01:00
Morgan Haskel
f1fe05ec2b Merge pull request #525 from ianmacl/MODULES-2070
Backwards compatibility with older versions of puppet
2015-06-08 15:08:48 -07:00
Morgan Haskel
396f308e6a Compatibility between 1.8.x and 2.x for apt::source 2015-06-08 11:19:45 -07:00
Morgan Haskel
d50fef82e8 Make apt::key compatible with 1.8.x 2015-06-04 09:41:27 -07:00
Ian MacLennan
e52145110c Backwards compatibility with older versions of puppet 2015-05-25 09:28:04 -04:00
Morgan Haskel
3838c666f5 Only use the strict variables workaround if using strict variables
This should avoid issues with defined on earlier versions of puppet
2015-05-11 10:55:46 -07:00
Morgan Haskel
fe9741fe1d Merge pull request #505 from puppetlabs/install-lsb-release
Clear up lsb-release error
2015-04-29 15:38:38 -07:00
Daniele Sluijters
494abedaeb Work around PUP-4133 2015-04-29 21:07:16 +02:00
Daniele Sluijters
1318344500 Give clearer instructions around lsb-release 2015-04-29 21:04:27 +02:00
Morgan Haskel
21a2462a58 Compatibility for puppet < 3.5.0 2015-04-27 13:48:41 -07:00
Morgan Haskel
e41fc4bbb4 Switch back to anchor, for moar compatibility 2015-04-27 10:21:03 -07:00
Morgan Haskel
3a20254108 Don't purge by default. That seems unnecessarily destructive. 2015-04-14 11:03:17 -07:00
Daniele Sluijters
fe60980781 apt::conf: Don't require content ensure=>absent. 2015-04-14 12:41:57 +02:00
Morgan Haskel
d3ca10fd2f Remove default support for Linux Mint and Cumulus Networks
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`
2015-04-13 10:35:19 -07:00
Morgan Haskel
044fb5faf5 Add testing, docs, and examples for backports 2015-04-12 11:25:47 -07:00
Daniele Sluijters
37043dff85 backports: Add support back for backports.
This is currently lacking tests.
2015-04-09 15:44:20 -07:00
Daniele Sluijters
791012b2c9 source: Support complex pin, like key does.
This adds support for passing in a full pin declaration as the pin
parameter on a source declaration.

It keeps the old behaviour intact, you can still simply do `pin => '10'`
and it will pin on origin with a priority of 10.

Should that not be what you want you can now pass in a full pin
declaration instead. We make no assumptions here, whatever you pass in
will be passed through to pin as-is with the exception of the values for
`ensure` and `before` which are always overridden by us to ensure
everything keeps working as designed.
2015-04-09 15:44:20 -07:00
Morgan Haskel
dc746734f1 Merge remote-tracking branch 'upstream/master' into merge_master_to_next 2015-03-25 18:32:09 -04:00
Morgan Haskel
911c4de90f (MODULES-1156, MODULES-769) Remove unnecessary anchors
`apt::ppa` and `apt::setting` don't actually include `apt::update` so
anchors are unnecessary. Move `apt` to use contain instead of anchors,
since it wasn't anchoring properly anyways. Update the tests to make
sure it can have settings and ppas depending on each other without
cycles.
2015-03-24 18:18:14 -04:00
Morgan Haskel
df47ca7ff4 Remove update['always'] = true support
We don't really need both of `update['always'] = true` and
`update['frequency'] = 'always'`.
2015-03-18 13:52:12 -07:00
Patrick Gansterer
61a4fb6979 Fix gpg key checking warings after f588f26
Use the full fingerprint for all keys to silence the warning.
2015-03-16 19:34:24 +01:00
Mikko Pesari
3799e3a23c unattended_upgrades: Allow changing legacy_origin
This enables using Origins-Pattern in Ubuntu.
2015-03-13 14:50:16 -07:00
Morgan Haskel
0c35704245 Make installation of software-properties optional
This is cherry-picked from the PPA cleanup happening for the 2.0.0 release.

Conflicts:
	manifests/params.pp
	manifests/ppa.pp
2015-03-13 13:38:38 -07:00
Morgan Haskel
79db539f33 Inheritance of apt::params means it can't be private
Otherwise, if another module has `class { 'apt': }` in it everything
fails, as `$caller_module_name` will be the other module name.
2015-03-10 17:16:43 -07:00
Daniele Sluijters
41a2725683 apt::source: Make location mostly required.
In what universe does it make sense to create a `sources.list.d` entry
for a repository **without** specifying where this repository is?
😖

😞 😩 😧 😱

Only when removing the resource should a location not be required.
2015-03-06 17:40:45 +01:00