Commit graph

9684 commits

Author SHA1 Message Date
Toshio Kuratomi
eb65f819f5 labels is actually not aded in 1.9.4 but in 2.1 2016-12-08 11:23:54 -05:00
Andrew Pashkin
c811a3f4bc Add 'entrypoint' parameter to Docker module 2016-12-08 11:23:54 -05:00
Andrew Pashkin
8342397427 Harden matching running containers by "command" in the Docker module
Before this patch:

  - Command was matched if 'Command' field of docker-py
    representation of Docker container ends with 'command' passed
    to Ansible docker module by user.
  - That can give false positives and false negatives.
  - For example:
      a) If 'command' was set up with more than one spaces,
         like 'command=sleep  123', it would be never matched again
         with a container(s) launched by this task.
         Because after launching, command would be normalized and
         appear, in docker-py API call, just as 'sleep 123' - with one
         space. This is false negative case.
      b) If 'entrypoint + command = command', for example
         'sleep + 123 = sleep 123', module would give false positive
         match.

This patch fixes it, by making matching more explicit - against
'Config'->Cmd' field of 'docker inspect' output, provided by docker-py
API and with proper normalization of user input by splitting it to
tokens with 'shlex.split()'.
2016-12-08 11:23:54 -05:00
Omar Khan
369fe78c60 Add stop_timeout option to docker module 2016-12-08 11:23:54 -05:00
Toshio Kuratomi
a708ad65c4 Add version_added to documentation 2016-12-08 11:23:54 -05:00
Joe Quadrino
b6e2b2dce1 add devices parameter for docker module 2016-12-08 11:23:54 -05:00
Yann Hamon
1faf8dd5c2 Docker module: restarted should update the container when necessary 2016-12-08 11:23:54 -05:00
Andy Nelson
444895f889 Update to ec2_vpc.py to: 1 allow interface ids and vpc peering connections as route targets 2 set state to "terminated" when VPC is removed 3 fix some comment typos
updates per PR comments
2016-12-08 11:23:54 -05:00
HAMSIK Adam
2af105bcbc Convert enabled value to boolean to actually work, make sure we can set expiration period to 0(None) to disable it 2016-12-08 11:23:53 -05:00
Pedro Romano
bcae9a2b5e GCE libcloud 0.15 support and code cleanup * Code formatting (indentation and white space) fixes for improved PEP8 conformity. * Remove redundant backslashes inside parentheses. * Test for object identity should be 'is not None'. * Test for membership should be 'not in'. * Fit docstring to the PEP8 79 character limit. * Use forward compatible Python 2.6+ 'except .. as' syntax for exception handling. * Support libcloud > 0.15 'metadata' argument format. 2016-12-08 11:23:53 -05:00
Toshio Kuratomi
65b9243056 mariadb isn't always the last elemen of the version string 2016-12-08 11:23:53 -05:00
Toshio Kuratomi
0a64899eba Fix mysqldump usage of config_file 2016-12-08 11:23:53 -05:00
Brian Coca
f8a36c4047 service goes back to failing when absent
if no tools and no init script, this should always fail
2016-12-08 11:23:53 -05:00
Alberto Gireud
58c39f47c1 Update root_volume variable 2016-12-08 11:23:53 -05:00
Toshio Kuratomi
dafb39da2e Account for mariadb versioning 2016-12-08 11:23:53 -05:00
luto
d48dffc298 vsphere_guest: support putting a guest into a nested folder 2016-12-08 11:23:53 -05:00
Jonathan Mainguy
0cdb2719e5 Unify all 3 mysql modules.
Use same connection method, use config_file, and add ssl support
2016-12-08 11:23:53 -05:00
Toshio Kuratomi
8d293651df Fix os_server docs build 2016-12-08 11:23:53 -05:00
Lee H
7feb64d31c - add version_added as requested to host_all 2016-12-08 11:23:53 -05:00
Lee H
5606197c28 - remove user_anonymous as the same thing can be accomplished by user='', but leave in the examples for removing anonymous users 2016-12-08 11:23:53 -05:00
Donovan Jones
8b9cd7f410 fix typo in os_server security_groups description 2016-12-08 11:23:53 -05:00
Brian Coca
9259b51c97 updated module docs, added choices to state 2016-12-08 11:23:53 -05:00
Tobias Smolka
cf5403afa3 Making cluster parameter optional 2016-12-08 11:23:53 -05:00
Brian Coca
63fd67f156 added mime option to stat module
it uses file magic to now return mime_type and charset of a file as
per output of `file -i /path`
2016-12-08 11:23:53 -05:00
Lee H
95895177d0 - add example showing removal of anonymous user accounts 2016-12-08 11:23:52 -05:00
Monty Taylor
a715c91d0b Add support for network, boot_from_volume and volumes
nics is a great flexible parameter, but it's wordy. Shade now supports
a simple parameter too, which is just "network" and takes a name or id.
Add passthrough support.

