Commit graph

9544 commits

Author SHA1 Message Date
Gilad Peleg
9cb4388f9e Add state=running on some ec2 examples
`state=running` was missing in some of the ec2 module examples
2016-12-08 11:23:45 -05:00
Sarah Haskins
3ad19e75cc Expose cache_parameter_group_name in elasticache module
The cache_parameter_group_name was not previously exposed in
elasticachy.py, I have exposed it, as optional.
2016-12-08 11:23:45 -05:00
Bill Nottingham
8fdf18cfa1 win_msi: document extra_args
The extra_args parameter was not documented. It's needed for installing some MSIs.
2016-12-08 11:23:45 -05:00
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
Toshio Kuratomi
2619ec5321 Fix issues version_added and chaged => changed typo 2016-12-08 11:23:45 -05:00
sysadmin75
12c2c2b436 Adds tmp_dest option to get_url module. Addresses the issue in ansible/ansible#9512 2016-12-08 11:23:45 -05:00
Michael Schuett
e61a4f2fb5 Fix message
Previous fix did not actual work. This fix does however.
2016-12-08 11:23:45 -05:00
Michael Schuett
0cefc2358b Handle connection error
Try and help when mac hits a connection error.
2016-12-08 11:23:45 -05:00
Michael Schuett
536bfb521a remove .geturl()
Can't call geturl on a string.
2016-12-08 11:23:45 -05:00
Michael Schuett
6ff693f975 Remove faulty logic
Update logic after splitting the error into two separate messages.
2016-12-08 11:23:45 -05:00
Michael Schuett
5a20bb473b Documentation Fix
Updated documentation to match current module state.
2016-12-08 11:23:44 -05:00
Michael Schuett
8d1f8dacba Improve Message
Give user a course of action in the case where the suggestions do not
work. This will hopefully allow us to work through any further issues
much faster.
2016-12-08 11:23:44 -05:00
Michael Schuett
53294dbaaa Improve Error Reporting
This will hopefully help mac users be able to quickly resolve any issues
they may find when trying to use this module.
2016-12-08 11:23:44 -05:00
Michael Schuett
75a61ae6e1 docker_image TLS
Check commit enables using tls when using the docker_image module. It
also removes the default for docker_url which doesn't allow us to check
for DOCKER_HOST which is a more sane default. This allows you to use
docker_image on OSX but more documentation is needed.
2016-12-08 11:23:44 -05:00
Brian Coca
c8a7c25468 code cleanup and reoorg, renamed vars and functions to actual purpose reneabled logging of steps 2016-12-08 11:23:44 -05:00
Brian Coca
3906fd426b document mysql collation can only be set during creation 2016-12-08 11:23:44 -05:00
Toshio Kuratomi
fda9eeaa89 Use select in wait_for so that we don't get stuck in cornercases:
* reading from a socket that gave some data we weren't looking for and
  then closed.
* read from a socket that stays open and never sends data.
* reading from a socket that sends data but not the data we're looking
  for.

Fixes #2051
2016-12-08 11:23:44 -05:00
Toshio Kuratomi
f6353a548c Document and return an error if httplib2 >= 0.7 is not present. We
can't use httplib2 0.6.x and below because they do not verify TLS
certificates and thus are insecure.

