Commit Graph

23 Commits (2da5dc7886731739cc1541abed51ea384909dd84)

Author SHA1 Message Date
Michael DeHaan 7bfc24706c Fix prev feature commit, Do not require aptitude to use apt commands in the apt module, only needed when upgrading. 11 years ago
Michael DeHaan 6030c1bcaa tweak indentation for 'make pep8' 11 years ago
Michael DeHaan a58d827d72 Merge pull request #3379 from serenecloud/devel
Return a friendly error message if aptitude isn't installed
11 years ago
Felix Stuermer ed7b073550 Use the force=yes option for apt upgrade actions 11 years ago
serenecloud e6601b669e Return a friendly error message if aptitude isn't installed 11 years ago
Michael DeHaan fe871ecfd4 Merge branch 'fix-apt-purge' of git://github.com/madduck/ansible into purge 11 years ago
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
11 years ago
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>
11 years ago
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>
11 years ago
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>
11 years ago
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.
11 years ago
Michael DeHaan 2ec0c4478c Merge pull request #3227 from bcoca/modules_wantlist
implementing with_items list globbing made easier for modules
11 years ago
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>
11 years ago
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
11 years ago
John Jarvis fc61824591 fixing syntax error 12 years ago
Michael DeHaan 47675caab5 Merge pull request #2948 from jcbagneris/devel
Fixes in apt module doc: typos, examples
12 years ago
Michael DeHaan 2209f44371 Merge pull request #2932 from bcoca/apt_getbins
apt now uses module function to find bin paths
12 years ago
JcB 5d89534744 Fixes in apt module doc: typos, examples 12 years ago
Brian Coca 8f87a0d109 apt now uses module function to find bin paths
Signed-off-by: Brian Coca <briancoca+dev@gmail.com>
12 years ago
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.
12 years ago
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
12 years ago
Michael DeHaan 3802560eaa Merge branch 'devel_apt-cache_valid_time' of git://github.com/gottwald/ansible into devel 12 years ago
Michael DeHaan cd97a4cb14 Allow modules to be categorized, and also sort them when generating the documentation. 12 years ago