In addition to supporting booting from a pre-existing volume, nova and
shade both support the concept of booting from volume based on an image.
Pass the parameters through.

Shade supports boot-time attachment of additional volumes for OpenStack
instances. Pass through the parameter so that ansible users can also
take advantage of this.
2016-12-08 11:23:52 -05:00
Toshio Kuratomi
687257bd62 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.
2016-12-08 11:23:52 -05:00
Brian Coca
3b934016c0 note that create globs only work on 2.0
fixes #2666
2016-12-08 11:23:52 -05:00
Brian Coca
b4f87ac7fe made note that Z/z are only 2.1 options 2016-12-08 11:23:52 -05:00
Jonathan Mainguy
b86224a7ec Add Jmainguy as author, fix hash check 2016-12-08 11:23:52 -05:00
Adam Fields
9c131ea619 added a reference to the template module for clarity 2016-12-08 11:23:52 -05:00
Timothy R. Chavez
37ac954123 Get new server object after adding floating IP
We need a new server object once we add the floating ip, otherwise we
will be operating with the older server object pre-floating-ip
assignment.
2016-12-08 11:23:52 -05:00
Michel Alexandre Salim
325a979876 Set the argument type for ec2_vol's encrypted parameter
If this is not set, Ansible parses the parameter as a string.
This is fine if the parameter is not provided by the caller, but
if it is set to False or True explicitly, ec2_vol receives this as
the string 'False' or the string 'True', both of which are truthy.

Thus, without this fix, setting the parameter results in encryption
always enabled.
2016-12-08 11:23:52 -05:00
Veaceslav Mindru
fa98f55c44 fix typo s/defaults/default 2016-12-08 11:23:52 -05:00
Steve Spencer
d4aca8eacc Sync up with allowable docker volume mounting modes 2016-12-08 11:23:52 -05:00
Steve Spencer
769d7db1d0 Add support for mounting host volumes with Z and z options 2016-12-08 11:23:52 -05:00
Lee Hardy
f2f0f83ee6 - fix user_exists statement with host_all to use only username parameter 2016-12-08 11:23:52 -05:00
Leonty
22648e88cd Corrected misspelling in the 'labels' docker parameter documentation. 2016-12-08 11:23:52 -05:00
Lee Hardy
1113975741 - mysql: add user_anonymous parameter, which interacts with anonymous users - mysql; add host_all parameter, which forces iteration over all 'user'@... matches 2016-12-08 11:23:51 -05:00
Brian Coca
f435f887fa better handling of checkmode for solaris fixes #2296 2016-12-08 11:23:51 -05:00
Aaron Boushley
876bdb62e1 Fix issue with comparing versions improperly.
This allows old versions of docker api to function.
2016-12-08 11:23:51 -05:00
Leonty
8638d9d26c Support 'labels' parameter for docker. 2016-12-08 11:23:51 -05:00
Jumpei Ogawa
ebb0d6301d Add explanation in case that ipv4_range is required 2016-12-08 11:23:51 -05:00
Jumpei Ogawa
256c840942 Add better error message when specified network doesn't exist and ipv4_range is not specified 2016-12-08 11:23:51 -05:00
tobbe
65f12bccb6 add text to the description, more user friendly 2016-12-08 11:23:51 -05:00
tobbe
455da45e62 Add suport for selinux user when adding a new user on selinux enabled systems 2016-12-08 11:23:51 -05:00
Daniele Varrazzo
a057431a78 Detect unchanged pip runs when using a vcs url in name
Should fix bug #1645
2016-12-08 11:23:51 -05:00
Daniele Varrazzo
53e1310a7f 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
2016-12-08 11:23:51 -05:00
Derek Smith
b9baed507b updated examples
added mysql 5.7 user password modification support with backwards compatibility

resolved mysql server version check and differences in user authentication management

explicitly state support for mysql_native_password type and no others. fixed some failing logic and updated samples

updated comment to actually match logic.

simplified conditionals and a little refactor
2016-12-08 11:23:51 -05:00
trevoro
b5a3dd4818 adding password_hash support to mysql_user module
fixing user_add arguments error

