Commit graph

289 commits

Author SHA1 Message Date
Ashley Penney
558954bedf Ensure apt::ppa fails on non-Ubuntu. 2014-01-09 14:35:17 -05:00
Tsuharesu Luciel
2f6edabc4c (#201) Use root to exec
User root is needed to execute this command.

If someone changes the default Exec user, apt-add-repository will fail.
2013-12-30 16:01:56 -02:00
Marco Nenciarini
935d3ce15b Fix the name of sources.list.d file resource in apt::ppa 2013-12-02 13:40:22 +01:00
Ashley Penney
b549f7b848 Merge pull request #184 from RsrchBoy/topic/removable-ppas
add an 'ensure' parameter to apt::ppa
2013-11-18 14:51:45 -08:00
Erik Dalén
7a8e3d00f9 Retry package installs
Sometimes package installs can fail to aquire the lock file, so retry
the command in that case.
2013-11-14 11:02:18 +01:00
Chris Weyl
3499896505 add an 'ensure' parameter to apt::ppa
...as sometimes we want to get rid of them. :)

We leave this a little loose; rather than simply requiring a boolean for
$ensure, we set the stage for doing an easy switch to also allowing 'purge' at
some point in the future.
2013-11-08 16:54:11 -08:00
Ashley Penney
33064128b9 getparam() isn't available in all stdlib versions.
There's no need for getparam() here when a regular variable works
just fine.
2013-10-16 13:08:03 -04:00
Ashley Penney
d1e87d4774 Merge pull request #140 from hunner/apt_force
Handling of release parameter and apt provider in force manifest
2013-10-15 10:45:17 -07:00
Ashley Penney
39cbeeb9d2 This work flips from onlyif to unless (mistakenly looked at the
wrong return code).
2013-10-08 10:50:30 -07:00
Ashley Penney
2f9c16a273 This switches us to doing a test -s instead of checking for the
files existence as add-apt-repository --remove leaves a 0 byte file
behind instead of deleting everything properly.
2013-10-02 14:46:00 -04:00
Edwin Hermans
c07ab505c1 add an updates_timeout option to apt::params (PR fix) 2013-10-02 14:24:30 +02:00
Dan Carley
dc88fe6ef6 [#153] Install unattended configs after package
To ensure that the default configs from the package are always overwritten
within a single Puppet run.
2013-09-16 13:57:44 +01:00
Dan Carley
ea40999381 [#153] Convert t/f params to bools and validate
Per lint check: http://puppet-lint.com/checks/quoted_booleans/
2013-09-16 09:06:15 +01:00
Dan Carley
2fea399a09 [#153] Rename unattended_upgrades s/-/_/
It's preferable to use underscores rather than hyphens in class names. Refs:

- http://projects.puppetlabs.com/issues/5268
- http://docs.puppetlabs.com/puppet/3/reference/lang_reserved.html#classes-and-types
2013-09-16 08:53:01 +01:00
Philip Cohoe
df3ba6469c Added class for managing unattended-upgrades 2013-09-10 18:36:30 +00:00
Ryan Culbertson
e97942f2d6 Fixed several lint warnings and errors 2013-09-04 17:32:42 -04:00
Hunter Haugen
c0872c04a9 Merge pull request #150 from bionix/use_http_debian_net_as_geodns_redirector
Use the geoDNS http.debian.net instead of the main debian ftp server
2013-08-05 13:59:19 -07:00
Markus Rekkenbeil
5af4667f32 Use the geoDNS http.debian.net instead of the main debian ftp server
Signed-off-by: Markus Rekkenbeil <markus@bionix-it.de>
2013-08-05 13:19:50 +02:00
Markus Rekkenbeil
a1a677da66 Add wheezy backports support
Signed-off-by: Markus Rekkenbeil <markus@bionix-it.de>
2013-08-05 13:06:54 +02:00
Hunter Haugen
6cde028332 Merge pull request #145 from PierreGambarotto/master
ppa: fix empty environment definition in exec ressource when no proxy
2013-07-31 09:32:27 -07:00
nagas
63a0db4cf2 pass flags as string of single letter 2013-07-22 14:48:32 +02:00
Oleiade
878bc0217e Fix: apt::ppa options parameter to pass options to apt-add-repository command 2013-07-16 15:31:19 +02:00
Pierre Gambarotto
19fbdab794 ppa: fix empty environment definition in exec ressource when no proxy 2013-07-16 09:52:06 +02:00
Pierre Gambarotto
c21730c01d proxy support for apt::ppa 2013-07-11 15:29:38 +02:00
Andreas Teuchert
5f618da4bd Don't use hardcoded provider in force manifest.
Use $apt::params::provider instead.
2013-07-03 10:36:48 -07:00
Andreas Teuchert
9a968bbead Handle release parameter more sensibly in force manifest.
Use release parameter to construct $release_string.

The release parameter may also be set to false to use the system's
default release (so just force a specific version). Use false as the
default setting instead of 'testing'.

Change $install_check to also check if package is installed from the
right release, instead of just checking the version.
2013-07-03 10:36:15 -07:00
Hunter Haugen
9568ecf26d Merge pull request #134 from spali/my_changes
replace aptitude with apt in apt::force
2013-07-02 13:54:12 -07:00
Hunter Haugen
6f68c5180c Merge pull request #114 from johnnyrun/master
location change
2013-07-02 11:53:14 -07:00
Hunter Haugen
46d47f79d2 Merge pull request #118 from opeckojo/apt-sources-arch
Add optional architecture qualifier to apt-sources
2013-07-02 11:48:06 -07:00
Hunter Haugen
91d917495e Merge pull request #123 from ctrlaltdel/fix-required-packages
Install required_packages before 'apt-get update'
2013-07-02 11:37:39 -07:00
Hunter Haugen
add5060d64 Merge pull request #122 from strangeman/master
Add a $key_options parameter to apt::key.
2013-07-02 11:34:21 -07:00
Hunter Haugen
c00888f6d0 Merge pull request #131 from mbornoz/apt-preferences
apt::pin: handling all apt preferences properties
2013-07-01 17:46:24 -07:00
Hunter Haugen
84f1cfca0d Revert "Merge pull request #135 from CERIT-SC/master"
This reverts commit e17208a86c, reversing
changes made to 0665a5d77a.
2013-07-01 17:19:27 -07:00
Hunter Haugen
e17208a86c Merge pull request #135 from CERIT-SC/master
Support APT pinning by codename
2013-07-01 16:55:57 -07:00
Benjamin Knofe
733ece66e7 apt:🔑 trim keys to 8 chars to match with apt-key list, refs puppetlabs/puppetlabs-apt#100 2013-06-29 13:06:26 +02:00
Vlastimil Holer
3191f0552a Support APT pinning by codename (e.g. squeeze, wheezy) 2013-06-28 14:06:05 +02:00
Thomas Spalinger
ca810b37c6 Merge branch 'master' into my_changes 2013-06-25 22:53:14 +02:00
Raphaël Pinson
e8f11eac01 Fix apt::pin for Puppet 2.6 2013-06-18 15:14:00 +02:00
Mathieu Bornoz
414c57926c apt::pin: handling all apt preferences properties
The two forms of APT preferences records (general & specific) can now be
completely and not partially defined. All distribution properties can be passed
as resource parameters. This change is totally backward-compatible.
2013-06-18 11:31:38 +02:00
Francois Deppierraz
37a0dcd0b6 Install required_packages before 'apt-get update'
This is necessary when required_packages contains GPG keys that are used for
authenticating other packages. Tested with package ubuntu-cloud-keyring which
is included in Ubuntu main and used by the Ubuntu Cloud Archive.

I think the same problem applies to other *-keyring packages as well.
2013-06-03 09:57:58 +00:00
Markelov Anton
6283f6cf72 Merge branch 'master' of https://github.com/puppetlabs/puppetlabs-apt
Conflicts:
	.travis.yml
	Modulefile
2013-06-03 10:10:03 +11:00
Joe O'Pecko
b3d67c8937 Add optional architecture qualifier to apt-sources 2013-06-02 11:55:36 -07: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
johnnyrun
256c90e0fd Location changed:
http://backports.debian.org/news/Backports_integrated_into_the_main_archive/
2013-05-07 14:13:59 +02:00
Thomas Spalinger
7b5d30ed18 replace aptitude with apt in apt::force 2013-02-26 21:35:49 +01:00
Michael Moll
eee5ff8e38 whitespace fixes 2013-01-12 00:21:39 +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
Jarl Nicolson
ac86fab459 Changed PPA manifest and tests for new package which started in Quantal 2012-11-05 19:33:38 +10:00
Erik Dalén
75092fdbf1 (#16076) Ability to fill in pin explanation
Adds the ability to fill it in and sets a reasonable default.
2012-10-25 15:44:20 -04:00
Markelov Anton
34f31ef4d9 Merge remote-tracking branch 'upstream/master' 2012-10-22 17:06:04 +11:00
Branan Purvine-Riley
bd68302783 Merge pull request #83 from dalen/pin_order
(#16070) Allow optional order parameter to apt::pin
2012-10-18 16:45:15 -07:00
Markelov Anton
00155ccf1b Add a $key_options parameter, which need to work apt-key via proxy. 2012-10-11 17:37:15 +11:00
Erik Dalén
40f8755217 (#16070) Allow optional order parameter to apt::pin
As the apt pinnings are parsed in ascending alphabetical order with
first match wins within a given scope it is useful to be able to specify
a ordering parameter. Then the name parameter can be kept to something
meaningful.
2012-08-23 11:25:17 +02:00
Dan Bode
f3d84c6744 Merge pull request #84 from dalen/pin_version
(#16075) Allow pinning on version numbers
2012-08-22 06:55:00 -07:00
Dan Bode
62d4557db6 Merge pull request #79 from sathlan/feature/apt-force-timeout
Add a way to specify a timeout for the apt::force define.
2012-08-22 06:47:01 -07:00
Dan Bode
32d312ea41 Merge pull request #78 from saz/source-remove-release
remove check, if $release is empty
2012-08-22 06:46:36 -07:00
Erik Dalén
14b2eb1ca0 (#16075) Allow pinning on version numbers
This is needed to be able to produce the following pinning from
apt_preferences(5):

Package: perl
Pin: version 5.8*
Pin-Priority: 1001
2012-08-22 10:11:48 +02:00
Erik Dalén
a3d782c3b5 Fix style errors 2012-08-21 22:55:24 +02:00
Steffen Zieger
d49dbb49ae fix check of release parameter 2012-07-10 01:39:53 +02:00
sathlan
fcb90f7b6c Add a way to specify a timeout for the apt::force define. 2012-07-09 05:24:49 +03:00
Jonathan Araña Cruz
145a2853d4 Add «main» to Ubuntu backports repos. 2012-06-29 13:15:13 +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
Anton Lindström
74959d8f8e fix scoping of $lsbdistcodename in source.pp
Current unscoped variable yields deprecation warning:
warning: Dynamic lookup of $lsbdistcodename at
[..]/apt/manifests/source.pp:7 is deprecated.
2012-06-12 09:56:19 +02:00
Nan Liu
2dcec036ca Add logoutput on_failure for all exec resources.
We need more information to debug issues on exec failure. This change
enables logouput => on_failure.
2012-06-07 14:53:41 -07:00
Branan Purvine-Riley
bf1bb27998 Remove a trailing comma to fix older puppets 2012-05-25 12:38:53 -07:00
Roman Skvazh
f5b3c5bcdf Add functionality to pin source with originator "release o=..."
If you need to pin certain Launchpad PPA (ppa:rskvazh/php), you may do:
apt::pin { 'my-launchpad-repo':
   priority      => 700,
   originator  =>'LP-PPA-rskvazh-php',
}
2012-05-24 13:46:00 +04:00
James Turnbull
5f1cf4a245 Merge pull request #61 from xaque208/pin_origin
Pin origin
2012-05-23 10:17:31 -07:00
Branan Purvine-Riley
83e20806b2 (#14657) Fix filename when there is a period in the PPA 2012-05-22 17:22:18 -07:00
Zach Leslie
836f16e946 add .pref extension, which according to apt_preferences(5) may or may not be present, and is helpful if you are going to have an extension at all 2012-05-21 17:06:10 -07: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
Zach Leslie
3ac02c5c42 Preserve backwards compatibility 2012-05-21 15:03:30 -07:00
Zach Leslie
5d94369f15 pass ensure through so that we can remove pin prefs too 2012-05-21 14:52:36 -07:00
Zach Leslie
d28de44266 move pin out to a template 2012-05-21 14:49:30 -07:00
Zach Leslie
2d19d8664e Add functionality to support apt pinning to more than just the release.
Write the pin preference filename as ${name} rather than ${release}, so
that we can pin more than one thing.

Change apt::source so that when pin is set, that it pins to the origin
rather than the release.
2012-05-21 14:19:18 -07:00
Zach Leslie
989b95a12d Fixup name issue with apt::backports
The '.list' is not needed since the apt::source type handles this.
White space alignment.
2012-05-21 14:17:37 -07:00
Nan Liu
e3784987fc Fix dependency issues introduced with anchor.
apt::ppa and apt::builddep requires apt class. The anchor introduced for
containment of apt-get update causes a dependency loop. apt::ppa appears
to depend on apt class sources.d direcory. While apt::builddep have no
clear reason for a dependency on apt class. This change refactor both
define type, so they no longer cause a dependency loop.
2012-05-09 12:04:17 -07:00
Nan Liu
322f3b68e7 Fix style related issues in module. 2012-05-08 10:47:43 -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
Nan Liu
e8977deea1 (#14321) apt::pin resource support release.
apt::pin release should default to title, but should be able to
override. This update removes unnecessary "" around $name, and add spec
tests.

Conflicts:

	spec/defines/pin_spec.rb
2012-05-04 13:56:35 -07:00
albac
feee023b24 Update manifests/pin.pp 2012-05-04 13:55:15 -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
Nan Liu
f13f3cfac7 (#11966) Change apt update to apt_update.
Based on code review change exec from apt update to apt_update.
2012-05-04 13:35:25 -07:00
Nan Liu
82967a22fa (#11966) Update apt::ppa to use apt::update.
Change apt::ppa define type to also use the apt::update class to invoke
apt-get update once.
2012-05-04 13:35:25 -07:00
Nan Liu
3684f88372 (#11966) Only invoke apt-get update once.
Move apt-get update exec to a seperate class to minimize the number of
apt-get updates invoked by configuration changes.

* remove apt_update exec resource in apt class.
* remove apt-get-${name} in defines.
* apt::source notify Exec['apt update'].
* Remove dependency to Exec['apt_update'].
* fix rspec-puppet tests.

Conflicts:

	manifests/source.pp
2012-05-04 13:35:13 -07:00
Nan Liu
effb3f7ff3 (#14308) Add ensure=>absent for define resource.
Several apt::* define resource type does not support ensurable. This
update allows ensure=>absent to support the removal of these
configuration files.

* apt::conf
* apt::pin
* apt::source
2012-05-03 16:59:13 -07:00
Nan Liu
17b9ac3c7f Cleanup apt-module puppet-lint related issues. 2012-05-03 10:10:06 -07:00
Nan Liu
51a7596b03 Merge pull request #41 from tbroyer/install-proxy-first
Make sure we configure the proxy before doing apt-get update.
2012-05-02 17:31:57 -07:00
Nan Liu
4a788a60f9 Merge pull request #44 from relud/patch-1
(#14138) Modify apt::ppa's update-apt exec to use the ${apt::params::provider} parameter.
2012-05-02 17:29:31 -07:00
Nan Liu
42af4cdc74 Merge pull request #42 from ody/sync_with_pl_ops
Sync with pl ops
2012-05-02 17:27:12 -07:00
Nan Liu
d1e0e3ee37 (#14287) Fix apt::pin resource for rspec-puppet.
The shorthand syntax cause rspec-puppet failure for external modules
depending on the puppet-apt module. This patch uses the require
metaparameter to avoid this issue.
2012-05-02 16:00:27 -07:00
Daniel Thornton
a5ba24695f (#14138) Modify apt::ppa's update-apt exec to use the ${apt::params::provider} parameter rather than explicitly calling aptitude.
Previously the update-apt exec would always use /usr/bin/aptitude, which is not necessarily present. This change makes it use ${apt::params::provider} which defaults to /usr/bin/apt-get. This also adds some consistency so that ${apt::params::provider} is used everywhere.
2012-04-23 20:40:24 +00:00
Cody Herriges
644ed232a0 Tests to validate apt::{conf,backports}
This patch adds the appropriate spec tests to validate the changes
  introduced by e5f2dfe.  As a bonus it includes fixes to the manifests
  that were discovered while writing the tests.
2012-04-20 13:43:38 -07:00
Cody Herriges
e5f2dfe294 Adds apt::{conf,backports} and variable style.
With the addition of this patch two new defines will be added; one to
  manage APT configuration files (apt::conf) and one that abstracts out the
  requirements needed to turn on backport repositories (apt::backports).

  In addition, the patch takes the opportunity to clean up variable
  definitions so they follow a consistent pattern of setting local
  variables to the fully qualified value stored in the apt::params
  class.  Previously all variable used within a class directly addressed
  the apt::params namespace when ever the variable was used.  In the
  pattern they now adhere to we can more easily switch the namespace
  data lives in or externalize it even more using hiera.
2012-04-20 13:35:27 -07:00
Thomas Broyer
e656c65818 Make sure we configure the proxy before doing apt-get update. 2012-03-30 17:48:31 +02:00
Ken Barber
9c13872b5a (#13289) Fix some more style violations 2012-03-21 13:35:48 +00:00
Ken Barber
a758247f26 (#13289) Clean up style violations and fix corresponding tests 2012-03-21 13:21:11 +00:00
William Van Hevelingen
5148cbf5a6 (#13125) Apt keys should be case insensitive
Previously lowercase keys would be installed every
puppet run because apt-key list returns an uppercase
key. This commit makes the comparison case insensitive.
2012-03-15 00:06:27 -07:00
Reid Vandewiele
b9607a440d Convert apt::key to use anchors
Previously, apt::key used a noop exec hack to do exactly what anchors were
intended to be used for. This commit removes the exec hack and achieves the
same end using Anchor resources from the puppetlabs/stdlib module.
2012-03-07 14:20:34 -08:00
Reid Vandewiele
d4fec561f3 Modify apt::source release parameter test
This commit modifies the release parameter test in apt::source to work
correctly within puppet-rspec for edge-case resource definitions. Previously,
the test for the $release parameter was written as

`if ! $release { fail() }`

This commit updates the test to be written as

`if $release == undef { fail() }`

Additionally, the tests for correct behavior in the presence or absence of a
$release parameter have been beefed up.

The reason for making this change relates to examples such as the following
resource definition:

apt::source { "jenkins":
  location    => "http://pkg.jenkins-ci.org/debian",
  release     => "",
  repos       => "binary/",
  key         => "D50582E6",
  key_source  => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key",
  include_src => false,
}

Note that the $release parameter is given as the empty string. In practice,
this is perfectly valid and everything will work great. However, it seems that
the empty string gets interpreted by something in puppet-rspec as something
equivalent to "False", and thus when testing, the above resource definition
would fail with "Puppet::Error: lsbdistcodename fact not available: release
parameter required" even though the $release parameter has been explicitely
specified (as the empty string).

See also: https://github.com/rtyler/puppet-jenkins/issues/9
2012-03-07 10:10:46 -08:00
Ryan Coleman
76dbf992e0 Merge pull request #26 from pdxcat/ticket_12823_aptkey_defined_type
(#12823) Add apt::key defined type and modify apt::source to use it

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-03-01 14:40:44 -08:00
Reid Vandewiele
8cdaf855a1 (#12823) Add apt::key defined type and modify apt::source to use it
Adding this defined type allows puppet to add keys to the apt keystore without
needing to add a corresponding source; it also adds the "key_source" parameter
for wget'ing keys from arbitrary URLs, and allows for keys to be explicity
removed.

apt::key allows a key to be ensured present multiple times to account for
apt::source resources that all reference the same key. However, this means
that it is possible for a given key to be defined multiple times with
differing source parameters. e.g.

apt::key { "Add key: 4BD6EC30 from Apt::Source bunny":
  key        => "4BD6EC30",
  key_server => "pgp.mit.edu",
}

apt::key { "Add key: 4BD6EC30 from Apt::Source rabbit":
  key        => "4BD6EC30",
  key_server => "keyserver.ubuntu.com",
}

The defined type will accept both definitions and will create multiple exec
resources. This was deemed preferable to the alternative (creating only one
exec resource) in that one broken definition won't hose an entire catalog. If
one definition fails to install the key because of a bad "key_server", the
next apt::key that uses the key will get it done.
2012-03-01 14:15:52 -08:00
William Van Hevelingen
7c0d10b392 (#12809) $release should use $lsbdistcodename and fall back to manual input
This commit changes $release to default to Facter's $lsbdistcodename
and fall back to a Parse Error if $release is not set and $lsbdistcodename
does not exist. Previously $release was hardcoded to karmic.

This commit also modifies apt::ppa to use $release and sets the
files to be ensured so that they are not purged when purge_sources_list_d
is set to true.
2012-03-01 11:15:02 -08:00
Ryan Coleman
b1eb28956e Merge pull request #23 from haus/python_properties
Check if python-software-properties is defined before attempting to define it.

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-02-24 11:20:52 -08:00
Ryan Coleman
fab62e6de7 Merge pull request #22 from haus/unique_required_packages
Allow duplicate required_packages between sources

Reviewed and tested by Ryan Coleman (ryan@puppetlabs.com)
2012-02-24 11:12:39 -08:00
Ryan Coleman
7dc60ae5ea (#12522) Split purge option to spare sources.list
Prior to this commit, when using the purge option, unmanaged entries
in both /etc/apt/sources.list and sources.list.d would be purged.

This commit splits purge into purge_sources_list and purge_sources_list_d
which handle the purging of those items separately. Brief documentation on
each added to class documentation.
2012-02-24 09:27:28 -08:00
Peter Drake
a4af11f7bc Check if python-software-properties is defined before attempting to define it. 2012-02-23 21:27:48 -08:00
Matthaus Litteken
f3735d2ba2 Allow duplicate $required_packages
Previously, if more than one apt::source required the same packages to be
installed it would fail with a duplicate exec resource. This adds the name of
the source resource to the exec and gives the exec a name, moving it to a
command parameter for the exec.
2012-02-23 21:01:20 -08:00
Matthaus Litteken
8171d35470 Merge branch 'allow-same-key' 2012-02-23 20:54:10 -08:00
William Van Hevelingen
1160bcd6d1 (#12526) Add ability to reverse apt { disable_keys => true }
The setting `disable_keys => true` parameter in the apt module creates
/etc/apt/apt.conf.d/99unauth with the contents
"APT::Get::AllowUnauthenticated 1;". Changing `disable_keys`
does not remove this file. This patch makes it so that
`disable_keys => false` will remove /etc/apt/apt.conf.d/99unauth.
2012-02-23 14:37:04 -08:00
Christian G. Warden
c65774204d Allow the use of the same key in multiple sources
Allow the use of the same key in multiple sources by including the name
of the source in the declaration for the exec which adds the key.
2012-02-14 11:40:29 -08:00
William Van Hevelingen
8c279636f5 (#12522) Adding purge option to apt class
Adds a purge option to the apt class to remove repositories
that are not managed by apt::source
2012-02-14 10:51:56 -08:00
Dan Bode
50f3cca0c6 (#12529) Add parameter to support setting a proxy for apt
This commit adds two class parameter to apt that can be used to
specify a proxy to use with apt.

  - proxy_host
  - proxy_port
2012-02-08 15:06:53 -08:00
Matthaus Litteken
d522877cdd (#12094) Replace chained .with_* with a hash
The hash passing to the with method is cleaner and closer to puppet code, so
all of the with_$param have been replaced with with($hash). This also
includes two minor whitspace changes to unstable.pp and source.pp.
This also replaces the ternary switch on param_set with a hash merge,
which is cleaner and will support more use cases.
2012-02-08 09:24:43 -08:00
Matthaus Litteken
0fb5f78379 (#12094) Replace name with path in file resources
When the name is used with a file resource, it becomes difficult to test the
resource using rspec-puppet, as the name parameter gets aliased to path. So to
maintain consistency between tests and manifests, this replaces all name
parameters in file resources with the equivalent path parameter.
2012-01-23 13:25:52 -08:00
Dan Bode
f04eb5ab71 Merge pull request #4 from webfactory/pin_before_source
Suggested fix for #10449
2012-01-15 21:47:45 -08:00
Matthaus Litteken
f759bc039a (#11953) Apt::force passes $version to aptitude
Previously, even if $version were passed to apt::force, aptitude would just
install the default version of the package available. This updates the aptitude
call to use the version string if it exists. If no version is passed, or if it
is false, no version is added to the aptitude call.  This also updates the
rspec-puppet tests for the define, to reflect the changes to the exec.
2012-01-13 15:29:47 -08:00
Matthias Pigulla
2f5d317177 (#11413) Update dpkg query used by apt::force
This patch fixes the query used by apt::force to
determine rather or not the package is installed.

Previously, the expression was not specific enough and
could not lead to false positives in cases where a package
name is contained within another package name (puppet could be
incorrectly determined as being installed if puppet-common is
installed)

This commit resolves that by improving the query expression.
2012-01-13 11:59:24 -08:00
Matthias Pigulla
1be745705c Fix (#10451) - apt::ppa fails to "apt-get update" when new PPA source is added 2011-11-02 15:40:10 +01:00
Matthias Pigulla
864302a091 Set the pin priority before adding the source (Fix #10449) 2011-11-02 10:28:38 +01:00
Robert Navarro
1de4e0a294 Refactored as per mlitteken
* 1af9a13c40 (commitcomment-539287)
2011-08-24 22:52:42 -04:00
Robert Navarro
1af9a13c40 Added some crazy bash madness to check if the ppa is installed already. Otherwise the manifest tries to add it on every run! 2011-08-18 02:37:54 -03:00
Spencer Krum
52ca73e964 (#8720) Replace Apt::Ppa with Apt::Builddep
Probably a copy & paste error

Reviewed-by: Matthaus Litteken <matthaus@puppetlabs.com>
Signed-off-by: Spencer Krum <spencer@puppetlabs.com>
2011-08-02 15:12:34 -07:00
Monty Taylor
5c05fa0f91 added builddep command. 2011-07-24 18:19:22 -04:00
Dan Bode
a11af502cd added the ability to specify the content of a key
Allows us to pass key_content when we specify a source.
2011-06-03 08:14:56 -07:00
Dan Bode
77d2b0dd05 reformatted whitespace to match recommended style
of 2 space indentation.
2011-05-30 10:25:11 -07:00
Dan Bode
18f614b89b reformatted apt::ppa according to recommended
style.

removed require apt in favor of marking a
dependency.

converted release define into a class since
the resources are singletons.
2011-05-30 10:25:11 -07:00
Dan Bode
d8a1e4ee9d Created a params class to hold global data.
- Removes coupling between global data and
  resources from apt class.
- Makes it easier to organize things into stages.
2011-05-30 10:24:58 -07:00
Dan Bode
636ae8541d Added two params for apt class
both of these params facilitate options that 
ease the management of apt repos in dev
environments

1. disable_keys - allows repos without properly
signed keys
2. always_apt_update - refreshes via apt update
every time that puppet runs.
2011-05-29 18:43:01 -07:00
Scott McLeod
ed2d19e2f3 Support ability to add more than one PPA 2011-04-17 21:43:33 -04:00
Ben Godfrey
420d537ac1 Add call to apt-update after add-apt-repository in apt::ppa 2011-03-11 18:14:31 +00:00
Ben Godfrey
945be77019 Add package definition for python-software-properties 2011-03-11 17:10:25 +00:00
Ben Godfrey
71fc425176 Abs paths for all commands 2011-03-11 17:02:50 +00:00
Jeff Wallace
45bc6b1962 Merge branch 'master' of github.com:evolvingweb/puppet-apt 2011-03-11 16:42:04 +00:00
Jeff Wallace
f848bac607 First commit 2010-04-27 16:38:28 -04:00