Commit graph

724 commits

Author SHA1 Message Date
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
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
Matt Davis
51056bac9d Merge pull request #2696 from mattclay/apt-repository-filename
Added filename option to apt_repository module.
2016-01-14 14:37:44 -08:00
Joel Thompson
4b46200477 Add umask option to pip module
On systems with restrictive umasks, the pip module won't allow you to
install pip packages that are usable by everyone on the system. This
commit adds a umask option to optionally override the umask on a
per-package basis.
2016-01-13 00:30:29 -05:00
Evgeny Vereshchagin
d441cb176c apt-key: convert ids to the 'short' format
Fixes:
$ ansible all -m apt_key -a 'state=present id=7A82B743B9B8E46F12C733FA4759FA960E27C0A6 keyserver=hkp://keyserver.ubuntu.com:80' --sudo
127.0.0.1 | SUCCESS => {
    "changed": true
}

$ ansible all -m apt_key -a 'state=absent id=7A82B743B9B8E46F12C733FA4759FA960E27C0A6' --sudo
127.0.0.1 | SUCCESS => {
    "changed": false
}

$ apt-key export 7A82B743B9B8E46F12C733FA4759FA960E27C0A6
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
...

See https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1481871
2016-01-12 01:11:59 +00:00
Brian Coca
4d2cdfe324 made note about choice availability in ansible ver 2016-01-11 18:22:41 -05:00
Brian Coca
8e066cd124 Merge pull request #2600 from cinerama70/pip-force-reinstall
Add support for pip force-reinstall
2016-01-11 18:17:50 -05:00
Brian Coca
2fbfc0740f corrected version added 2016-01-11 18:11:01 -05:00
Brian Coca
dc517ecea6 Merge pull request #2457 from axelspringer/rhn_register-sslcacert-systemorgid
rhn_register: add sslcacert and systemorgid options
2016-01-11 18:06:15 -05:00
Arata Notsu
14950824c3 apt: export env vars before run dpkg
Without this change, some trouble may occur when "deb" parameter
is used as env vars controlling dpkg are not set. For example,
installing a package that requires user input will never end since
DEBIAN_FRONTEND=noninteractive is not set.

So export env vars in APT_ENV_VARS before run dpkg, like in cases
using apt-get/aptitude.
2016-01-06 12:11:53 +09:00
Brian Coca
c557f2ae5b Merge pull request #2723 from mscherer/fix_427
Add more precise documentation on the requirements parameter
2016-01-04 09:56:26 -05:00
Barnaby Court
d4c5360380 add no_log to the password parameter 2015-12-22 22:26:51 -05:00
Martin Matuska
d3740505ac rhn_register: add sslcacert and systemorgid options 2015-12-22 23:51:34 +01:00
Michael Scherer
860635d38c Add more precise documentation on the requirements parameter
Fix #427
2015-12-22 16:20:37 +01:00
Toshio Kuratomi
c75c000369 Merge pull request #2403 from dvarrazzo/pip-vcs-changed
Fix status after pip installations with VCS urls
2015-12-17 10:16:16 -08:00
Matt Clay
9f622015f1 Added filename option to apt_repository module. 2015-12-15 23:48:33 -08:00
Chrrrles Paul
3c685d7468 Merge pull request #2680 from ansible/yum-use-rpm
Use rpm instead of repoquery for is_installed()
2015-12-15 00:13:43 -06:00
Toshio Kuratomi
0125770d8d Use rpm instead of repoquery for is_installed()
* This keeps us from hitting bugs in repoquery/yum plugins in certain
  instances (#2559).

* The previous is also a small performance boost

* Also in is_installed(), when using the yum API, return if we detect
  a package name has been installed.  We don't need to also check
  virtual provides in that case.  This is another small performance
  boost.

* Sort the list of packages returned by the list parameter.
2015-12-13 09:16:28 -08:00
Brian Coca
74609ce42c Merge pull request #2636 from vmindru/yum_fix_typo
fix typo s/defaults/default
2015-12-11 15:53:41 -05:00
Michael Scherer
8c5e8f0425 Split a shell snippet in 2 to avoid using use_unsafe_shell=True
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 toroughly inspect for a security audit.

In this case, the '&&' can be replaced by doing 2 calls to run_command.
2015-12-10 00:20:13 +01:00
Daniel Kimsey
a54d1fe09c Fix yum module failing to initalize yum plugins 2015-12-09 12:06:48 -06:00
Veaceslav Mindru
0d5380258e fix typo s/defaults/default 2015-12-06 20:54:05 +01:00
stephane
8d986a62a9 Add support for pip force-reinstall
The pip command allows a user to force reinstallation,
but the module doesn't currently support it. Add
"force-reinstall" as a possible state.
2015-12-01 12:03:54 -08:00
Veaceslav Mindru
dc697bf533 adding validate_certs for YUM. #2582 2015-11-29 20:59:03 +01:00
Charles Ferguson
fca36415d6 Update the documentation of the 'apt' action for the 'name'.
The package name has two aliases, 'package' and 'pkg'. Add them to the
documentation.
2015-11-24 15:55:31 +00:00
Charles Ferguson
490038b0e4 Update documentation of the 'pkg' and 'state' parameters in yum.
The yum module allows the 'name' parameter to be given as 'pkg', in
a similar way to some of the other package managers. This change
documents this alias.

The module's 'state' parameter has two other aliases, in line with
the 'apt' action; the 'state' parameter can take 'installed' as an
alias for 'present', and 'removed' as an alias for 'absent'. These
aliases are documented.
2015-11-23 23:42:40 +00:00
Daniele Varrazzo
c860af29b2 Detect unchanged pip runs when using a vcs url in name
Should fix bug #1645
2015-11-03 14:51:23 +00:00
Daniele Varrazzo
a95fee4079 Use 'pip freeze' output to detect changes with requirement specified
If the requirements contains a repos url it will always report 'Successfully
installed'; there is no difference in the output to tell apart if
anything new was pulled. Use freeze to detect if the environment changed
in any way.

Should fix ansible/ansible#1705
2015-11-03 14:49:38 +00:00
Felix Engelmann
2a97e9f299 re-implements #226
in optional (editable) way 
with backward compatibility
2015-11-03 12:45:00 +01:00
Toshio Kuratomi
5cacef8617 Fixes for bcoca's review of #1916 2015-11-02 13:04:12 -08:00
Harlan Lieberman-Berg
a53cf5434b Give include_recommends a useless default to make the parser happy. 2015-11-02 13:04:12 -08:00
Harlan Lieberman-Berg
06a4efa1cf Add missing brace. 2015-11-02 13:04:12 -08:00
Harlan Lieberman-Berg
a234e9b7b2 Change install_recommended in apt to a trinary.
Conditions are now "yes", "no", and "default", with the latter falling
back to the OS default.
2015-11-02 13:04:12 -08:00
Harlan Lieberman-Berg
baafcfc091 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.
2015-11-02 13:04:12 -08:00
Toshio Kuratomi
eeaeeb5a1f Correct typo in yum module docs 2015-10-27 12:51:48 -07:00