fixing user_mod arguments error
2016-12-08 11:23:51 -05:00
Michael Scherer
55f2345829 Remove a unneeded use of use_unsafe_shell
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.
2016-12-08 11:23:51 -05:00
Daniel Kimsey
a8f7fda210 Fix yum module failing to initalize yum plugins 2016-12-08 11:23:51 -05:00
nitzmahone
0d0b78dd1e fixed disappearing groups on OSX user module
Ensure that we don't try to modify the groups collection if groups are not specified
2016-12-08 11:23:51 -05:00
Dominique Barton
5c05016d1e bugfix for issue #2537 2016-12-08 11:23:51 -05:00
quoing
3ad67d93ea Fix: Default ACL parameters are not correctly handled 2016-12-08 11:23:51 -05:00
Brian Coca
f0a3914f7b simplified lowercasing 2016-12-08 11:23:50 -05:00
quoing
3a91853e7e Add "default" entry option back (removed in e95bcae), update will translate entry to standard parameters so compatibility with BDS is kept 2016-12-08 11:23:50 -05:00
Mark Theunissen
c3450d542f Remove Mark Theunissen as maintainer 2016-12-08 11:23:50 -05:00
Toshio Kuratomi
94d163f3ed When the password file does not exist and we're making sure the user isn't in the password file, change error into a warning
Warning catches typos in the filename.  Since the playbook is saying
"make sure this user doesn't have an entry" it makes more sense to warn
than to error.

