Commit graph

48 commits

Author SHA1 Message Date
Michael DeHaan
82564df61a Merge pull request #8544 from Tenzer/faster-apt_repository
apt_repository: Check if key already exists before adding it
2014-08-11 08:09:19 -04:00
Jeppe Toustrup
b811df38a7 apt_repository: Check if key already exists before trying to add it for a speed increase 2014-08-11 11:57:23 +02:00
Michael DeHaan
27de1fbbf3 Update version_added info. 2014-08-08 14:14:12 -04:00
Karol Hosiawa
60ff1c572e Add validate_certs option to apt_repository 2014-08-08 14:14:12 -04:00
Aladin Jaermann
015a22ffba Correct typo 2014-07-14 10:49:08 +02:00
James Cammarata
d44ed533b3 Default use_proxy to True for fetch_url()
Also added some error handling to the fetch_url() call in the
apt_repository module, so that failures to look up the PPA info
are properly handled.

Fixes #7322
2014-05-19 23:04:13 -05:00
James Cammarata
537494c2d6 Make sure distro variable is set if python-apt is installed
Fixes #7295
2014-05-06 09:42:50 -05:00
James Tanner
6ec0e25d1a Addresses #6908 Add a mode parameter to apt_repository 2014-04-14 16:42:23 -04:00
James Tanner
28cb4756c4 Remove debug line 2014-04-14 16:02:08 -04:00
James Tanner
db36c41c3b Addresses #6908 Strip usernames and passwords from apt_repository filenames 2014-04-14 13:18:21 -04:00
Michael DeHaan
a4bce09ad1 Clarify docs message. 2014-04-02 17:37:10 -04:00
James Tanner
f6a02d9b2c Merge pull request #6220 from trevorah/ansible.git
apt_repository: autoinstall python-apt if not available
2014-03-18 16:21:04 -04:00
Matt Martz
7af8a33def remove dependency on pycurl from apt_repository by using module_utils/urls.py instead 2014-03-17 11:31:04 -05:00
Michael DeHaan
9cc5ae6f2f Merge pull request #6120 from lalinsky/apt_repository_pycurl_non_ppa
Don't require pycurl in apt_repository when it's not actually needed
2014-03-16 15:15:57 -05:00
James Laska
5cfefb326a Correct check_mode conditional logic
The desired behavior is to _not_ add the ppa signing key when check_mode is
enabled.  This fix corrects the conditional logic to comply with the stated
behavior.
2014-03-14 10:24:52 -04:00
Michael DeHaan
6010e74839 Various commits to enable no-shell or safe-shell usage, more to come. 2014-03-12 16:44:35 -04:00
Andy Trevorah
e4ad97b918 reworked apt-repository auto-install to be like yum 2014-03-12 11:15:27 +00:00
Andy Trevorah
1280269866 apt_repository: autoinstall python-apt if not available 2014-02-28 16:39:06 +00:00
James Cammarata
be0be16e89 Merge branch '5853-python-2.5-apt_repository-fix' of https://github.com/timurbatyrshin/ansible into timurbatyrshin-5853-python-2.5-apt_repository-fix 2014-02-24 15:20:29 -06:00
Lukáš Lalinský
8d507f79b9 Don't require pycurl in apt_repository when it's not actually needed 2014-02-22 15:33:54 +01:00
Brian Coca
310b23ee8d removed with
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2014-02-18 12:33:48 -05:00
Timur Batyrshin
658c15930e reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 (#5852) 2014-02-03 13:00:40 -06:00
Timur Batyrshin
db173453ba further compatibility with older versions of python-apt (#5853) 2014-02-02 23:15:19 +04:00
Rutger Spiertz
763c0305c1 apt_repository: don't crash if default_file doesn't exist 2014-01-02 15:41:24 +01:00
James Tanner
ad837709bd Addresses #5023 Fix import comments 2013-12-02 15:13:49 -05:00
James Tanner
6000d636b3 Fixes #5023 Convert all modules to use new snippet import pattern 2013-12-02 15:11:23 -05:00
jctanner
6cebfccd7f Merge pull request #4440 from AndydeCleyre/patch-2
Set default of 'yes' for update_cache, as is in the documentation
2013-11-07 06:46:13 -08:00
Jimmy Tang
0568abeb14 check for ubuntu distribution first 2013-10-19 14:41:00 +01:00
Michael Scherer
19bb44288e fix distribution detection in apt_repository module, so it also work
on Mint as it work on Debian, fix #4587.

PPAs are not supported however, since that's a Ubuntu specific feature
and mint is detected as a generic distribution and use a different
codename than the Ubuntu release it is based on, which mean that apt_repository
cannot add detect and add the proper url without a better heuristic.
2013-10-19 00:57:08 +02:00
Jimmy Tang
a4c8d3ee68 This oneliner change allows apt-key to inherit the http_proxy variable.
Before this fix

  TASK: [apt_repository repo='ppa:vbernat/haproxy-1.5'] *************************
  failed: [134.226.115.202] => {"cmd": ["apt-key", "adv", "--recv-keys", "--keyserver", "keyserver.ubuntu.com", "CFFB779AADC995E4F350A060505D97A41C61B9CD"], "failed": true, "rc": 2}
  stderr: gpg: requesting key 1C61B9CD from hkp server keyserver.ubuntu.com
  gpg: no valid OpenPGP data found.
  gpg: Total number processed: 0

After the fix

  TASK: [apt_repository repo='ppa:vbernat/haproxy-1.5'] *************************
  changed: [134.226.115.202]
2013-10-11 15:19:52 +01:00
Andy Kluger
5ce29734d2 Set default of 'yes' for update_cache, as is in the documentation 2013-10-10 17:18:06 -04:00
Alexander Saltanov
2bd6c5e262 Remove options and protocols in source line with regex.
Fixes #4311
2013-10-03 03:31:04 +04:00
René Moser
ccf4cf1dd8 Fixed missing required package in notes. 2013-09-19 19:34:15 +02:00
René Moser
9fccf96d61 apt_repository: added option update_cache.
The default behavior is to update_cache if changed.

If you add more then one repo, you may not want to update cache for every repo separately.
So you can now disable update_cache with this new option e.g. update_cache=no

Updating cache can also be handled using the apt module.
2013-09-18 19:14:08 +02:00
René Moser
a991b62a51 apt_repository: fix update cache after state=changed. Closes GH-4136 2013-09-18 11:47:39 +02:00
sjahl
4dd68c07a0 setting 0644 permissions on mkstemp file handles. Fixes issue #3857 2013-08-18 11:03:43 -04:00
James Cammarata
10a0f03cdc Cleaning up of apt_repository module and removing wget parts 2013-08-13 16:11:03 -05:00
Michael Vogt
de404eac06 use either pycurl or wget to download from launchpad, also improve error message if neither is installed 2013-08-13 14:39:47 -05:00
Michael Vogt
5e56d42ed1 use pycurl instead of urllib2 when talking to launchpad to actually get SSL cert verification, see https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/915210 or CVE-2011-4407 for a previous similar issue in software-properties 2013-08-13 14:39:47 -05:00
James Cammarata
0958673574 Reverting version_added field in the apt_repository module 2013-08-13 09:53:49 -05:00
Alexander Saltanov
ded947008a Replacement for apt_repository.
1. Debian Squeeze is supported out of box now.
2. Repository type "deb" or "deb-src" should be explicitly specified.
3. If a source had beed added it must be possible to remove it.
4. PPA can be only used against Ubuntu hosts.
2013-08-13 09:53:49 -05:00
Abhijit Menon-Sen
1a90d01ba9 Fix some typos discovered during casual reading 2013-08-11 18:41:23 +05:30
Evan Wies
01fc2b61dc apt_repository: enhance documentation 2013-07-12 15:03:37 -04:00
Jan-Piet Mens
5c69918d53 DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
  Added deprecation warning to moduledev.rst and remove deprecated example from it
  Fixed up a few typos and uppercased some acronyms.
  add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00
Michael DeHaan
3a635d2d26 Lots of formatting fixes 2013-05-24 23:46:23 -04:00
William Bowling
222f004bfa Fixes apt_repository always reporting file uri repos as changed 2013-05-23 12:39:22 +10:00
Serge van Ginderachter
13a9613bc6 fix a bug in apt-repository where 'ppa' is used in a plain http://ppa. .... url 2013-05-03 20:57:55 +02:00
Michael DeHaan
391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Renamed from library/apt_repository (Browse further)