Harlan Lieberman-Berg
a32e5932e9
Give include_recommends a useless default to make the parser happy.
2016-12-08 11:23:45 -05:00
Harlan Lieberman-Berg
f9c435ebd5
Add missing brace.
2016-12-08 11:23:45 -05:00
Harlan Lieberman-Berg
1ff12b66fb
Change install_recommended in apt to a trinary.
...
Conditions are now "yes", "no", and "default", with the latter falling
back to the OS default.
2016-12-08 11:23:45 -05:00
Harlan Lieberman-Berg
8ef4715cf6
Change behavior of apt.py around installing recommended packages.
...
Closes #1189 .
This will cause the settings in Ansible to override the system settings.
That will have no effect except on systems that have an out-of-Ansible
configuration that disables automatic installation of recommended
packages. Previously, ansible would use the OS default whenever
install_recommends wasn't part of the playbook. This change will cause
the Ansible default configuration setting of installing recommended
packages to override the configuration files set on the OS for things
installed through ansible, even when there is no install_recommends
specified in the playbook. Because the OS default matches the Ansible
default, this shouldn't have wide impact.
2016-12-08 11:23:45 -05:00
Patrick Galbraith
223c689ec0
Fix to issue 12912. Supply 'force' to install of python-apt.
2016-12-08 11:23:44 -05:00
Marius Gedminas
270c2e8bbd
apt: check for "0 upgraded" to be at the beginning of the line
...
Fixes #1678 .
2016-12-08 11:23:33 -05:00
Brian Coca
9ad712018c
deal with more failures when apt module fails to instantiate pkg fixes #1499
2016-12-08 11:23:32 -05:00
Brian Coca
e7dc05df11
updated upgrade to a more sensible default as the previous was prone to confusion fixes #1667
2016-12-08 11:23:17 -05:00
Matt Martz
a0f5ae8726
Replaced tabbed indentation with spaces for apt module
2016-12-08 11:23:16 -05:00
Greg DeKoenigsberg
eb881d7d5d
Proper author info for all remaining modules
2016-12-08 11:23:07 -05:00
Semyon Deviatkin
732b26ab23
Fix issue #1230
...
When virtual package providing only one package, look up status of target package
2016-12-08 11:23:00 -05:00
Brian Coca
831e1d8739
added updated cache time to apt, also started documenting return values
2016-12-08 11:22:58 -05:00
Toshio Kuratomi
dd02483b26
Explain why the apt module does not do implicit regex matches on package name since this is different than the apt-get command line tool.
...
Fixes #1258
2016-12-08 11:22:58 -05:00
bugchecker
b7b6367ad5
prevent using undefined variable
2016-12-08 11:22:54 -05:00
Tim Rupp
db6c2bac75
Add missing import of apt.debfile
...
In cases when the python-apt package is not installed, ansible will
attempt to install it. After this attempt, it tries to import the
needed apt modules, but forgets to import the apt.debfile module.
The result is that playbooks that use the dpkg argument on a machine
that does not initially have the python-apt package available will
fail with the following error
AttributeError: 'module' object has no attribute 'debfile'
This patch adds the appropriate import to the apt module to ensure
that necessary libraries are available in cases when the dpkg argument
is being used on a system that does not initially have the python-apt
package installed
2016-12-08 11:22:50 -05:00
Brian Coca
4124f8c381
now module fails gracefully instead of stacktrace when trying to install missing deb file
2016-12-08 11:22:44 -05:00
Henry Finucane
464c502f95
dpkg does not take a --force-yes option
2016-12-08 11:22:42 -05:00
Conrado Buhrer
09082e6e7f
fixed: namespace clash #710
2016-12-08 11:22:40 -05:00
Conrado Buhrer
abde33c615
fixed: erroneous logic
2016-12-08 11:22:40 -05:00
Conrado Buhrer
a6315043ef
fixed: missing check for upgrade flag
2016-12-08 11:22:40 -05:00
Conrado Buhrer
807b168590
fixed: removed build-deb from required_one_of
2016-12-08 11:22:40 -05:00
Conrado Buhrer
3165b39d21
changed: state=build-dep; refactored into install()
2016-12-08 11:22:39 -05:00
Conrado Buhrer
442663a13a
added: build-dep to apt module #349
...
Original code provided by @nathanhruby
2016-12-08 11:22:39 -05:00
Brian Coca
65d3b167e6
now captures cache fetch failures
2016-12-08 11:22:38 -05:00
fabios
3c53b3b268
mark as upgradable and let apt-get install deal with it
2016-12-08 11:22:35 -05:00
fabios
043242df2c
improve fail message and use itertools chain
2016-12-08 11:22:35 -05:00
fabios
21bfa80203
older python-apt compatibility
2016-12-08 11:22:35 -05:00
fabios
301c8b8e09
handle list of list for python-apt < 0.7.9 compatibility
2016-12-08 11:22:35 -05:00
Toshio Kuratomi
1dc2ae0aef
Cleanup the old apt compatibility changes
2016-12-08 11:22:35 -05:00
fabios
0ad355585a
use low-level apt_pkg.Package
2016-12-08 11:22:35 -05:00
FabioBatSilva
a748229f3a
fix compatibility issues with python-apt < 0.7.9
2016-12-08 11:22:34 -05:00
Toshio Kuratomi
1af6a85492
Correct variable name
2016-12-08 11:22:27 -05:00
Henry Finucane
2363074dd8
If force=true, ignore python-apt's advice
...
This lets you downgrade packages, for instance.
2016-12-08 11:22:27 -05:00
Toshio Kuratomi
81978cbacb
Fix retrieval of package version in apt module
2016-12-08 11:22:27 -05:00
Toshio Kuratomi
83e43415da
Documentation update for apt version wildcards from bryanlarsen
2016-12-08 11:22:27 -05:00
Toshio Kuratomi
615b954cd8
Update package_status and install to account for wildcarded versions.
2016-12-08 11:22:27 -05:00
Toshio Kuratomi
1ca1b80fe8
Decide to allow pkgname and version wildcards so that things like libxml2*=2.9* would work
2016-12-08 11:22:27 -05:00
Toshio Kuratomi
37fa22eb93
Cache pkg name list so we don't recreate the list for every package
2016-12-08 11:22:26 -05:00
Toshio Kuratomi
6b776da7bc
Just make things a little more readable
2016-12-08 11:22:26 -05:00
Toshio Kuratomi
945447e392
if __name__ does work with ansible modules
2016-12-08 11:22:26 -05:00
Michael Vogt
e360582c4a
add apt unittest
2016-12-08 11:22:26 -05:00
Michael Vogt
80d520dde8
Allow foo=1.0* like expressions in apt
2016-12-08 11:22:26 -05:00
Robert Estelle
4e2d05b1f3
Remove incorrect executable permissions.
2016-12-08 11:22:26 -05:00
Brian Coca
5d16410518
corrected comparisson which had accidentally chaned in previous fixes
2016-12-08 11:22:26 -05:00
Brian Coca
9de01b8e10
better handling of deprecated aliases
2016-12-08 11:22:26 -05:00
Brian Coca
f91859c817
make sure 'present' is fully equivalente of 'installed' and remove installed from feedback in favoer of 'present'
2016-12-08 11:22:26 -05:00
James Cammarata
a32a50568e
Use new prompt detection in run_command to detect aptitude prompts
...
Also adds flags to aptitude command when force=yes is used, in order
to bypass the prompts given for untrusted packages.
Fixes #31
2016-12-08 11:22:25 -05:00
Michael DeHaan
5d814d9fb2
Some more module categorization.
2016-12-08 11:22:25 -05:00