Commit graph

15760 commits

Author SHA1 Message Date
Andreas Olsson
40f9f98f7c Fix documented defaults in the nsupdate module (#23532)
Let the documentation reflect what the module actually implements.
2017-04-15 17:09:47 +01:00
Manuel Sousa
8b4f5ba064 Fix #23338 - rabbitmq_queue message ttl can't be 0 (#23448) 2017-04-15 00:51:40 +02:00
Peter Sprygada
c2370f14dd fixes issue where network modules would ignore provider host value (#23589)
This addresses a problem where the action plugin would ignore the
remote_addr value for the host.  In this case, only the inventory values
for the hostname would be considered and populate the remote host
remote_addr value for the connection plugin.
2017-04-14 15:38:52 +05:30
Brian Coca
313591f8b8 removed debug print 2017-04-13 15:12:40 -04:00
Bradley Phipps
abf5d6e682 eu-west-1a is an availability zone, not a region. (#23557) 2017-04-13 12:11:00 -07:00
Dag Wieers
246c84b92a Windows: Get rid of Set-Attr in remaining modules (#23525)
Only a few more modules were using Set-Attr on the $result object rather
than using a normal hashtable. This PR changes the PSObject to a
hashtable and gets rid of Set-Attr.
2017-04-13 11:34:33 -07:00
Łukasz Kostka
94bd647bc0 Fix alarm action comparison (#23523)
This fixes issue when list from module contains more than one element.
Ansible and/or boto may put same elements in list in different order,
thus resulting task as changed.

Fixes #3310
2017-04-13 11:27:48 -07:00
claer
811eb66703 Improve Fortios IPv4 policy with logging capabilities and use the backup_filename param (#23544)
* Improve Fortios IPv4 policy with logging capabilities. While there, fix typos in examples. forti_config: use the backup_filename param and dont enforce the the filename value.

* forti-typos

* Add version_added for new options in the documentation
2017-04-13 12:20:06 -04:00
John R Barker
92a425a532 Make it easier to find network modules (#23576)
* Make it easier to find network modules

Feedback has been it's difficult (via Google or directly) to find
modules as some people search for the company name vs product name,
therefore specify both.

* "IOS XR" (not "IOS-XR")
2017-04-13 12:14:33 -04:00
John R Barker
2bb25d031b network_cli modules don't always return stdout or stdout_lines (#23573)
It's possible that if the module has a low-level failure, such as
"unable to open shell", or something else in the action plugin that
stdout and stdout_lines will not be returned.

Update the documentation to clarify this point.
2017-04-13 11:59:23 -04:00
Brian Coca
952e842720 less code 2017-04-13 11:21:11 -04:00
Matt Parkes
f0f20d8a1c ini_file 'create' parameter default value should be True
Updated create default value to True to match documentation (and common sense).
2017-04-13 11:08:21 -04:00
Brian Coca
5b7e8a7bd6 centralize ansible_managed and other template vars
now template lookup supports these again.
2017-04-13 11:03:11 -04:00
Brian Coca
f7566ef1f1 removed extra 'changed' from debug output 2017-04-13 11:03:11 -04:00
Senthil Kumar Ganesan
c86feeaed9 Error string:Regular expression updates (#23426) 2017-04-13 09:12:32 -04:00
Brian Coca
df5895e585 fix environment validation, make setup exception
removed bare vars
now environment inheritance correclty prepends
this allows more local to override more general

fixes #23180
2017-04-12 18:34:29 -04:00
Patrick Marques
731fc288fa fixes #4441 passing subnet_name parameter (#18920) 2017-04-12 10:58:56 -07:00
John R Barker
902bc58509 [WIP] Network return docs (#23441)
Network return docs
2017-04-12 13:13:41 -04:00
Jamie Lennox
92dc61e869 Allow modifying security groups in os_server (#23207)
When the security groups specified to the os_server module change they
should be updated on the server. This will require shade 1.19 where the
server security group commands were added.

Fixes: #23206
2017-04-12 18:19:15 +02:00
Colin Nolan
57c67f0c08 Add checks to confirm that the output from xfs_info has the expected format. 2017-04-12 08:34:51 -07:00
Abhijeet Kasurde
ba3295dd3f Pylint fixes for yum module
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-11 16:31:35 -07:00
Abhijeet Kasurde
db6d818865 Fix atomic pylint issues
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-11 16:26:51 -07:00
Sloane Hertel
2f64e2c7fb [cloud] ec2_asg: check autoscaling group for tags before trying to use them - partially fixes #23234 (#23259)
* check autoscaling group for tags before trying to use them

* Add warning

fix comparison
2017-04-11 16:15:05 -04:00
Sloane Hertel
5f517fdfa9 [cloud] route53_zone: allow split horizon for route53_zone and refactor - fixes #22939 (#23190)
* allow split horizon for route53_zone and refactor

* fix documentation

remove comment

fix version_added

* Remove unused imports

* Only include zone as matching if it has the same privacy setting

* Use `.endswith` instead of indexing into a string

* Update public zone behavior to only create new if there is no matching public zone

* Remove from legacy PEP8 files
2017-04-11 16:02:14 -04:00
Ritesh Khadgaray
40d888922b stat: better documentation
- md5 fails if the file is not a regular file ( symlink, dir,..)
2017-04-11 12:19:07 -04:00
Albert Casademont
54316f7da0 Fix Postgres user module always reporting changes (#23488) 2017-04-11 08:09:16 -04:00
Hao Wang
3b5dd4e0a0 file module doesn't create hard link to given target directory 2017-04-10 12:20:46 -04:00
Toshio Kuratomi
b4f976e9b9 When apt errors, include it's exit code
We invoke /usr/bin/apt inside of the ansible module.  When that command
exits, it doesn't always include a helpful error message.  Include the
exit code so that user's have all the information we can gice them as to
why apt failed.

Addresses #19128
2017-04-10 11:41:09 -04:00
Luis Rueda
753d30b64d Rebase using latest devel branch in order to fix conflicts (#23199) 2017-04-09 18:06:06 -04:00
Ken Celenza
83a6d90899 Update Banner Doc (#23412)
I think most people's banner will come from an external file. Show an example, and clarify there is no extra lines allowed.
2017-04-09 17:00:54 +01:00
Khachatur Nazaretyan
e8f1747a88 Adds attached volumes to instance facts (#23132)
* Adds attached volumes to instance facts

* Fixed identation and modified coding style

* includes revisions after maintainers review

* Coding style modified

* simplifies getting items from dict
2017-04-09 11:59:41 +02:00
Indrajit Raychaudhuri
971187e54c pacman: Fix package matching pattern in upgraded package list (#23433)
(cherry picked from commit 9a850db605)
2017-04-09 11:39:40 +02:00
Dmitry Sobolev
1cf607d8a8 Telegram notification module updated (#22858)
* msg_format parameter added
error message received from telegram API is added to fail json
compatibility with python3 added
* pep8 formatted
* version_added property added for msg_format
* bot token must be set without 'bot' prefix in module parameters
* formatting options described in documentation
* six module for compatibility used
telegram.py removed from legacy-files.txt
2017-04-08 12:53:35 -07:00
Dag Wieers
a075c56dbf vmware_guest_facts: Add delegate_to directive to example (#22931)
Without it, this is not going to do what most people expect.

This fixes #22840
2017-04-08 07:10:35 +01:00
Lucas Alvares Gomes
cee8cc2a52 rpm_key: Decode bytes to string to work with Python 3 (Fixes #20326) (#20385)
* rpm_key: Decode bytes to string to work with Python 3 (#20326)

The read() method will return bytes we need to then decode() those bytes
to a string before trying to match() it using the re module.

* Make the rpm_key pgp regex more robust on both py2 and py3
2017-04-07 16:22:39 -07:00
Nathaniel Case
86c714548f Redo #23418 (#23425)
* Check for provider values inside check_args of respective network code

* Partial revert of b9ee5aa

The no_log change is okay, but take out the action result munging
2017-04-07 19:22:17 -04:00
Karl Bergström
c7860d4d4b Open unarchive file in binary mode
Recent Python3 versions require open() to specify binary mode if the data is anything other than text.

Python3: Use int() instead of long() in unarchive

Changes long() to int() for CRC values in the unarchive module. Affects unarchiving of zip files. Since CRC values in zipfile are 32 bits the behaviour should be unchanged even in Python 2.
2017-04-07 15:05:25 -07:00
Paul Montero
1963e506ec Open file in binary mode for python3 2017-04-07 14:47:28 -07:00
Toshio Kuratomi
2fdb8e7f90 Fix a traceback with python3 and diff output
When retrieving file contents for diffing we need to get the contents as
binary.  Otherwise python3 will try to convert the file to text and fail
with non-decodable contents.

Fixes #23171
2017-04-07 14:35:50 -07:00
Chris Alfonso
d4bd54d3b8 Fixes #23388 Network provider masks too much (#23418)
* Fixes #23388 Network provider masks too much

* Fix trailing whitespace
2017-04-07 14:34:47 -06:00
Dag Wieers
3648e6fd2b vmware_guest: Add delegate_to directive to examples (#22932)
Without this it is likely not going to do what people expect.
2017-04-07 18:17:18 +01:00
Brian Coca
0d5d5f2bf6 correctly get all hosts in 'all' 2017-04-07 13:17:03 -04:00
Pierre-Alexandre
283a88444f BUGFIX : using yaml hosts inventory, hosts in groups weren't added to the group 'all' 2017-04-07 13:16:14 -04:00
Matt Martz
621e27b5dd Urls client cert auth (#18141)
* Build HTTPSClientAuthHandler more similarly to how HTTPSHandler works

* Add docs for new client cert authentication

* Support older versions of python

* Simplify logic

* Initial support for client certs in urls.py

* Add an extra test

* Add a get_url test for client cert auth

* Add additional test for client cert auth, with validation and ssl mismatch

* Skip assert when http tester not available

* Update version_added for new options
2017-04-07 09:54:37 -07:00
Ganesh Nalawade
3934513121 Fix a10 pylint issues (#23410)
* Fix a10 pylint issues
* Moving imports to standard location
2017-04-07 22:23:55 +05:30
Toshio Kuratomi
78ced5318f Fix for recursive copy slowness
Copy module was walking over files in subdirectories repeatedly (a
directory tree a few levels deep could bring the time spent into the
tens of minutes)

This was traced to the fix for this bug report: https://github.com/ansible/ansible/issues/13013

Fixed #13013 a different way and added an integration test to check for
regressions of #13013 as we optimize this code.

Fixes #21513
2017-04-07 12:41:42 -04:00
Matt Martz
13ac993d25 Fallback to old ssl_wrap_socket 2017-04-07 09:19:26 -07:00
Matt Martz
33f7a27cba Use PyOpenSSLContext instead of deprecated wrap_ssl_context from urllib3.contrib.pyopenssl. Fixes #18528 2017-04-07 09:19:26 -07:00
Strahinja Kustudić
9f0be5a556 Ignores ControlPersist broken pipe errors. Fixes #16731
Ansible will now automatically retry a connection if SSH returns an error:

mux_client_hello_exchange: write packet: Broken pipe

This is probably a bug in SSH, but because it's safe to retry this
connection there is no need for Ansible to fail because of it.
2017-04-07 09:06:28 -07:00
Ricardo Carrillo Cruz
ba7ba7adc3 Check for proper response key on eos_banner map_config_to_obj (#23399)
If we run the task with 'login' banner, the 'show banner' command
will return a dict containing key 'loginBanner'.
However for motd, it will just return 'motd'.
Yay naming consistency!
2017-04-07 15:32:10 +02:00