Commit graph

69 commits

Author SHA1 Message Date
serenecloud
e6601b669e Return a friendly error message if aptitude isn't installed 2013-06-30 15:36:13 +12:00
Michael DeHaan
fe871ecfd4 Merge branch 'fix-apt-purge' of git://github.com/madduck/ansible into purge 2013-06-19 21:35:28 -04:00
Michael DeHaan
79a9629108 Revert "now modules can implement with_items list globbing w/o updating"
This reverts commit 4942a06bc2.

Conflicts:

	lib/ansible/runner/__init__.py
2013-06-19 19:00:18 -04:00
martin f. krafft
a52f531c5b Always assume purged for older python-apt
Older python-apt modules don't export Package.installed_files and there
seems to be no other way to figure out if a package is
removed-but-not-purged, so we just always assume it's purged.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-19 10:56:43 +02:00
martin f. krafft
3d1db80fe0 Introduce non-purged package status
A package may be removed but not purged with APT. The only way to
identify this state is by looking at the list of installed files of
a package. Even if the package has no files installed, this list will be
non-empty until the package is removed:

  # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files"
  <Package: name:'ruby1.8' id:1425> None [u'']

  # dpkg --purge ruby1.8
  (Reading database ... 27904 files and directories currently installed.)
  Removing ruby1.8 ...
  Purging configuration files for ruby1.8 ...

  # python -c "import apt; c=apt.Cache(); c.update(); c.open(); p=c['ruby1.8']; print p, p.installed, p.installed_files"
  <Package: name:'ruby1.8' id:1425> None []

See http://bugs.debian.org/712749 too.

If a package is not marked installed but it still 'has_files', then it
should be processed if the request is to purge it.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-19 10:00:33 +02:00
martin f. krafft
1bf4438e60 Fix purging of packages
A small error in the reuse of a variable caused packages to never get
purged. This commit fixes that.

Signed-off-by: martin f. krafft <madduck@madduck.net>
2013-06-19 10:00:33 +02:00
Jesse Keating
9f3c43290e pkg option of apt is not required
You can use apt module with update_cache and without specifying a
package. Update the docs to reflect this.
2013-06-18 16:25:46 -07:00
Michael DeHaan
2ec0c4478c Merge pull request #3227 from bcoca/modules_wantlist
implementing with_items list globbing made easier for modules
2013-06-16 19:29:02 -07:00
Brian Coca
98c290f9e1 now modules can implement with_items list globbing w/o updating
hardcoded lists in ansible code, just add WITH_ITEMS_USES_LIST in a
comment anywhere, and of course, support recieving params as list.

Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-06-15 16:28:43 -04:00
Jan-Piet Mens
3404a0fc16 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
John Jarvis
fc61824591 fixing syntax error 2013-05-18 19:49:25 -04:00
Michael DeHaan
47675caab5 Merge pull request #2948 from jcbagneris/devel
Fixes in apt module doc: typos, examples
2013-05-18 13:33:27 -07:00
Michael DeHaan
2209f44371 Merge pull request #2932 from bcoca/apt_getbins
apt now uses module function to find bin paths
2013-05-18 13:13:04 -07:00
JcB
5d89534744 Fixes in apt module doc: typos, examples 2013-05-17 16:12:30 +02:00
Brian Coca
8f87a0d109 apt now uses module function to find bin paths
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
2013-05-15 22:44:12 -04:00
Jack Kuan
0b941abd04 Make package version comparison use globbing.
I have something like:

  apt: pkg={{ item }} state=present
  with_items:
    - python-pysqlite2=2.6.3-*
    - python-paramiko=1.7.7.1-*

But due to the use of *'s in the version specifications, the apt ansible
module always reports changed: true. This patch fixes that.
2013-05-13 15:01:02 -04:00
Jan-Piet Mens
521162f43d Add Requirements to rst template, ansible-doc
tweak position & look of Requirements in rst
tweak APT's notes as per anhj's wish
2013-05-11 16:46:59 +02:00
Michael DeHaan
3802560eaa Merge branch 'devel_apt-cache_valid_time' of git://github.com/gottwald/ansible into devel 2013-05-05 12:28:33 -04:00
Michael DeHaan
cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 2013-04-28 15:03:45 -04:00
Renamed from apt (Browse further)