Commit graph

758 commits

Author SHA1 Message Date
René Moser
1f5cf669dd apt: fix always changed when using deb file on Debian 8 (#3541)
Extends d74e82a3f1e3293ffb70c172e5bb2b6e1ff6dbcc with also support
downgrade.
2016-05-06 09:17:04 +02:00
Pomin Wu
f78509d0cf Fixed #3577 (#3578)
Initialize `upgradable` before use.
2016-05-02 09:38:29 -04:00
Toshio Kuratomi
f3fef24e49 Some beginning python3 porting for modules which have unittests 2016-04-27 07:17:05 -07:00
Michael Scherer
1ac7382dd4 Change gem_source and executable to 'path'
Both of them are file location, so they should be
marked as 'path'.
2016-04-26 22:20:03 +02:00
Adrian Likins
d83c269b82 improve redhat_subscription documentation (#3348)
* add subscription-manager's --type, --consumerid, --name option support

* redhat_subscription: More docs on consumerid
2016-04-20 17:33:08 +02:00
Michael Scherer
a144663953 Fix error reporting for fetch_key (#2662)
Since fetch_url already take care of the exception, the try/except
clause is no longer working, so replace it with proper status
checking, thus permitting to remove urlib2 from the import list.
2016-04-19 18:03:14 -04:00
Jan Hutař
9ab4780b25 Add support for Satellite/Spacewalk which have slightly different API to Hosted (#3289) 2016-04-19 17:43:28 -04:00
Toshio Kuratomi
f39e2343c4 Fix apt module needing another format character 2016-04-19 07:33:55 -07:00
NielsH
ab699a0953 Resolve idempotency issue with virtual apt package (#3449)
Virtual packages were always marked as upgradable which caused the changed-state even though nothing changed.
2016-04-18 11:14:57 -04:00
Tobias Wolf
dba53b5543 Add diff to apt.py (#2944)
for install, remove, deb_install, and upgrade.

Since apt has very commonly familiar output, just use the normal output
from apt-get or aptitude -- trimmed to the interesting parts -- to show
to the user if she specified --diff on the CLI.

Uses the recent support for the `diff['prepared]` key.

Fixes ansible/ansible#10239
2016-04-18 10:18:07 -04:00
Oleg Senin
377e94f77f Correct misspell (#3454) 2016-04-18 13:24:33 +02:00
Matt Davis
1c01e826d6 Merge pull request #3352 from gundalow/docsrh_subs
ansible-validate-modules part 3: Add copyright notice for Barnaby Court (@barnabycourt)
2016-04-12 12:27:00 -07:00
Adrian Likins
72f6238d04 Update redhat_subscriptions 'server_insecure' docs (#3373)
'server_insecure' maps to the subscription-manager config
(/etc/rhsm/rhsm.conf) value for 'insecure' key in the
'server' stanza. The 'insecure' configures if the https connection
to 'server_hostname' is verified as having been issued by
a CA in 'ca_cert_dir' trust store.

Previous documentation indicating it disables https and
enables http was inaccurate. Connection to server_hostname
always uses https.
2016-04-12 17:51:35 +02:00
John Barker
6b03f4afe6 Add copyright notice for James Laska 2016-04-06 19:12:15 +01:00
René Moser
db564c9b0f Merge pull request #3283 from mscherer/fix_argument_rhn_register
Fix argument rhn register
2016-04-01 23:46:36 +02:00
René Moser
7080dd057b Merge pull request #3288 from jhutar/fix-sslcacert-for-rhn_register
Add missing parameters so these options are usable
2016-03-31 19:48:57 +02:00
Hugh Saunders
e9fd7befb7 Retry apt cache updates 2016-03-29 08:35:34 +01:00
René Moser
d4285b5f21 Merge pull request #2613 from Jmainguy/apt_download_deb
Add ability to download deb from url
2016-03-28 23:30:47 +02:00
Strahinja Kustudić
c8222bc8db Yum module always downloads remote rpms. fixes #1452 2016-03-23 23:59:36 +01:00
Rene Moser
e760b45867 apt: doc: fix missing version_added
see #2023
2016-03-23 20:52:14 +01:00
Chris Lamb
f4bc59595c os/apt.py: Add support for passing --allow-unauthenticated
This is useful for packages that bootstrap their own apt-key setup - only
the initial installation will require overriding. Notable examples are the
Dropbox and Google Chrome packages.

(Setting force=yes is far too strong: I only want to bypass
authentication!)

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2016-03-23 19:55:58 +08:00
Jan Hutar
3d13a353e0 Add missing parameters so these options are usable 2016-03-21 12:10:37 +01:00
Michael Scherer
2b489e3257 Fix type of the rhn_register module
Password and activationkey should be tagged as no_log, as they
are supposed to be secret.
sslcacert is a path, so should be tagged as such.
2016-03-21 00:34:37 +01:00
Toshio Kuratomi
22a9a15a5b Fix indent in documentation 2016-03-18 09:09:10 -07:00
James Cammarata
4be29d6e84 Merge pull request #3072 from rsommer/devel
add 'only_upgrade' switch to apt module
2016-03-18 09:39:44 -04:00
Raphaël Dubigny
98a4310579 typo in pip module 2016-03-17 15:36:45 +01:00
Roland Sommer
b118c5ef11 honour 'only_upgrade' flag for 'build_dep' case in 'apt' module 2016-03-17 11:22:07 +01:00
toshihisa
530643a216 One more bug yum non English locales
d7fac82f97
2016-03-16 00:55:50 +09:00
Roland Sommer
bc9fb43ac0 add 'only_upgrade' switch to apt module 2016-03-11 16:12:14 +01:00
Matt Martz
d112599fd5 Set version_added to 2.1 for autoremove. Fixes #3200 2016-03-08 07:31:22 -06:00
Matt Davis
7d2fd4e944 Merge pull request #2926 from mattclay/apt-unsafe
Split shell command to avoid use_unsafe_shell.
2016-03-08 04:56:51 +00:00
Matt Martz
45745424f7 pip module should call exit_json for absent as well (indentation error) 2016-03-07 16:11:01 -06:00
Tobias Wolf
c5be97ca5c Add diff support to apt_repository module
The returned list of diffs aims to simulate how a file system diff would
look before and after writing the sources list files.

![screenshot](http://i.imgur.com/dH6QXtY.png)

n.b. Ternary conditional  is due to failing integration test for
python 2.4
2016-03-04 12:37:28 +01:00
Brian Coca
e4c4f02472 Merge pull request #3074 from stefano-m/devel
Make 'executable' and 'virtualenv' mutually exclusive
2016-03-03 18:36:52 -05:00
Brian Coca
2a03fc2b99 Merge pull request #2997 from callipeo/issue/2996
Add support for both keyserver and keyring in apt_key
2016-03-03 18:34:03 -05:00
Brian Coca
e9130cd4d1 Merge pull request #2766 from joelthompson/feature/pip_umask
Add umask option to pip module
2016-02-29 23:53:04 -05:00
Stefano Mazzucco
24c6b269c9 'executable' and 'virtualenv' mutually exclusive
fixes https://github.com/ansible/ansible/issues/14415
2016-02-19 11:52:33 +00:00
Brian Coca
38d6c1cd36 expanded info on fail on check + missing apt-python
it now explains that apt module will auto install
2016-02-11 01:22:21 -05:00
Matt Clay
d33e033eba Do not install python-apt in check mode. 2016-02-10 20:39:52 -08:00
callipeo
27df98b6fb Add support for both keyserver and keyring in apt_key
Fixes Issue #2996
2016-02-09 19:51:16 +01:00
Toshio Kuratomi
1df8ebf0c3 use new method of setting locale and other environment variables
The old method left settings in the environment.  The new method takes
care of clearing them after use.  In this module, the old method was
also setting the environment too late to affect all the command line
tools which lead to a bug.

Fixes https://github.com/ansible/ansible/issues/14264
2016-02-07 14:17:36 -08:00
Charles Paul
d7a0a3b7e3 adding autoremove to apt 2016-02-05 12:42:25 -06:00
Toshio Kuratomi
63fda10853 Merge pull request #1458 from Tahvok/patch-1
Explain that state=present should be used with yum and url
2016-02-04 06:57:07 -08:00
Toshio Kuratomi
a5667e51ad Merge pull request #2660 from mscherer/fix_rhn_register
Do not use a shell construct for rhnreg_ks
2016-02-02 13:21:57 -08:00
Matt Clay
e56d668ade Split shell command to avoid use_unsafe_shell.
This mirrors a nearly identical change made to apt_repository.py.

Also removes the use of apt-get --force-yes as it can be dangerous
and should not be necessary (apt_repository.py does not use it).

Repeating the explanation from the apt_respository change below:

Since use_unsafe_shell is suspicious from a security point
of view (or it wouldn't be unsafe), the less we have, the less
code we have to thoroughly inspect for a security audit.

In this case, the '&&' can be replaced by doing 2 calls to run_command.
2016-01-31 02:22:59 -08:00
Matt Clay
7a82f2c86d Show error if python-apt is absent in check mode.
Previously this would fail with an exception which
did not clearly explain the reason for the failure.
2016-01-31 01:32:09 -08:00
Michael Scherer
c01cc5f6e4 Do not use a shell construct for rhnreg_ks
Since there is no shell escape of the password parameter, a password with
a single quote (or even worst, a single quote and a pipe) could have
unattended consequences. Also, the less we use use_unsafe_shell=True, the
better.
2016-01-26 12:24:13 +01:00
Brian Coca
9e5737d776 Merge pull request #2661 from mscherer/remove_unsafe_shell_apt_repos
Split a shell snippet in 2 to avoid using use_unsafe_shell=True
2016-01-25 23:45:02 -05:00
Toshio Kuratomi
d7fac82f97 Fix for yum's use of rpm with non English locales
Depends upon https://github.com/ansible/ansible/pull/14025

Fixes https://github.com/ansible/ansible/issues/13996
Fixes https://github.com/ansible/ansible/issues/13975
2016-01-20 12:09:32 -08:00
Brian Coca
61379184d4 Merge pull request #2794 from evverx/fix-apt-key-del-long-id
apt-key: convert ids to the 'short' format
2016-01-18 20:44:05 -05:00