Fixes #1875
2016-12-08 11:23:44 -05:00
Brian Coca
f7f8df1773 since find doesn't make changes, support check mode and gather data for other tasks in check mode 2016-12-08 11:23:44 -05:00
Toshio Kuratomi
5425f3e757 Correct typo in yum module docs 2016-12-08 11:23:44 -05:00
Jonathan Mainguy
833676960d Update doc to reflect password is required if adding a new user 2016-12-08 11:23:44 -05:00
Jonathan Mainguy
346c9ab80e Update error message to be more explicit 2016-12-08 11:23:44 -05:00
Toshio Kuratomi
a179d06a91 Simplify logic to handle options set to empty string
Fixes #2125
2016-12-08 11:23:44 -05:00
Patrick Galbraith
223c689ec0 Fix to issue 12912. Supply 'force' to install of python-apt. 2016-12-08 11:23:44 -05:00
Toshio Kuratomi
5f87f9deda Note the difference between yum package groups and environment groups.
Fixes https://github.com/ansible/ansible/issues/12873
2016-12-08 11:23:44 -05:00
Brian Coca
d2cffb31c3 rearranged systemd check, removed redundant systemctl check fixed unused cmd and state var assignements 2016-12-08 11:23:44 -05:00
Simon Hafner
923e442409 added earlier paths to systemd
2b583ce657
b925e72633
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
51fae74e7c make os_router return a top level 'id' key
make os_router return a top-level 'id' key, much like other
os_* resources.
2016-12-08 11:23:43 -05:00
James Cammarata
4faff0a56a Version bump for new beta 2.0.0-0.4.beta2 2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
45cc987fe0 allow os_port to accept a list of security groups
with this commit, the `security_groups` attribute for `os_port` will
accept either a common-delimited string or ` YAML list.  That is, either
this:

    - os_port:
        [...]
        security_groups: group1,group2

Or this:

    - os_port:
        [...]
        security_groups:
          - group1
          - group2
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
c96dd16d5a allow os_server to accept a list of security groups
This commit allows the `security_groups` parameter of the `os_server`
module to be either a YAML list or a common-delimited string (much like
the `nics` attribute).  E.g., this:

    - os_nova_server:
        [...]
        security_groups:
          - default
          - webserver

Or this:

    - os_nova_server:
        [...]
        security_groups: default,webserver
2016-12-08 11:23:43 -05:00
Simon Hafner
4af48e139c simpler way to check if systemd is the init system
According to
http://www.freedesktop.org/software/systemd/man/sd_booted.html
check if the directory /run/systemd/system/ exists.
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
45012ea723 allow empty description attribute for os_security_group
The `os_security_group` module would fail if there was no `description:`
attribute:

    localhost | FAILED! => {
        "changed": false,
        "failed": true,
	"msg": "Error creating security group larstest: Invalid input for
	description. Reason: 'None' is not a valid string."
    }

This commit makes the default description `''` rather than `None`.
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
ff090a1224 make os_keypair return a top level 'id' key
make os_keypair return a top-level 'id' key, much like other os_*
resources.
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
bdd73fdfd0 make os_flavor return a top-level 'id' key
make os_flavor return a top-level 'id' key, much like other os_*
resources.
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
c1e081fcf6 make os_network correctly report changed status
The `os_network` module was incorrectly returning changed=False whether
or not the network was created.  This commit makes the changed return
value useful.
2016-12-08 11:23:43 -05:00
Lars Kellogg-Stedman
70bd95b4f0 return information about created subnet
make os_subnet behave like os_network in terms of returning information
about the created resource.  With this commit, os_subnet will return the
created subnet in `subnet` and the subnet id in `id`.
2016-12-08 11:23:43 -05:00
Brian Coca
14455f4acc final form, use_regex now controls if patterns is glob or regex - fixed cases in which stat fails (dangling symlink) - now properly reports name of skipped paths 2016-12-08 11:23:43 -05:00
Brian Coca
3e5dc1fd74 changed so regexes and shell globs work transparently 2016-12-08 11:23:43 -05:00
Evan Carter
956fe4c709 add documentation stating that JSON files can be loaded with include_vars 2016-12-08 11:23:43 -05:00
Ryan Sydnor
8a1c035fac Add capability for stat module to use more hash algorithms
Specifically, the stat module now has a checksum_algorithm parameter.
This lets the module utilize one of the hash algorithms available on the host
to return the checksum of the file.

This change is backwards compatible. The checksum_algorithm defaults to
sha1 and still returns its result to the stat.checksum property.
2016-12-08 11:23:43 -05:00
David Shrewsbury
f086279a23 Fix for routers without external interfaces 2016-12-08 11:23:43 -05:00
Monty Taylor
c2b695390b Actually pass in is_public to create_image
Fixes #2325
2016-12-08 11:23:43 -05:00
Brian Coca
e0d4d397ff fixed mispelled description 2016-12-08 11:23:42 -05:00
Etherdaemon
63c8c40a37 Update try statement as pointed out by defionscode 2016-12-08 11:23:42 -05:00
Brian Coca
505467d2ff clarified ping module purpose 2016-12-08 11:23:42 -05:00
Toshio Kuratomi
a5d95b4047 Another fix for docs 2016-12-08 11:23:42 -05:00
Toshio Kuratomi
ac58ef1404 Correct docs build 2016-12-08 11:23:42 -05:00
Brian Coca
7c0dc323a2 corrected docs for stat's lnk_source fixes #12850 2016-12-08 11:23:42 -05:00
Toshio Kuratomi
80b3bbd55e Mark a few parameters as no_log 2016-12-08 11:23:42 -05:00
David Shrewsbury
024b8365c2 Clarify password requirement and add return docs. 2016-12-08 11:23:42 -05:00
David Shrewsbury
c66491c076 Add OpenStack Keystone User module
This is a replacement for PR #1598 and fixes #283
2016-12-08 11:23:42 -05:00
Constantin Bugneac
55afa7e944 Added documentation for returned structure 2016-12-08 11:23:42 -05:00
Etherdaemon
9fe689eaec fixes #12831 by updating the boto iam connection method to connect_to_region 2016-12-08 11:23:42 -05:00
Constantin Bugneac
aa887ce49f Included 'block_device_mapping' in the output of module and other missing attributes 2016-12-08 11:23:42 -05:00
Brian Coca
baeb6d8dc0 fixed bug in spec 2016-12-08 11:23:42 -05:00
Brian Coca
a964754484 added regex support to find, also added 'singular' aliasess to patterns and paths 2016-12-08 11:23:42 -05:00
Brian Coca
9f503540f1 added missing version_added to new accesslogs feature 2016-12-08 11:23:42 -05:00
David Shrewsbury
92e6e2f7ea Fix os_router to accept internal interfaces
Allow the 'interfaces' attribute to represent internal router
interfaces, composed of subnet names, and the 'external_fixed_ips'
attribute to represent external interface subnet/IP.
2016-12-08 11:23:41 -05:00
Toshio Kuratomi
d5f3ac2a1d Remove debugging 2016-12-08 11:23:41 -05:00
Toshio Kuratomi
931fa9b6b2 xmlcharrefreplace is only for encoding, not for decoding :-( 2016-12-08 11:23:41 -05:00
Brian Coca
721f587e43 made output match multiline, as per posted code from @n0trax fixes #2081 2016-12-08 11:23:41 -05:00
Brian Coca
0540769677 specified that uri must be uppercase 2016-12-08 11:23:41 -05:00
Lars Kellogg-Stedman
fc741057b2 add some unit tests for the os_server module
This commit adds some unit tests for the `cloud.openstack.os_server`
module.  These tests exercise `_network_args` thoroughly and
`_create_server` lightly.

These tests will **fail** until #2275 lands.

To run the tests:

    pip install -r test-requirements.txt
    PYTHONPATH=$PWD py.test
2016-12-08 11:23:41 -05:00
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