Commit graph

22812 commits

Author SHA1 Message Date
Lars Kellogg-Stedman
413a9d0c62 fix handling of nics argument
The existing code was receiving a list of strings and erroneously
assuming it was being given a list of dictionaries, leading it to fail
with:

    AttributeError: 'str' object has no attribute 'get'

This commit corrects the list handling code to check the type of each
item and handle it appropriately.   Also, based on bcoca's comment
in #2253, thie code removes the special case for a string-only argument.

By transforming string arguments into dicts and then handling them like
any other dict argument, this also permits arguments of the form:

    nics: net-name=mynet

Or:

    nics: port-name=mynet

Previous versions of this code only supported `net-id` and `port-id` in
string specifications.
2016-12-08 11:23:41 -05:00
Monty Taylor
db59af564e Make the auto ip parameter auto_ip
There was a parameter in the docs called 'public_ip' that didn't
actually exist. Additionally, auto_floating_ip is not consistent with
the underlying parameter which is auto_ip - for no good reason.

Add auto_ip as the real parameter, and then make public_ip and
auto_floating_ip as aliases for it for backwards compatability.

Fixes #2301
2016-12-08 11:23:41 -05:00
Brian Coca
28749a794a added note on when reboot command became available fixes #2050 2016-12-08 11:23:41 -05:00
Brian Coca
5ecbd6c63a fixed results docs 2016-12-08 11:23:41 -05:00
Toshio Kuratomi
9c5ce44477 Some docs fixes 2016-12-08 11:23:41 -05:00
Brian Coca
d6f474761d documented new remote_src option 2016-12-08 11:23:41 -05:00
Gilad Peleg
295a28e128 Docs: remove redundant quotes in ec2_elb docs 2016-12-08 11:23:41 -05:00
Gilad Peleg
c340587bb8 Docs: add state choices to ec2_elb_lb
add state options (`present` and `absent`) to `ec2_elb-lb` doc
2016-12-08 11:23:41 -05:00
Val Komarov
0b294d69c5 Remove duplicate logic 2016-12-08 11:23:41 -05:00
dagnello
11f66c0742 Adding string support to metadata argument
This patch adds support to setting metadata key/value through a string
argument.  Variables can now be used for both the metadata key and
value.

example:
meta: "{{ var1 }}:SomeValue,key:{{ var2 }}"
2016-12-08 11:23:41 -05:00
Tim Barnes
d98683e1c5 fixing issue with subversion module whereby the module was reporting local modifications being present when externals were being used 2016-12-08 11:23:41 -05:00
whiter
9ee13c4e55 Add region to doc and handle missing region parameter 2016-12-08 11:23:40 -05:00
Rob
11c0be06fb Update ec2_vol.py
Changed=true now reported on new volume.
Only detach volume when instance is specified as 'None' or '' rather than whenever instance is not specified at all
Fix regression caused by 6b27cdc where by no volume is created if id or Name is not supplied
Remove unnecessary empty aliases
Corrected example to use acceptable parameter for ions
Added exception handling to get_all_instances call
Moved the attachment state validation code to attach_volume function rather than create_volume function
Refactored attach_volume and detach_volume so that changed state can be passed back to call
Created get_volume_info function so that state=present and state=list can return the same data.  Also added instance_id as a returned value in attachment_set dict
Updated aws connection method so that boto profile can be used
2016-12-08 11:23:40 -05:00
Adam Williamson
83d941da27 fix #2043: strip empty dict from end of 'pull' stream
When pulling an image using Docker 1.8, it seems the output
JSON stream has an empty dict at the very end. This causes
ansible to fail when pulling an image, as it's expecting a
status message in that dict which it uses to determine whether
it had to download the image or not. As a bit of an ugly hack
for that which remains backward compatible, try the last item
in the stream, and if it's an empty dict, take the last-but-one
item instead.

The strip() is needed as the exact value appears to be '{}/r/n';
we could just match that, but it seems like the kind of thing
where maybe it'd happen to just be '{}/n' or '{}' or something
in some cases, so let's just use strip() in case.
2016-12-08 11:23:40 -05:00
Sam Yaple
a4a4b6f423 Catch the second occurance of ExposedPorts as well 2016-12-08 11:23:40 -05:00
Sam Yaple
463fb5a058 Don't assume ExposedPorts exists (bug #2257)
A recent change [1] in docker between v1.8.2 and v1.8.3 changed what
is returned in the json when inspecting an image. Five variables which
could have been expected before will now be omited when empty. Only
one of those variables is being addressed in the docker, ExposedPorts.

Unfortunately there was also no API version change on this so this
can't be easily corrected with pinning the API to the older version.

This does a get() which will return None if the variable is not in the
dict formed from the json that was returned. Everything else works the
same way.

