Commit graph

72 commits

Author SHA1 Message Date
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
Daniele Sluijters
95ae9ab48f apt: Add settings, keys and ppas.
* Allow any configuration of apt to be done through data bindings by
  passing in hashes representing the resources.
* Switch apt::ppa to use `distid` as set in `apt::params. This makes
  `apt::ppa` also work for LinuxMint.
2015-03-01 14:20:45 +01:00
Daniele Sluijters
fe228435b1 apt: Change how update is managed.
* Instead of having 4 options controlling purging we now have a single
  hash with four possible keys.
* Include `apt::update` only _after_ we've assembled the `$_update`
  hash.
2015-03-01 13:17:47 +01:00
Daniele Sluijters
a1ce8bdea4 apt: Change how purging is managed.
* Instead of having 4 options controlling purging we now have a single
  hash with four possible keys.
* We purge everything by default.
* `/etc/apt/preferences` is now always managed.
* Add missing `mode` to some of the files.
2015-02-28 16:50:31 +01:00
Daniele Sluijters
d81c3d9476 apt: Add proxy support on the class.
Re-introduce proxy support at the class level. Needing to configure a
proxy is such a common scenario that having it on the class is a
reasonable thing. It also affects `apt::ppa`.

Change `apt::ppa` to no longer have its own `proxy` parameter but use
the proxy as configured on the main `apt` class.
2015-02-27 21:14:24 +01:00
Daniele Sluijters
d261d8f11b apt::setting: Parse type and name from title.
Instead of having two additional parameters, `base_name` and
`setting_type` simply parse it from `title`.

We need to prefix most resources with `list-`, `conf-`, or `pref-` any
way to avoid duplicate resources so we might as well leverage that.
2015-02-26 20:15:42 +01:00
Morgan Haskel
351c8d5941 Convert to use apt::setting instead of file resources
This adds consistency across the module
2015-02-25 10:24:56 -08:00
Daniele Sluijters
3e407d70e0 apt::params: Add two missing entries, use them. 2015-02-20 01:06:26 +01:00
Morgan Haskel
61080fb676 Unbreak broken tests 2015-02-15 09:39:17 -08:00
Morgan Haskel
6cdbe562ab Starting to clean up init.pp 2015-02-15 09:09:47 -08:00
Stefan Dietrich
443db5a7c2 (MODULES-1200) Fix inconsistent header across files 2015-02-06 21:16:05 +01:00
Peter Souter
b3c61ce0bc Format documentation a little
Makes it a little easier to read and parse with scripts
2015-01-09 13:17:51 -08:00
Wolf Noble
7a192d7bea - add bits for updating apt
- fix spec tests to include osfamily fact
- add spec tests to verify current default behavior unimpacted.
- manage the update-stamp file in puppet via content rather than a served file.
- update custom fact to return -1 if the file doesn't exist
- add spec test for custom fact
- refactor to use a variable vs a collector/override
- document parameters a bit more verbosely
- remove empty unconstrained fact
- Add osfamily fact to backports tests to facilitate functional tests on non-debian hosts
2014-09-24 16:29:27 -07:00
Matthias Baur
1044886150 Fix some Puppet Lint errors 2014-09-05 18:51:39 +02:00
Daniel Friesen
562e702a46 Fix mistake in my 0c2329b implementation. 2014-07-11 14:33:15 -07:00
Daniel Friesen
0c2329bd57 Fix inconsistent $proxy_host handling in apt and apt::ppa.
- The default for $proxy_host is undef
- apt considers $proxy_set to be absent if $proxy_host is undef
- apt::ppa considers proxy_env to be empty if $proxy_host is false or ''

This results in apt::ppa to consider $proxy_host to be set when the default undef is used
breaking ppa resources because $proxy_env becomes:
  [http_proxy=http://:8080, https_proxy=http://:8080]

Fix this by making both apt and apt::ppa consider $proxy_host to be unset when it is
any of false, '', or undef.
2014-07-10 16:57:38 -07:00
Ashley Penney
3c48598eeb Merge branch '1.5.x' into merge
Conflicts:
	Gemfile
	spec/acceptance/apt_key_provider_spec.rb
2014-07-03 13:08:11 -04:00
Morgan Haskel
b2381c6673 Fixing lint and adding the trusty nodeset (not sure how that was missed) 2014-05-20 16:24:28 -04:00
Morgan Haskel
0da464de35 Merge pull request #287 from oc243/master
Implement fancy progress bars configuration.
2014-05-15 13:45:46 -04:00
Oliver Chick
2cdcd3b06d Implement fancy progress bars configuration.
Ubuntu 14.04 ships with apt 0.9.15, has a ``fancy progress bar'', which
is a green bar that shows at the bottom of the terminal showing progress
throughout install.

This patch enables the progress bar, which is usually done by running
echo 'Dpkg::Progress-Fancy "1";' > /etc/apt/apt.conf.d/99progressbar
2014-05-14 12:02:37 +01:00
Daniel Paulus
ee0233066e Some code cleaning 2014-05-05 12:06:39 +02:00
Daniel Paulus
e337a24389 Remove the preference file for all supported platforms when in purge mode 2014-05-02 23:35:54 +02:00
Daniel Paulus
d3d6fde6e7 Do not add bogus line to apt preference file on Debian Wheezy 2014-05-02 17:56:06 +02:00
Johan Fleury
9e789255c8 Writing proxy configuration in apt.conf.d/01proxy.
This commit changes the proxy file name to be more consistent with other files
in `apt.conf.d`. The old file (`apt.conf.d/proxy`) is removed.

Tests has been updated.
2014-04-11 13:56:29 +02:00
Ashley Penney
553611b16b Small patch to fix the spacing that makes lint fail. 2014-03-27 16:40:36 +00:00
Hunter Haugen
6691c2fade Merge pull request #248 from electrical/fix_params_fail
Fix fail message
2014-03-07 10:00:58 -08:00
Richard Pijnenburg
4d0bf7cbab Fail early when its not debian or ubuntu ( or debian like distro ) 2014-03-07 16:03:44 +01:00
Ian Unruh
7b932be82c Updated documentation 2014-03-05 16:01:37 -06:00
Ian Unruh
824da679d4 Added retry to update operation 2014-03-05 15:59:21 -06:00
Hunter Haugen
a35c30fe4b Merge pull request #209 from pabl0/proxy
Make apt.conf.d/proxy world readable and add a newline
2014-03-05 11:15:26 -08:00
Daniel Tremblay
46606c9a2b Add ability to specify hash of apt sources in hiera
This patch uses create_resources() to call apt::source which lets you
specify your sources in hiera.
2014-02-26 09:15:37 -05:00
Henrik Ahlgren
eb40a7ae78 Make apt.conf.d/proxy world readable and add a newline 2014-02-25 19:57:10 +02:00
Hunter Haugen
0e82e5498f Merge pull request #215 from lotherk/proxy_val_no_boolean
changed proxy_host default value from true to undef. fixes #211
2014-02-25 09:32:12 -08:00
Daniele Sluijters
2ca97c8210 apt: Allow managing of preferences file.
We already had a feature to manage and purge entries in preferences.d
but not the preferences file in /etc/apt. This commit adds that
capability.

Fixes #199
2014-02-22 11:00:22 +01:00
Konrad Lother
0207fcd19a changed proxy_host default value from false to undef. fixes #211 2014-01-30 00:55:22 +01:00
Edwin Hermans
c07ab505c1 add an updates_timeout option to apt::params (PR fix) 2013-10-02 14:24:30 +02:00
Ryan Culbertson
e97942f2d6 Fixed several lint warnings and errors 2013-09-04 17:32:42 -04:00
Scott Barber
041548bcbe Update manifests/init.pp 2013-06-02 18:51:27 +01:00
Scott Barber
f985752a1a Update manifests/init.pp 2013-06-02 18:51:27 +01:00
Scott Barber
1b07921c0c Update manifests/init.pp
If a proxy is set and then later unset we need to remove the proxy file. As it currently sits it'll just sit there hanging out.
2013-06-02 18:51:27 +01:00
Chris Rutter
c58d19f29a minor punctuation and quotation corrections in comments 2012-12-31 00:22:45 +00:00
Chris Rutter
5cdf186c45 fix minor comment typo 2012-12-31 00:16:29 +00:00
Erik Dalén
a3d782c3b5 Fix style errors 2012-08-21 22:55:24 +02:00
ytjohn
3adb53c4a6 Without puppetlabs/stdlib, you will get "err: Could not retrieve catalog from remote server: Error 400 on SERVER: Unknown function validate_bool" 2012-06-13 18:48:58 -03:00
Zach Leslie
f0d18b6ed7 use variable from params and also validate the purge_preferences_d 2012-05-21 15:56:29 -07:00
Zach Leslie
cfb6a35603 allow for purging preferences 2012-05-21 15:51:33 -07:00
Zach Leslie
6e9232a627 align = 2012-05-21 15:48:00 -07:00
Nan Liu
666a05dea1 (#11966) apt module containment for apt_update.
The update to separate Exec["apt-get update ${name}"] to single exec in
apt::update class resulted in apt-get update command to be dangled.
Previously if user specified Package['package_a'] <-
Apt::Resource['source_a'], the original refactor would no longer
guarantee apt-get update is executed before the package is installed.
This patch fixes the problem using the anchor resource and ensuring the
old behaviour is maintained and user can depend on apt-get update
command being invoked if they specify dependency on any apt::*
define resource type as well as the apt class.
2012-05-07 15:27:53 -07:00
Thomas Broyer
0ffe484c7c Move Package['python-software-properties'] to apt:ppa
Also updates the apt-update in Apt::Ppa to use $apt::params::provider
instead of aptitude.
2012-05-04 13:46:08 -07:00