Fixes #2619
2016-12-08 11:23:50 -05:00
Arthur Clement
7c8d3d9b20 Example of single instance with ssd gp2 root volume creation 2016-12-08 11:23:50 -05:00
Ales Nosek
df4109d946 Fix #2475 ini_file module: bracklets in key break idempotence
Escape the regex special characters in the option name.
2016-12-08 11:23:50 -05:00
Brian Coca
42d0ce8744 corrected version_added for new temp_dest feature 2016-12-08 11:23:50 -05:00
cspollar
7ac010977b Fixed typo in uri module example 2016-12-08 11:23:50 -05:00
krdlab
fe0aa01ce8 Fix 'stat' module document 2016-12-08 11:23:50 -05:00
Toshio Kuratomi
6cb1606005 Don't raise or catch StandardError in amazon modules 2016-12-08 11:23:50 -05:00
Dylan Martin
579e444243 improved error message when no handler found 2016-12-08 11:23:50 -05:00
Brian Coca
3025451b10 fixed typo EEXISTS is actually EEXIST
fixes #2585
2016-12-08 11:23:50 -05:00
Veaceslav Mindru
0f456d7e61 adding validate_certs for YUM. #2582 2016-12-08 11:23:50 -05:00
Sina Sadeghi
2ad9c6c9e5 Update hostname.py
Added support for FreeBSD. (http://www.freebsd.org)
2016-12-08 11:23:50 -05:00
Charles Ferguson
4c93b5dab6 Add documentation to 'file' AnsibleModule definition for internals.
The parameters 'diff_peek' and 'validate' are not expected to be used
by users. They are internal. To make it clear, this change adds the
comments 'Internal use only' to each of those definitions to make
it clear that they are actually used, just not by end-users.
2016-12-08 11:23:50 -05:00
Brian Coca
b3c14ee0c3 minor doc fixes and reformating updated validate_certs feature to be 2.1 2016-12-08 11:23:50 -05:00
Charles Ferguson
e86ba78685 Update documentation for 'file' module to include 'diff_peek'.
The 'diff_peek' option isn't documented at all, and provides a
rudimentary check that the content isn't binary. Documentation is
added to explain the option.

The 'validate' option has a declaration, but isn't implemented.
Therefore it may as well be removed from the module.
2016-12-08 11:23:49 -05:00
Veaceslav (Slava) Mindru
2eb6b566b2 Squashed commit of the following:
commit 406214fad214359fcf13fe8c7cd3f8f8faac5386
commit 85d1c9b0a41dd075eb2683b1a7de595ca3119614
commit 4aa5049b5ae25dee71a248238201611a466a13c4
commit 65a96974c80aea1fef88d78e218ecb665d8113e1
commit 22ea5863d1dfd628735b46cc7de51c0fd33251de

Refactoring
2016-12-08 11:23:49 -05:00
Markus Suonto
39d3c3dea6 fixed quantum_ modules to work with minimum access rights if greater access rights are not needed 2016-12-08 11:23:49 -05:00
jhawkesworth@users.noreply.github.com
5453d1e959 Fix for 13315 - minute now included in ansible_date_time on windows hosts 2016-12-08 11:23:49 -05:00
Jay Rogers
bef2b75857 Update in Amazon IAM Policy Documentation
There were typos in the documentation that made the examples seem misleading of what was being demonstrated. This update fixes that.
2016-12-08 11:23:49 -05:00
Brian Coca
b30438f2c8 updated docs to denote retirement of v1 api and clarify when and why auth fields have changed 2016-12-08 11:23:49 -05:00
Lippy Lee
2ce1f87bf8 Make digital_ocean_domain use API v2 2016-12-08 11:23:49 -05:00
Michel Alexandre Salim
fba26fda1c Fix ec2_snapshot documentation
last_snapshot_min_age is added in 2.0, not 1.9
2016-12-08 11:23:49 -05:00
Martin André
aaa82d1942 Fix typo in ping module short description 2016-12-08 11:23:49 -05:00
Brian Coca
1c1c8d0854 doc updates - added version_added to new api_token - updated notes to explain API issues, option switch and versions affected. 2016-12-08 11:23:49 -05:00
Max Rothman
086038cb4f Fix rds "promote" command never promoting
Previously, the `promote` command in the `rds` module would always return OK and never actually promote an instance. This was because `promote_db_instance()` had its conditions backwards: if the instance had the `replication_source` attribute indicating that it **was** a replica, it would set `changed = False` and do nothing. If the instance **wasn't** a replica, it would attempt to run `boto.rds.promote_read_replica()`, which would always fail.
2016-12-08 11:23:49 -05:00
joshuaeke
88f221fd9f Update ec2.py remove state tag
'exact_count' and 'state' are mutually exclusive options they should not be in the following examples:
- # Enforce that 5 running instances named "database" with a "dbtype" of "postgres" example and
- # Enforce that 5 instances with a tag "foo" are running
2016-12-08 11:23:49 -05:00
Charles Ferguson
ac1e4bf6e0 Update the documentation of the 'apt' action for the 'name'.
The package name has two aliases, 'package' and 'pkg'. Add them to the
documentation.
2016-12-08 11:23:49 -05:00
Toshio Kuratomi
a90de29ceb Minor simplification of code 2016-12-08 11:23:49 -05:00
Charles Ferguson
3969bba771 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.
2016-12-08 11:23:49 -05:00
Brian Coca
2efb97e9d5 corrected version_added, removed empty alias 2016-12-08 11:23:49 -05:00
David Shrewsbury
5c5db04ff0 Bug fix for os_image and min_disk/min_ram
The min_disk and min_ram parameters were not being passed to
the shade API. They also need to be integer values. Also
updated the description of these parameters for better
clarification.
2016-12-08 11:23:49 -05:00
Charles Paul
52d499d268 create non-existent ini file
fixing fail_json

more verbose fail msg
2016-12-08 11:23:48 -05:00
Keith Hassen
f7dfcc153e Fail if any group name is not resolved to an ID. 2016-12-08 11:23:48 -05:00
Daniel Donckers
5c7f72233f Fixes #822 2016-12-08 11:23:48 -05:00
Chris Streeter
04b52efb64 Fix name of ssh_opts arg 2016-12-08 11:23:48 -05:00
Chris Church
fea4308c69 Remove note about only using win_copy for small files. 2016-12-08 11:23:48 -05:00
Mike Riddle
f0156dda0d Fixed error message: TypeError: fail_json() takes exactly 1 argument (2 given) 2016-12-08 11:23:48 -05:00
David Shrewsbury
ebd977e780 Fix os_user_group module
This module had a couple of errors in it. Also added check mode
support.
2016-12-08 11:23:48 -05:00
Brian Coca
0425d6be39 fixed break order 2016-12-08 11:23:48 -05:00
Tom Paine
0bf5fa1c23 Update ec2_elb_lb.py 2016-12-08 11:23:48 -05:00
Maarten Claes
e0b8b0d789 This fixes copy with the remote_src option
It was broken in 6e37f1dcef when the remote_src was added. Need to
pass the absolute path to copy2 instead of a tuple.
2016-12-08 11:23:48 -05:00
Brian Coca
e1d0f3ff59 clarified set_fact function 2016-12-08 11:23:48 -05:00
James Cammarata
801c1cab49 Version bump for new beta 2.0.0-0.5.beta3 2016-12-08 11:23:48 -05:00