[1] 9098628b29
2016-12-08 11:23:40 -05:00
jhawkesworth@users.noreply.github.com
183430628b Fix for ansible modules core 2147 2016-12-08 11:23:40 -05:00
Michael Perzel
1fc2c8c324 Added date, year and month attributes 2016-12-08 11:23:40 -05:00
Michael Perzel
7ee0fa3b4b Add ansible_date_time to windows facts 2016-12-08 11:23:40 -05:00
Constantin Bugneac
7dd5ec5373 Added deleteOnTermination in the output of list option 2016-12-08 11:23:40 -05:00
Abhijit Menon-Sen
e9071c62ba Add missing variable initializations
Without this, «ec2: state=stopped instance_ids=…» would fail with a
traceback like this:

    if inst.get_attribute('sourceDestCheck')['sourceDestCheck'] != source_dest_check:
NameError: global name 'source_dest_check' is not defined
2016-12-08 11:23:40 -05:00
Brian Coca
a1484a0e5b doc fixes 2016-12-08 11:23:40 -05:00
Frank van Tol
5872e0a493 Update ec2_asg.py 2016-12-08 11:23:40 -05:00
Toshio Kuratomi
2c378cc78a Fix for state=latest with wildcard or virtual provide package names 2016-12-08 11:23:40 -05:00
Achilleas Pipinellis
961082620c Add missing documentation: cron_file requires user to be set 2016-12-08 11:23:40 -05:00
Rob
ed3d248234 Move import statements for easier debugging (correct line numbers) 2016-12-08 11:23:40 -05:00
Brian Coca
205d607320 added version added to new rax_cdb choices 2016-12-08 11:23:40 -05:00
Brian Coca
2d7b1bd1c4 added comment explaining chdir defaults 2016-12-08 11:23:39 -05:00
Brian Coca
d34f89a6fe default chdir to tmpdir to avoid virtualenv issues 2016-12-08 11:23:39 -05:00
Brian Coca
68e7945767 make chdir a path so it resolves shell aliases also removed this_dir logic as it is not needed, chdir is None by default and run_command can handle that. 2016-12-08 11:23:39 -05:00
Rob
61af70c087 Set default of dimensions parameter to be empty dict 2016-12-08 11:23:39 -05:00
Andrew Widdersheim
7d174daa77 Fix detached head detection in is_not_a_branch()
Detached head detection seems to have broken somewhere a long the way
because git decided to change how that situation looks when doing a 'git
branch -a' which is performed by get_branches().

This is how git 1.7.1 displays this situation (which works):

shell> git branch -a
* (no branch)
  master

This is the output from git 1.8.3.1 (which does not work):

shell> git branch -a
* (detached from e132711)
  master

It looks like this same wording is used in the most recent version of
git (2.6.1 as of writing this).
2016-12-08 11:23:39 -05:00
gekmihesg
d003fcd662 Support sysctl on OpenBSD
Fixes #1233
2016-12-08 11:23:39 -05:00
fperks
11dbd985b6 Fix error on ec2 status change
Both `source_dest_check` and `termination_protection` variables are not
available within the scope of the startstopec2 instance method. This just
pulls them from module.params.
2016-12-08 11:23:39 -05:00
James Cammarata
3e6f39dd2b Adding version file for core modules on devel branch 2016-12-08 11:23:39 -05:00
Adrian Lopez
624e95d718 Fix yaml syntax 2016-12-08 11:23:39 -05:00
fxfitz
61cdc2ae90 Fixed spelling mistake: missing 2016-12-08 11:23:39 -05:00
Brian Coca
5b1a508d6a restored quotes to checksum description to avoid breaking docs 2016-12-08 11:23:39 -05:00
Gerard Lynch
27f93bef40 minor doc fix 2016-12-08 11:23:39 -05:00
muszynski@so1.net
2e3ad2b80a description for the get_url module describing checksum verification before file download 2016-12-08 11:23:39 -05:00
Colin Hutchinson
d70c33f932 make a text link into a actual hyperlink
the text link doesn't fit on some screen resolutions. Making it into sphinx hyperlink will solve that
2016-12-08 11:23:39 -05:00
Matias De Carli
f2bc0a6d85 keep backwards compatibility 2016-12-08 11:23:39 -05:00
Simon Li
607b7c14bd Fix incorrect variable in group.py: user -> group 2016-12-08 11:23:39 -05:00
Toshio Kuratomi
99659c8667 Fix docs build 2016-12-08 11:23:38 -05:00
David Shrewsbury
bf9c3e0092 Add author to os_router 2016-12-08 11:23:38 -05:00
David Shrewsbury
78ea0df607 Deprecate older router modules.
The quantum_router_gateway.py and quantum_router_interface.py modules
are deprecated with this change.
2016-12-08 11:23:38 -05:00
James Cammarata
395253c581 A few bug fixes and tweaks for the accelerate module 2016-12-08 11:23:38 -05:00
Brian Coca
45907f2ff3 removed typo 2016-12-08 11:23:38 -05:00
Brian Coca
d55ba3ab7c removed syslog in favor of common module logging functions 2016-12-08 11:23:38 -05:00
Brian Coca
682cb99d45 revert must_exist 2016-12-08 11:23:38 -05:00