Commit graph

16163 commits

Author SHA1 Message Date
Nathaniel Case
689b93bf14 Junos_config unicode (#23369)
* Try to handle unicode output more sensibly

* Appears I'm getting latin1 instead

Ugh.
2017-04-27 11:44:26 -04:00
John R Barker
1c61b9bae7 Split modules/network into two parts (#24024)
* Split modules/network into two parts

Given the dedicated team we we have working on Ansible Networking a
clearer split is needed between Networking modules and "things that
happen to use the network"

* nmcli to net_tools

* nmcli moved
2017-04-27 16:42:41 +01:00
Colin Chan
2d9d1762ba Improve parsing of 'systemctl show' output 2017-04-27 11:42:26 -04:00
Nathaniel Case
fc0bf87c20 Run save inside config mode. (#23977)
* Run `save` before exiting config mode.

* Fix unit tests for `save`

* Allow `save` to be on its own again and introspect success

* Introspecting `compare running` makes this a lot harder.

Move `save` tests to integration tests
2017-04-27 11:08:37 -04:00
Ganesh Nalawade
1f7c2c63c2 Fix python version check issue (#24063)
Fix python version check issue
2017-04-27 20:10:58 +05:30
Ricardo Carrillo Cruz
2716fad38f Return commands instead of command (#24061)
Ok, so for openvswitch_db in particular we just return one command
but in the sake of consistency and code re-use, let's return a list
of "commands", even if it's just one.
2017-04-27 16:36:08 +02:00
Abhijeet Kasurde
9456f93ea8 Pep8 fixes for known_hosts.py (#24029)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-27 09:21:49 -05:00
Andrea Tartaglia
1d0a629dcc Fixed docs for cloud modules (#23745)
* Fixed docs for cloud modules

* removed blank line in ec2_snapshot_facts
2017-04-27 12:01:11 +01:00
Senthil Kumar Ganesan
ce99ffe205 Fixed PEP8 issues (#24030) 2017-04-27 11:41:43 +01:00
Ganesh Nalawade
7d710882a8 Fix exception issue in junos_config (#24049)
ParseError execption is added to ElementTree
in py2.7. Prior to py2.7 need catch ExpatError
execption
2017-04-27 13:16:40 +05:30
Andrej Svenke
3185ec94c5 ecs_service: add tasks placement constraints and strategy. (#20503)
ecs_service: documentation fix.

ecs_service: updated version_added.

ecs_service: pep8 fixes.
2017-04-27 08:33:23 +01:00
Toshio Kuratomi
51e3390333 Document deprecation of fetch module validate_md5 and update --tags merging deprecation (#24022)
* Document deprecation of fetch module validate_md5 and update --tags merging deprecation

Update the default of --tags merging config option to merge by default

* Update CHANGELOG.md

Minor edit
2017-04-26 19:57:21 -07:00
jctanner
a5d6d3b9af Remove unused+circular import in listify.py (#24038) 2017-04-26 16:56:00 -04:00
Nathaniel Case
0d67a49d5a nxos_bgp fixes (#23927)
* Pre-emptively fix sanity/pep8

* fix for commands

* Quick unit test
2017-04-26 16:33:54 -04:00
Nathaniel Case
c0ebdf144d nxos_acl_interface fixes (#23917)
* Update nxos_acl_interface

* Add basic unit tests to nxos_acl_interface
2017-04-26 16:32:36 -04:00
Nathaniel Case
f0914ee3c2 nxos_acl fixes (#23915)
* Update nxos_acl

* unit tests for nxos_acl

* Remove nxos_acl from pep8-legacy
2017-04-26 16:29:53 -04:00
Toshio Kuratomi
bffccb5396 fetch idempotence test and deprecate validate_md5
Added an integration test for fetch module idempotence.  (Testing
that validate_checksum is doing what it's supposed to is harder as we'd
have to create a race condition with the downloaded data to trigger it.
Probably need to make that a unittest eventually).

Also give a deprecation message to the validate_md5 parameter so that we
can eventually get rid of it.
2017-04-26 12:00:01 -07:00
KeepZero
98e7d4b49d Set validate_checksum default yes of fetch to match the doc 2017-04-26 09:27:06 -07:00
Abhijeet Kasurde
86a63cfcd7 Handle fetch_url error gracefully (#23821)
Fix adds http response code check for fetch_url.
Also, method in fetch_url call.

Fixes https://github.com/ansible/ansible/issues/23800

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 10:35:40 -05:00
Giuseppe Scrivano
d02a9016a2 Atomic containers (#21366)
* atomic_image: add support for pull --storage=

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

* atomic_container: new module

Manage atomic containers

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-04-26 08:21:08 -07:00
Andrea Tartaglia
d1517f997a fixed RETURN docs for modules (#24011)
* fixed RETURN docs for remaining modules

* updated proxymysql_mysql_users 'sample' to yaml dict

* fixed whitespace errors
2017-04-26 15:56:13 +01:00
Patrick Ogenstad
9a0a7f78d7 asa_command: set default_output to text (#23979) 2017-04-26 09:46:39 -04:00
ka7
b11219440b spelling fixes (non-trivial, might catch a bug) (#23646) 2017-04-26 13:14:34 +01:00
Abhijeet Kasurde
d16fe5bef3 Minor typo and PEP8 fixes for dnf module (#23845)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:57:49 +01:00
Abhijeet Kasurde
9fbbb5e10f Pep8 fixes for mysql module (#23923)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-26 12:56:35 +01:00
cptchips
dde383aea2 [Doc] win_package - product_id is a mandatory parameter (#24007)
product_id is a mandatory parameter for windows/win_package module.
2017-04-26 12:36:12 +01:00
Sumedh Sidhaye
be6ca006a2 Corrected -su cmdline option to --su to be consistent with the man page entry (#23899)
Signed-off-by: Sumedh Sidhaye <ssidhaye@redhat.com>
2017-04-25 21:26:20 -07:00
Brian-Williams
8466c808d9 Change wait_for time to utc (#23987) 2017-04-25 17:04:29 -05:00
Brian Coca
e29dc49a49 moved to exceptions for basic skip/fails
better handling of checkmode and async
fix test to follow new flow control
2017-04-25 14:48:56 -04:00
Ricardo Carrillo Cruz
a3a970180a Unit tests for openvswitch_db module (#23974) 2017-04-25 20:02:55 +02:00
Ganesh Nalawade
09b8badc5e Minor junos_config module changes (#23972)
* Minor junos_config module changes

* Add note for json config support
* Add example for lines argument
* Fix future warning for ElementTree

* Remove unwanted space
2017-04-25 23:09:55 +05:30
Ganesh Nalawade
15c19367d6 Fixes #23960 junos_config fail with config in xml (#23962)
If config is in xml format append it to <configuration>
tag as a instance of Element class.
2017-04-25 22:40:16 +05:30
Chris Madden
8e7c546ef9 Fix name description from lun to volume (#23964)
Help text stated to manage lun name but this module is for managing volumes.  Updated accordingly.
2017-04-25 11:08:43 -04:00
Brian Coca
1a0b94fa17 schedule sudo/su removal 2017-04-25 10:54:23 -04:00
René Moser
3959597f7d exoscale: fix TXT type records handling (#23956) 2017-04-25 13:05:37 +02:00
Trishna Guha
f354bd1eab Set terminal width for network *_command modules to avoid paging (#23728)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-25 14:10:39 +05:30
Trishna Guha
47edac6ebd Remove repetition of code nxos (#23908)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-25 08:37:22 +05:30
Indrajit Raychaudhuri
45252b79be pacman: Fail fast when 'rc != 0'
We fail-fast and display 'stderr' in case 'pacman' returns with 'rc != 0'.
There is no point computing 'module._diff' in such case anyway.

Fixes #23910

(cherry picked from commit 8c6a2a848c)
2017-04-24 21:12:20 -04:00
Brian Coca
72a4e1cf0d fixed code to actually check the parameter not key
also made rest conditional on unit being provided, previouslly it changed from being always required

fixes #23810 alternate to #23907
2017-04-24 20:54:14 -04:00
Kai
cb13aea88b Fix systemd in chroot (#23904)
* Fix systemd in chroot

The 'request ignored' message is in stderr, not stdout.

* Check both stdout and stderr for systemd message

Some versions of systemd report to stderr, others to stdout. Also check
whether output could be a valid normal response to avoid false positives.
2017-04-24 19:53:12 -04:00
Sloane Hertel
d021d8f16b efs: include name in results (#23931) 2017-04-24 17:49:14 -04:00
Sloane Hertel
380ac577c6 [cloud] ec2_facts: make ec2_facts python3 compatible - fixes #23595 (#23872)
* make ec2_facts python3 compatible

* remove parentheses and use pop() instead of del
2017-04-24 16:09:46 -04:00
Brian Coca
a108f0fcd3 avoid hosts 'pre templated warnings' (#23878)
* avoid hosts 'pre templated warnings'

fixed is_template failing on undefined
fixes #23057

* py3 compat
2017-04-24 15:19:52 -04:00
Adrian Likins
e0a7105c2d Use sys.stdout.buffer to write vault bytes to stdout on py3 (#23760)
* Use sys.stdout.buffer to write vault bytes to stdout on py3

We need sys.stdout.buffer on py3 so we can write bytes to it since the plaintext
of the vaulted object could be anything/binary/etc

Before, attempting to write bytes to stdout on py3 would cause:

  TypeError: write() argument must be str, not bytes
2017-04-24 10:09:03 -04:00
Ondra Machacek
80327d9d47 cloud: ovirt: import VM from external source (#22450) 2017-04-24 08:59:35 -04:00
Sloane Hertel
00ebd0c89d make lineinfile docs clearer and make module pep8 (#23857) 2017-04-23 09:19:22 +02:00
Brian Coca
35e03cb140 p8p 2017-04-21 23:36:44 -04:00
Brian Coca
27185f44b0 fix environment populated detection
fixes #23764
2017-04-21 18:21:01 -04:00
Ondra Machacek
13c2c292f2 cloud: ovirt: add note that modules works with RHV as well (#23808) 2017-04-22 00:20:24 +02:00
Brian Coca
4594bee65a keep unsafe .. unsafe (#23742)
* keep unsafe .. unsafe

fixes #23734, which was broken in previous fix that allowed non string types to be templated
use new 'is_template' function vs bastardizing others
refactored clean_data to allow for arbitrary data structures to clean
fixed/removed some tests

* deal with complex data for is_template

* typos
2017-04-21 16:07:38 -04:00
Brian Coca
3358abcf49 Add a new filter: strftime. Use the well known function to format a date output. (#23832)
(cherry picked from commit 3f5b304fc2)
rebased for @yannig
2017-04-21 11:48:45 -07:00
Ricardo Carrillo Cruz
8517fbf936 Remove catch-all regex on IOS terminal plugin (#23858)
We have a list of specific messages that we scree-scrape and flag
them as legit errors.
However, we also have a catch-all regex that matches everything
starting with %.
That can cause issues on commands that return lines with that
character, like for example the 'crypto key generate'.

Fixes #23770
2017-04-21 15:30:23 +02:00
Ganesh Nalawade
04ae977f39 Fix display argument defualt value (#23859) 2017-04-21 18:58:38 +05:30
Michael Scherer
78836ec0b9 Fix --force for unversionned requirements (#23391)
In current stable (2.2), ansible galaxy install --force do erase
a role, even if the version is not set. This commit should restore
that specific behavior, in accordance to people reports:
  https://github.com/ansible/ansible/issues/11266#issuecomment-273801480

It was also the behavior planned in the initial discussion:
"if you're not fixing versions in your roles file, then it's fine
to expect that the role will be reinstalled each time you run
ansible-galaxy install.", cf https://github.com/ansible/ansible/pull/12904
2017-04-21 07:40:47 -04:00
Ricardo Carrillo Cruz
d0fd8cefaa Fix the iosxr_facts mem gathering (#23850)
We were not calling match.group, plus we were lacking a ':' from
the expected output of 'show memory summary'.

Fixes #23737
2017-04-21 10:41:50 +02:00
Trishna Guha
8ec4882ba0 Add eos_user module to users parameter (#23847)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-21 13:22:59 +05:30
Ganesh Nalawade
01afe12cba Add doc for display argument of junos_command (#23804) 2017-04-21 02:31:51 -04:00
Matt Davis
02ed223d49 template hostvars for set_host_overrides (#23839)
* fixes #23586
* temporary solution until connection-specific vars are handled by play_context
2017-04-20 20:33:48 -07:00
Brian Coca
79b9c585ea less code
(cherry picked from commit 20d9f79a5250e764ffeddb046aeb82b7824ed952)
2017-04-20 22:05:55 -04:00
Brian Coca
eb887b8062 Revert "fixes play context connection user (#21776)" (#23830)
* Revert "fixes play context connection user (#21776)"

This reverts commit 58ee661437.
fixes #23530

* preserve original in copy

updated comment to clarify wtf is going on here
2017-04-20 18:03:03 -04:00
Abhijeet Kasurde
527a7762e1 Use regex variable in eos_user.py (#23797)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 17:04:09 -04:00
Sloane Hertel
91644167c9 improve exception handling (#23722)
make pep8
2017-04-20 16:40:37 -04:00
Sloane Hertel
11c292bac2 route53_facts: add example for how to use next_marker option - fixes #23625 (#23802)
* Add example for using route53 next_marker option

* make route53_facts pep8 and remove from legacy files
2017-04-20 16:34:43 -04:00
Nathaniel Case
0c2a0c7bce Eos port default values (#23829)
* Hook port back up for eos cli transport

* The default values have moved

* Why not have conditional defaults?
2017-04-20 15:58:45 -04:00
Brian Coca
b4b96143fe also skip polling when async failed 2017-04-20 15:47:24 -04:00
Nathaniel Case
9bcc3f298f EOS default transport (#23824)
* Give a default to eos transport
2017-04-20 15:02:42 -04:00
Matt Babineau
4914164717 Typo (#23778)
Missed that D...
2017-04-20 10:36:09 -07:00
Brian Coca
fe9af903f3 script fails on async 2017-04-20 11:49:10 -04:00
Brian Coca
602a2bca1b fix vars file selection
fixes #17382
alternate to #22979

deal with cases in which group/host have . in name
updated as per feedbck
only be strict about extension when doing dirs
also avoid ~ endings
2017-04-20 11:44:26 -04:00
Brian Coca
3965689328 finer grained failed/skipped on async for actions
fixes #23729
2017-04-20 10:58:50 -04:00
Logan Attwood
5bbf0d9cb6 Use isfile check on package manager paths 2017-04-20 07:42:58 -07:00
Brian Coca
631a10745d fix hashing when path is symlink 2017-04-20 10:35:59 -04:00
Trishna Guha
b2129a7d3a Add eos_banner as module to banner param (#23789)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-04-20 15:42:40 +05:30
Loïc Blot
504a768636 Show UUID instead of name when using UUID to select snapshot (#23787) 2017-04-20 11:11:04 +01:00
Abhijeet
cc745b0224 Minor typo in vmware_guest_facts (#23791)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-20 11:04:03 +01:00
Timo Benk
79943b86a1 fix ansible galaxy file mangling (#23703)
without this patch, ansible-galaxy will mangle files containing
the archive parent directory name, eg 'owncloud/files/owncloud.cron'
will become 'owncloud/files/.cron'.

The previous code could affect the entire path and even filenames.
If a file path has the top level dir name as a substring, galaxy
replaces it with ''. In one example, the archive top level dir
is 'go', so 'files/go-bin.sh' becomes 'files/-bin.sh'.

Fixes #22572, #23694, #23623
2017-04-19 14:15:20 -04:00
Toshio Kuratomi
a31e9bd9ea Really minor optimization and style change for d0e3d75381
* Use a generator expression instead of a list comprehension
* Use copy() to create a new set instead of the constructor.
2017-04-19 10:24:42 -07:00
Bart van Bragt
d0e3d75381 Remove whitespace from unix group names 2017-04-19 09:42:00 -07:00
Abhijeet
27f776f97d Fix for setting values using gconftool-2 (#23713)
Miscallenous fixes added to make gconftool-2 work.

Fixes https://github.com/ansible/ansible/issues/23670

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-19 14:20:21 +01:00
Sloane Hertel
d63af51f90 s3_sync: removing irrelevant s3.list_buckets() call - fixes #23409 (#23492)
* Removing irrelevant s3 call

Fix exception handling

Make s3_sync pep8 and remove from legacy file
2017-04-18 16:49:10 -04:00
Brian Coca
3f62dfda92 nicer docs 2017-04-18 13:13:14 -04:00
Adrian Likins
ae3d7fb29e Fix vault reading from stdin (avoid realpath() on non-links) (#23583)
* Fix vault reading from stdin (avoid realpath() on non-links)

os.path.realpath() is used to find the target of file paths that
are symlinks so vault operations happen directly on the target.

However, in addition to resolving symlinks, realpath() also returns
a full path. when reading from stdin, vault cli uses '-' as a special
file path so VaultEditor() will replace with stdin.
realpath() was expanding '-' with the CWD to something like
'/home/user/playbooks/-' causing errors like:

        ERROR! [Errno 2] No such file or directory: u'/home/user/ansible/-'

Fix is to specialcase '-' to not use realpath()

Fixes #23567

* to_text decrypt output when writing to stdout
2017-04-18 13:09:02 -04:00
Matt Martz
f82d95ae28 When become_method is su, self._play_context.prompt is a function. Fixes #23689 2017-04-18 13:01:18 -04:00
Ganesh Nalawade
bf1a543f06 Make warning logs consistent (#23666)
* Make warning logs consistent

Arguments outside provider with default
value should not log as warning in case
it is not mentioned in play.

* Make nxos timeout default consistent and add comments

* Make comments more verbose
2017-04-18 21:59:38 +05:30
Daniel Shepherd
698fa37a44 [cloud] Fix #23152 in route53 module and pep8 cleanup (#23156)
update module to support more standard state=present/absent syntax

update module to use required_if, required_together, mutually_exclusive functions where possible

per ryansb review: make documentation section more clear, fix some extra quotes, remove FIXME comment

pre willthames review: force private_zone to True if vpc_id is set and fix word wrap
2017-04-18 11:49:25 -04:00
Brian Coca
586fcae398 tolerate 'batch' systems that mess with stdin (#23596)
* tolerate 'batch' systems taht mess with stdin

fixes #23541

* have pause on windows tolerate devnull

* tuplie
2017-04-18 11:39:49 -04:00
Brian Coca
1ef2b6b302 added mongodb lookup docs 2017-04-18 11:12:09 -04:00
Nathaniel Case
0b4cebfb8b nxos_vlan tweaks (#23194)
* Remove commented code

Remove a lot of unnecessary output

* Tests

* Sort vlan ids _after_ running set operations, so order is not lost
2017-04-18 10:49:47 -04:00
Yanis Guenane
fdce6484ec crypto/openssl_csr: Specify proper Ansible version
The commit was started before 2.3 was branched, but was only merged once
2.3 was actually branched. This leads to documentation stating this
module is new in 2.3 when it will be actually new in 2.4
2017-04-18 15:46:07 +02:00
Kevin Brebanov
5775bb2a4e apk: Fix regex search patterns
Regex patterns were not being escaped properly so package names
containing characters that could be interpreted as regex symbols
were causing failures.

Fixes: #19714
2017-04-18 15:07:55 +02:00
adejoux
9f62ef7c0a Added AIX LV module (#20574)
* Added AIX LVM module

* implemented requested changes

* fixed Terabytes size calculation

* implemented recommendations from tmshn

* moved up lv display command definition

* added type to copies parameter

* applied recommendations

* missed chlv command

* fixed build error

* fixed typo in email address

* applied new pep reco

* fix bug
2017-04-18 15:05:08 +02:00
Will Thames
9229d53143 [cloud] Add ec2_vpc_dhcp_options_facts check mode (#23106)
* Support check mode in ec2_vpc_dhcp_options_facts

As a facts module, ec2_vpc_dhcp_options_facts supports check mode
by default

* ec2_vpc_dhcp_options_facts tidy up

Use named method imports, move imports to top of code
Use shared code to handle filters and tags
Use snake case for parameter names while retaining backward compatibility
2017-04-18 08:56:38 -04:00
Dag Wieers
071903b868 vmware_guest_snapshots: Add delegate_to directive to examples (#22933)
Without it it is not doing what most people would expect.
2017-04-18 12:53:55 +00:00
Toshio Kuratomi
a06014663c display path to module_utils files in verbosity vvv. 2017-04-17 15:08:14 -07:00
Andrew Gaffney
ce43e80d11 Allow specifying timeout on a per-host basis 2017-04-17 15:21:49 -04:00
Antoine Cotten
7c308b3f8c Fix nonexistent module_name in callbacks (#23587) 2017-04-17 12:16:19 -07:00
Ken Celenza
b8507b676b Remove Warning for provider (#23652) 2017-04-18 00:36:24 +05:30
Nathaniel Case
e1dcc01d3a pep8 fix for Shippable 2017-04-17 13:18:34 -04:00
Daniel
bbb9f3164c Nxos vxlan vtep vni netcfg fix (#23620)
* Code cleanup
Removed 'add' method from CustomNetworkConfig.  It is identical
to the one inherited from NetworkConfig

* Removed unused CustomNetworkConfig import

* Replaced
```
def get_existing(module, args):
    existing = {}
    netcfg = get_config(module)
    config = netcfg.get_section(parents)
```
with
```
netcfg = CustomNetworkConfig(indent=2, contents=get_config(module))
```
get_config returns a string, not an object in 2.3.

* Removed non-functioning get_object method in CustomNetworkConfig in favor of the
inherited method.

Added child_objs property so that expand_selection would work.  The original
verion never worked correctly as it compared NetworkConfig obj's and str's.

* Removed ShellError method in favor or new load_config method.

* Removed ShellError method in favor or new load_config method.
fixes #20260

* nxos requires a "no" statement to change mcase group.  Corrected.
Corrected changed logic.

* Corrected deleted CustomNetworkConfig import
2017-04-17 12:40:13 -04:00
Nathaniel Case
e518b6f5b4 Clean up import statements for nxos_rollback (#23540)
* Clean up import statements for nxos_rollback

* Don't try to deal with pre-2.3 logic
2017-04-17 08:51:38 -04:00
Ganesh Nalawade
89752cc34f Make logging consistent for network platforms (#23605) 2017-04-16 23:25:40 +05:30
Abhijeet
89fc098488 Update package installation warning (#23641)
Github_release requires github3.py==1.0.0a4, update warning
for the same.

Fixes https://github.com/ansible/ansible/issues/23626

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2017-04-16 07:10:36 -04:00
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
Matt Clay
48eeab8a53 Fix errors reported by pylint. (#23282)
* Fix pylint misplaced-bare-raise errors.
* Fix pylint return-in-init error.
* Fix pylint bad-format-character error.
* Fix pylint too-many-format-args errors.
* Fix pylint too-few-format-args errors.
* Fix pylint truncated-format-string error.
2017-04-06 16:58:16 -07:00
John R Barker
6633ae1afa look_for_keys & allow_agent actually added in 2.4
https://github.com/ansible/ansible/pull/22429 was merged, though not cherry picked into stable-2.3, so update docs
2017-04-06 19:17:59 +01:00
Guillaume Coré
3c75808c5c fix incorrect parsing of xfs_info
when device name ends with 'data' line matches in :
-                if 'data ' in line:

closes #23352
2017-04-06 11:11:13 -07:00
Toshio Kuratomi
dcc63c8f93 Fix imports and pep8 problems so CI can pass again. 2017-04-06 10:41:18 -07:00
Ricardo Carrillo Cruz
3537b24742 Unhardcode the port and protocol on eos EAPI (#23350)
We were hard-coding the protocol, port and validate_certs on
eos EAPI via the action plugin.
Put defaults on the eos_argument_spec and pull those values from it.
2017-04-06 19:18:28 +02:00
Toshio Kuratomi
5f4673b5ae Update metadata for openssl_csr 2017-04-06 10:16:50 -07:00
Ganesh Nalawade
0cd50f0706 Fix #22880 junos_config update issue (#23333)
For update parameter add 'override' as acceptable value.
'override' name is in sync with junos naming convention.
2017-04-06 12:59:33 -04:00
Chris Alfonso
394cb3477b Fixes loginBanner plucking over eapi transport when loginBanner isn't set. (#23363) 2017-04-06 10:58:04 -06:00
Ganesh Nalawade
990ba90380 Fix #23360 junos_config set format issue (#23365) 2017-04-06 10:45:15 -06:00
Nathaniel Case
98c23a3342 Attempt to clear up nxos_mtu tests and documentation (#23361)
nxos_system wasn't added until 2.3, so nxos_mtu should have been deprecated
then.
2017-04-06 12:26:17 -04:00
nerzhul
637e9942ff Nsupdate idempotency fix 2017-04-06 09:20:01 -07:00
Yanis Guenane
2705e7a8aa crypto: Add new module openssl_csr (#21004)
This new module allows one to automate the generation of OpenSSL
Certificate Signing Request. It supports SAN extension.
2017-04-06 18:09:07 +02:00
Peter Sprygada
f0008248d4 fix iosxr commands to encode json (#23346)
the command dict in the iosxr module_utils wasn't encoding the request
to json.  this patch will fix that problem
2017-04-06 15:44:21 +01:00
John R Barker
13dc02d49d More network_debug_troubleshooting.html (#23335)
More "unable to open shell" -> network_debug_troubleshooting.html
2017-04-06 12:39:59 +01:00
Takuya Sato
dff35bc205 ecs_taskdefinition module : Convert environment variables to string (#23297)
Before modification, it fails unless it is a string type
2017-04-06 10:46:40 +01:00
John R Barker
529df8640b 'unable to open shell' -> direct to web help (#23267)
* 'unable to open shell' -> direct to web help

The "unable to open shell" error is returned for a number of different,
direct people to online docs (we we can update out of band of releases)
to guide them though the various solutions.

* fix pep8 errors
2017-04-06 10:11:28 +01:00
Varadharajan
4540853a50 Pass CSRF token along with Jenkins POST requests (#23250) 2017-04-06 10:03:57 +01:00
Matt Davis
b71b157fb3 Cleanse CLIXML from win_shell stderr (#23329)
prunes all but Error stream values
2017-04-06 01:39:20 -07:00
Matt Davis
8d291f91ee improve become_method: runas error handling (#23328)
Prescriptive errors for username/password issues and NTLM/Kerb auth failures, cleans up exception noise.
2017-04-06 01:34:30 -07:00
Dag Wieers
e66c98281e Small consistency fixes (#23294) 2017-04-05 22:03:29 +01:00
Ricardo Carrillo Cruz
b9b4e68206 Check text key exists on eos_banner absent case (#23319)
This can fail if we don't check the key exists.
2017-04-05 21:07:18 +02:00
Chris Alfonso
3a78861cb5 Fixes #23308 ios_banner: KeyError: 'text' on state: absen (#23313) 2017-04-05 11:30:40 -06:00
Nathaniel Case
d890167575 Fix nxos_facts for nxapi transport (#23302)
* Partial revert of 2e476e64cd

This broke handling of nxos_facts over nxapi

* Fix nxos_facts tests not run in isolation
2017-04-05 11:47:37 -04:00
John R Barker
485affeb12 eapi & nxapi: Document validate_certs (#23305)
* Document validate_certs for eapu & nxapi

* formatting
2017-04-05 16:37:40 +01:00
Tim Rupp
780b2f2c84 Fixes pylint errors (#23279)
Reported by gundalow, this fixes pylint errors in F5 modules
2017-04-05 14:24:42 +01:00
Will Thames
b3a15e9ac3 [cloud] New AWS ec2_vpc_endpoint module for creating/deleting VPC endpoints (#20212)
* New AWS VPC Endpoint module for creating and deleting VPC endpoints

* Fix for python3, update version_added, fix flake8 issues

Change exception syntax for python 3
Update version_added to 2.3
Fix some minor flake8 issues

* ec2_vpc_endpoint: improve standards compliance

* Better documentation
* Return results in camel case format
* Improved exception handling
* Added `policy_file` argument
* Add ANSIBLE_METADATA

* Fix version_added

* Update ansible metadata to have metadata_version field
2017-04-05 08:28:52 -04:00
Benjamin Jolivot
f74a9abbda fortios_ipv4_policy.py state=absent Fix 23239 (#23242)
* Resolve #23239:
  - path is missing when state=absent
  - update doc for unclear policy ID
  - required params based on state

* Fix pep8 + doc

* Fix doc

* Another doc problem...

* doc

* Update doc fot policy ID

* Fix doc string

* fix required in doc

* fix required in doc Required when I(state=present).
2017-04-05 13:27:34 +01:00
Ricardo Carrillo Cruz
2571d2f64b Refactor openvswitch_db module (#23288)
The openvswitch_db module uses the ovs-vsctl binary to
address changes.
On other network modules we follow the pattern of returning 'commands'
as part of the result, containing the commands run on the target device.
Follow that for code consistency and maintenance.
Also, adding state param, which allows to add/remove keys on columns.
2017-04-05 13:27:52 +02:00
Nathaniel Case
e8538213fa Fix various junos errors (#23278) 2017-04-05 16:42:13 +05:30
Ganesh Nalawade
0b8ca98c48 Fix junos rollback id validate issue (#23283) 2017-04-05 16:41:11 +05:30
Toshio Kuratomi
572e9a8959 Update the metadata of the proxysql modules to 1.0 final format 2017-04-04 14:20:17 -07:00
James Cammarata
a567c5de65 Only insert notified host if it's not already notified for certain cases
Fixes #18178
2017-04-04 16:03:29 -05:00
bmildren
21ab4343e3 Adding support for ProxySQL (#19872)
* Adding support for ProxySQL
2017-04-04 13:47:19 -07:00
Brian Coca
00231c29ba Revert "keep ansible_local as top level var, always present"
This reverts commit 97cb2016d8.

It was causing issues downstream as facts seem to be merged back for
subsequent tasks. Will restore if I ever figure out how to avoid that.
2017-04-04 16:30:57 -04:00
Matt Clay
a6ca849643 Fix PEP 8 issues. 2017-04-04 12:22:47 -07:00
JP Mens
5a0b2fe3be dig lookup-plugin: add support for specifying rdclass (#10493)
* add support for specifying rdclass

* fix exception
2017-04-04 15:00:56 -04:00
Nathaniel Case
597bca3129 junos_config: Remove reliance on ability to output configuration in set format (#23225)
* Remove reliance on ability to output configuration in `set` format
* Support multiple warnings per rpc-reply
2017-04-04 15:00:00 -04:00
Robin Roth
6f40cb9647 Add workaround for evasive in apache2_module (#22649)
* Add workaround for evasive in apache2_module

* Fixes #22635
* Clean up workarounds for php/shib
* Add test for evasive workaround
* Remove use of re module, since all searches work with native python

* Add unit tests to apache2_module name replacements

Go back to using re package where needed

* Rename replace_name to create_apache_identifier
2017-04-04 14:12:06 -04:00
Rob
7e3af115ce Add ability to use either sec group name or sec group id or combinati… (#21049)
* Add ability to use either sec group name or sec group id or combination to ec2_lc. Also fix header size in AWS Guidelines

* Fix ec2 import to only import neccessary packages. Remove pep8 double line
2017-04-04 14:11:21 -04:00
Brian Coca
2f3ca66fbf fixed version 2017-04-04 14:09:28 -04:00
anryko
bd05c653fd ec2_group: add ports and multiple source lists (#19888). 2017-04-04 14:09:24 -04:00
Brian Coca
7d64ac95df doc notes 2017-04-04 14:08:07 -04:00
Mark Chappell
c5edaf5e68 ec2_lc.py: Also pass 'encrypted' when adding a volume
This only allows for using the default KMS keys, but enables encryption
at rest without needing to migrate the module to boto3
2017-04-04 14:07:03 -04:00
rmcintosh
312494d452 Add support for custom kernelid specification in Linode module 2017-04-04 10:50:39 -07:00
Chulki Lee
99ef1f3a9f git: git reset with branch
`git reset <ref>` can be ambiguous and fail to switch to the correct branch.
To avoid it, specify branch as well.
2017-04-04 10:45:04 -07:00
Dag Wieers
0715430829 win_chocolatey: Perform exact presence check (#23098)
The current implementation matches libreoffice-oldstable when testing for libreoffice.
So uninstalling libreoffice fails when libreoffice-oldstable is installed.

```
PS C:\WINDOWS\system32> choco list --local-only libreoffice
Chocolatey v0.10.3
libreoffice-oldstable 5.2.6
1 packages installed.
PS C:\WINDOWS\system32> choco list --local-only --exact libreoffice
Chocolatey v0.10.3
0 packages installed.
```

The solution is easy, just add `--exact`.
2017-04-04 09:39:27 -07:00
Toshio Kuratomi
6bad4e57bd Migrate most uses of if type() to if isinstance()
Also convert those checks to use abcs instead of dict and list.

Make a sentinel class for strategies to report when they've reache the end
2017-04-04 08:17:20 -07:00
Ricardo Carrillo Cruz
64fe7402ff Pull filesystems from dict in case is not string on eos_facts (#23254)
Apparently in some devices the filesystems gathering command can return
a dict containing a 'messages' key with the filesystems, instead of a
plain string.

Fixes #23217
2017-04-04 16:04:00 +02:00
bentaylornz
95c1b07bdb [cloud] re-raise boto ClientError if throttling timeout is reached in efs.py (#23109)
* re-raise exception as expected

The current ThrottlingException handling code hides other actual exceptions from the user, and basically goes infinite loop instead. eg when the api caller doesn't have permission (example below) to use the api, ansible effectively hangs. adding the re-raise stops execution and shows the error to the command line as expected

can test by removing permission to the efs api, and calling the efs: module

The error was: botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the DescribeFileSystems operation: User: <x> is not authorized to perform: elasticfilesystem:DescribeFileSystems on the specified resource

* PEP8 fix
2017-04-04 08:41:20 -04:00
Will Thames
bded5ac987 [cloud] Support check_mode for ec2_vpc_subnet_facts (#23111)
* Support check_mode for ec2_vpc_subnet_facts

facts modules support check mode by default

* ec2_vpc_subnet_facts pep8 tidy up
2017-04-04 08:34:49 -04:00
Will Thames
2be64b8c3a [cloud] Support check_mode for ec2_vpc_route_table_facts (#23116)
As a facts module, just needs supports_check_mode to be
set in the argument_spec
2017-04-04 08:31:26 -04:00
Will Thames
ec01aac983 [cloud] Support check_mode for ec2_vpc_nat_gateway_facts (#23114)
As a facts module, just needs supports_check_mode switched on
2017-04-04 08:31:01 -04:00
Will Thames
e61be9ea78 [cloud] Remove DryRun parameter in ec2_vpc_igw_facts check_mode (#23113)
* Remove DryRun parameter in ec2_vpc_igw_facts check_mode

Using DryRun in check mode causes errors, and is not required
(as nothing changes when calling describe_internet_gateways)

Prevents the following error:
```
{"changed": false,
 "failed": true,
  "msg": "An error occurred (DryRunOperation) when calling
          the DescribeInternetGateways operation: Request
          would have succeeded, but DryRun flag is set."}
```

* ec2_vpc_igw_facts pep8 tidy up
2017-04-04 08:29:48 -04:00
Matt Clay
64458bc9a1 Fix deploy_helper join exception on no release. 2017-04-03 16:35:31 -07:00
Ricardo Carrillo Cruz
2e89126af7 Remove dupe supports_session method from eos module_utils (#23240)
Fixes #23237
2017-04-04 00:46:10 +02:00
Matt Davis
d85f4a443f mark runas become method experimental (#23235)
Due to the number of "real world" caveats in the current runas become method, it was agreed that we'd warn that it's experimental on use. A potential future version based on LogonUser/CreateProcessAsUser will have very different requirements and limitations.
2017-04-03 13:46:51 -07:00
Brian Coca
eb78da68dd allow plugins to override fragments 2017-04-03 15:24:13 -04:00
Jordan Borean
3e1a16c574 win_find fix up age parameter (#23195) 2017-04-03 11:43:07 -07:00
Jordan Borean
4d1b97d1ae win_stat change return islink to islnk to match stat (#23196) 2017-04-03 11:38:34 -07:00
Jacob McGill
5918bebd6e Update fortios_config.py (#23230) 2017-04-03 19:22:57 +01:00
Sergey
9a43603761 [cloud] Added account selection to PubNub BLOCKS (#23160)
* . switched from 'user.id' to 'account.id' in REST API calls.
+ added ability to select desired account (by name or identifier) from list of accounts to which authorized user have access.

* + added account option addition version.

* Remove pubnub_blocks from PEP8-legacy list
2017-04-03 14:05:38 -04:00
Adrian Likins
15bd7e48da Add ansible executable path (argv[0]) to --version (#22262)
For example:

    ansible 2.3.0 (argv0_in_version f53921093f) last updated 2017/03/03 13:33:31 (GMT -400)
      config file = /home/adrian/.ansible.cfg
      configured module search path = Default w/o overrides
      executable location = /home/adrian/src/ansible/bin/ansible

This should help troubleshooting install issues.
2017-04-03 14:01:59 -04:00
Will Thames
cd19964bca [cloud] Support check_mode for ec2_group_facts (#23164)
Update imports to use named imports
2017-04-03 13:45:38 -04:00
Prasad Katti
2b18c0ed07 [cloud][docs] Must use the count_tag option with exact_count (#23167)
Fixed an example in ec2 module. The example does not work without
count_tag option.
2017-04-03 13:40:12 -04:00
Adrian Likins
dbc0c01c86 Show 'ansible' python module paths in --version (#22264)
* Show 'ansible' python module paths in --version
2017-04-03 12:42:58 -04:00
Strahinja Kustudić
7358bf88e2 Fixes ignoreerrors not working with sysctl_set 2017-04-03 06:37:09 -07:00
Sloane Hertel
224b5d5283 remove vpc requirement for default outbound traffic (#22743) 2017-04-03 08:16:03 -04:00
Ryan Brown
2196fa0e95 [cloud][tests] fixtures for placebo to test AWS modules using boto3 (#21253)
* [cloud][tests] Create fixtures for using placebo to test boto3-using modules

* Use pytest's importorskip instead of manually skipping on missing deps

* Fix imports in cloudformation module

* Delete unused code

* Add maybe_sleep fixtures to speed up recorded test runs

* Build basic placebo-CFN tests

* Commit placebo recordings of basic stack operations

* Add placebo to test-requires

* Allow unit tests to run regardless of environment by setting a default region

* Use explicit relative import for Python 3 compat

* Use __name__ attribute that works on Python 2 and 3
2017-03-31 15:31:12 -04:00
Senthil Kumar Ganesan
632270b913 Updated the Regex for promt matching (#23186) 2017-03-31 18:29:45 +01:00
AlexanderStock
e4206d8ef5 Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot (#23141)
* Added Tag functionality to Volume,Template,FWRule,PF Rule,ISO,Snapshot

* Update cs_firewall.py

Fixed whitespace

* Added doc for Cloudstack Tags in Volume,Template,FWRule,PF Rule,ISO,Snapshot
2017-03-31 18:39:30 +02:00
smaftoul
9812d211e7 typo: psuedo -> pseudo (#23177) 2017-03-31 10:48:29 -04:00
Will Thames
9a3a0d731f Fix typo in AWS guidelines doc (#23168)
Change `format_ex` to `format_exc`
2017-03-31 09:57:38 -04:00
Monty Taylor
443102c9f0 Remove old deprecated OpenStack modules (#23002)
These were deprecated back in the 1.x timeframe, so have been deprecated
for the 2 cycles required. They also do things wrong and should be
avoided anyway. Go ahead and remove them.
2017-03-31 15:17:13 +02:00
Will Thames
ef0bc0aa52 Support check_mode for add_host
`add_host` doesn't really actually change anything - there's no
reason why it shouldn't work in `check_mode`.
2017-03-31 00:40:24 -04:00
Tim Rupp
e27b4c2ae4 Removes expanduser in favor of type path
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
2017-03-31 00:24:38 -04:00
Erwin Lang
3efb11e225 synchronize: Exclude ssh_args from quoting
Makes it possible again to pass more than one argument via ssh_args to the synchronize module.
2017-03-30 19:40:27 -07:00
Tom Melendez
8b677e25c4 [cloud][GCP]: New module gcp_backend_service for load balancer backends (#22857)
* GCP: backend service module

* GCP: rework param-checking code. Fixed a couple of bugs and changed to ValueError instead of custom tuple.

* GCP: fixed commit, spelled out Google Cloud for clarity in module description.
2017-03-30 16:59:35 -04:00
Tim Rupp
2bf7297bf3 Removes expanduser in favor of type path (#21369)
Removes the usage of expanduser in favor of the type 'path' for
module options. Related to #12263
2017-03-30 15:31:00 -05:00
Tim Rupp
2a576a1999 Fixes generators and other misc fixes (#22887)
fixed itertools.imap busting several things that used to be lists,
profiles not being set correctly, upon create, when it was a separate
method, allowed port having the wrong lowest port (zero is allowed),
empty port value should just be interpreted as None.
2017-03-30 16:21:18 -04:00
Alex Willmer
f5aa9df1fd Include '/' & '.' when password_hash generates a new salt
The password_hash filter will generate a salt value if none is supplied.
The character set used by Ansible

(upper & lowercase letters, digits)

did not match that used by libc crypt

(upper & lowercase letters, digits, full stop, forward slash).

This resulted in a slightly smaller key space, and hence hashes would be
slightly easier to attack (e.g. by dictionary, brute force).
2017-03-30 12:33:39 -07:00
Sloane Hertel
f5f7a8c681 [cloud] only create new eni if none of the filters lead to one match (#22919) 2017-03-30 14:55:31 -04:00
Sloane Hertel
dab0e75ce0 [cloud] update the local variable route_table with the latest tag changes (#23136) 2017-03-30 14:53:42 -04:00
Jason DeTiberus
3642de9ecc k8s/openshift module_utils split (#23115) 2017-03-30 19:02:17 +02:00
Peter Sprygada
2e476e64cd fixes error parsing lldp neighbors when running nxos_facts (#23134) 2017-03-30 11:30:50 -04:00
Senthil Kumar Ganesan
a0344acd78 Ansible 2.3 feature support for dellos6. (#23084)
* Ansible 2.3 feature support for dellos6.

- With the new Ansible 2.3 infra changes, the dellos modules doesn't work
  (the new infra changes are not backward compatible), so added the below
  changes support it.
- Added the new terminal plugin for DellOS6
- Added the new action plugin for DellOS6
- Modified the modules to work with the new infra.
- with that it adds support for DellOS6 Persistent Connection support.

* Remove pep8 confirming files from dellos6.py and dellos6_config legacy-files
2017-03-30 15:26:32 +02:00
Sloane Hertel
44b2859338 ec2: fix instids and res_list being referenced before assigned - fixes #22692 (#23053)
* add else statement to ensure instids is set

set res_list to None to avoid UnboundLocalError and fix iteration over a nonetype by adding an empty tuple

* make res_list empty tuple by default and check for instids before setting tags (fails otherwise)
2017-03-29 20:18:23 -04:00
Konstantin Suvorov
c1b3d6a51f Fix 'sequence' lookup shortcut syntax and documentation (#22989)
* fix 'sequence' lookup shortcut syntax and documentation

* Update playbooks_loops.rst

Minor edits for grammar and clarity.

* Update playbooks_loops.rst

Another tweak for clarity.
2017-03-29 19:11:19 -04:00
Ricardo Carrillo Cruz
1abc73da68 Fix ios_config return on python 2.4 (#23094) 2017-03-30 00:19:43 +02:00
Chris Houseknecht
4099eb41b9 Treats both [] and {} as equal to None (#23088) 2017-03-29 22:48:21 +02:00
Ricardo Carrillo Cruz
66e29f0a7c Do not re.search show configuration stdout if empty (#23087)
If the banner is not set, the stdout of 'show configuration | begin banner <banner>'
returns empty string thus the re.search raises an exception.

Fixes #22216
2017-03-29 22:38:15 +02:00
Peter Sprygada
88ce6fd273 restores pre 2.3 behavior with respects to keys (#23083)
This removes the requirement to configure look_for_keys=False and
restores the behavior to disable key lookup if no key was provided.
2017-03-29 15:12:18 -04:00
Toshio Kuratomi
6f77498700 Split on newlines when searching for become prompt
The fix for leading junk in sudo output: fee6e29 causes problems with
ssh + sudo.  On the initial connection using ControlPersist, the output
that we scan for the prompt contains both the command we're sending to
configure the prompt and the prompt itself.  The code in fee6e29 ends up
sending the password when it sees the line configuring the prompt which
is too early.

Switch to a version that splits on lines and then checks whether the
first or last line starts with the prompt to decide if it's time to send
the password.

Fixes #23054
References #20858
2017-03-29 12:11:10 -07:00
jhawkesworth
4eba248a8e changed parameter name from forest_root_dns_domain to dns_domain_name (to match documentation and other win_domain* modules) and fix example which has win_domain_controller instead of win_domain for module name. (#23081) 2017-03-29 11:34:45 -07:00
jhawkesworth
a3e2280e62 correct examples to match correct _password module parameter names (#23067) 2017-03-29 11:32:33 -07:00
Artem Zinenko
a5da638d34 Fix #22126 (#22128) 2017-03-29 11:29:27 -07:00
Pavel Glushchak
097173c6f5 Added Virtuozzo distribution support
Virtuozzo Linux is based on CentOS sources. Thus OS family
should be recognized as 'RedHat'.

Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2017-03-29 08:47:05 -07:00
Fabrizio Colonna
3765dc37ca Fixed issue #22996 and issue #22955.
(cherry picked from commit 4465171e89)
2017-03-29 08:30:30 -07:00
Victor Perron
bc44175d8d paramiko_ssh: fix crash upon pass prompt in py3
The pass prompt expects an answer and compares a `str` to a binary buffer, thus crashing.

It's an obvious fix to help transitioning towards Python3 and hopes it does not need a specific test.
2017-03-29 07:47:16 -07:00
Jeremy L. Gaddis
b52dbddc17 Update requirements for seboolean module (fixes #23028) 2017-03-29 07:24:30 -07:00
Ricardo Carrillo Cruz
cc7e09451a Fall-back to show configuration on old IOSXR devices (#22900)
In old IOSXR versions, 'show commit changes diff' does not work.
Fall-back to 'show configuration' if that command fails so execution
can move forward.

Fixes #22235
2017-03-29 16:21:23 +02:00
Dag Wieers
521fa9b458 win_chocolatey: Fix state=latest when absent (#23041)
When using state=latest with the package not being installled, Ansible complains that the package is not installed and fails the task.
Whereas the expected behaviour is to install the package when it is missing.

This PR fixes this behaviour.
2017-03-28 17:49:21 -07:00
Matt Clay
0ed86775f0 Fix PEP 8 issues. 2017-03-28 15:09:44 -07:00
Dr Josef Karthauser
0752906ae5 Add --jail support to pkgng. (#22958)
* Add --jail support to pkgng.

* Bump the version number for the --jail argument.
2017-03-28 17:38:47 -04:00
Brian Coca
37cef2a9eb standarized role/plugin paths 2017-03-28 17:31:24 -04:00
Sloane Hertel
7720ef8ec1 [cloud][python3] bytes fix to make ec2_key work on python 3 (#23051) 2017-03-28 17:00:26 -04:00
Brian Coca
ea7bff4a3f changed spec to options as per irc meeting 2017-03-28 15:55:22 -04:00
Toshio Kuratomi
d3a1aea7c5 Fix a couple issues in synchronize with docker (#23047)
* Fix a couple issues in synchronize with docker

* Make the rsync_opts parse as a list using the same criteria as
  module_utils argumentspec parsing
* Do not quote arguments in the action plugin.  The module will quote as
  it knows whether it will invoke rsync with a shell or via exec.

Fixes #23046
2017-03-28 11:38:37 -07:00
Peter Sprygada
768cb437ab minor updates to network connection plugins (#23043)
* removes unused log() function in network_cli
* adds method comments to terminal plugin base
2017-03-28 12:57:18 -04:00
Brian Coca
c0db6d79f6 minor correction to module path option docs 2017-03-28 11:43:58 -04:00
Brian Coca
99e298a2a6 removed bad ignore as host can override connection
also breaks testing network modules
2017-03-28 11:32:22 -04:00
Evgeni Golov
61579aebb2 cron: don't force changed=True when old crontab was empty
The cron module forces changed=True when there was no real change,
but the original crontab did not contain a final newline, which is
mandatory.

When the user has no crontab or the user does not exist at all,
crontab -l exits with 1 and the cron module correctly interprets
this as "no crontab" and stores the old crontab as "".

However this triggers changed=True, even if we're not going to
change anything, e.g. when removing a crontab entry from a user
who has no crontabs at all.

Let's special-case the fact that the old crontab is empty and not
force changed=True in that case.
2017-03-28 07:45:13 -07:00
Ricardo Carrillo Cruz
6fa3cb55e1 Fix dynamodb pep8 issues (#23032) 2017-03-28 15:11:39 +02:00
Miyurz
1ea1becf23 Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset… (#22502)
* Fixes bug https://github.com/ansible/ansible/issues/22455 - Git reset fails when file with the name 'origin' is present in the repository

* #22455 Integration test for git module to test if it clones a repository with a file named origin

* Fixed yaml errors for test/integration/roles/test_git_clone/tasks/main.yml

* Removed the newly added target git and moved the code to test/integration/targets/git

* Reorganised code structure as per comments

* Fixed playbook name

* Added code that didn't make it to the playbook before.

* No longer need git.yml

* Remove non tasks specific code from tasks file and use existing variables

* Removed msg var from the vars.yml
2017-03-28 08:41:25 -04:00
nevotheless
ab8578d343 Update netapp_e_amg_sync.py (#22693) 2017-03-28 07:19:05 -04:00
Corey Christous
34a3ab94d8 add tagging to dynamodb_table.py (#20946)
* add tagging to dynamodb_table.py

* fix doc syntax

* address PR comments

* add boto3 has tagging check
2017-03-28 07:18:20 -04:00
Ricardo Carrillo Cruz
a5b12ff269 Introspect flag to use on 'show run' when using defaults in ios_config (#22903)
When the ios_config module has 'defaults' param it runs in the device the command
'show running-config all' but 'all' may not be available in older devices.
This change makes introspection by using the help command and run 'full' in case
'all' is not available.

Fixes #22747
2017-03-28 10:20:52 +02:00
Chris Houseknecht
d2ea851d09 Adds k8s_common.py (#22899) 2017-03-28 02:27:28 +02:00
Mike Hume
a4ae329465 Update __init__.py
Just guessin, but is this how it is supposed to read?
2017-03-27 20:21:40 -04:00
Hugo Chargois
1bc5527c69 Vault: Remove tmp decrypted file when experiencing error while writing (#14835)
* Vault edit: Erase tmp file if error while writing to it

* Close the FDs returned by mkstemp()
2017-03-27 16:52:18 -04:00
Jon "The Nice Guy" Spriggs
8e0c11ebc4 Add examples in os_server module showing userdata (#22997)
* Add examples in os_server module showing userdata

Added an example using Bash and also using Cloud-init. Also, showing using {% raw %} and {% endraw %} to provide a pointer to those hitting similar issues to the ones I had.

* Removed erronious whitespace
2017-03-27 14:44:13 -05:00
Nick Ball
c8364d64d6 [cloud] New module: AWS lightsail (#19846)
* Add AWS lightsail module

* lightsail: fix doc error + badly formatted yaml

* lightsail: code style cleanup

* make requested lightsail changes

* fix imports and pep8

* fix metadata and version

fix yaml

fix RETURN section
2017-03-27 15:10:52 -04:00
Senthil Kumar Ganesan
dd63dfcf1e Ansible 2.3 feature support for dellos9 and dellos10 (#22856)
* Ansible 2.3 feature support for dellos9 and dellos10
* Use Persistent Connection Manager

* Fix CI issue, revert the doc and metadata changes

* Reverted the meta_info (supported_by) to community from core

* Fixed the CI issues, use module_utisl.six and updated legacy-files
2017-03-27 19:32:57 +01:00
John R Barker
f9b75d44e8 pep8 fixes (#23005) 2017-03-27 18:36:20 +01:00
John R Barker
58441869bd metadata_version, not version 2017-03-27 18:25:36 +01:00
Will Thames
7142e28423 [cloud] Default encrypted parameter on ec2_ami_copy to False (#22634)
Set encrypted to default False, rather than None

Otherwise you get:

```
Invalid type for parameter Encrypted, value: None, type: <type 'NoneType'>, valid types: <type 'bool'>)
```
2017-03-27 12:44:59 -04:00
Davis Phillips
36e24c53c6 Vmware resource pool first add (#21116)
* Adding first checkin of resource_pool module
* fixing length issues and indentation multipliers
* mend
* mend
* mend
* remove * import from modules
* Add space on variable assignments
* changing line 321 to less characters
* fixing pep8 issues
* mend
* cleaning up example section
* Add RETURN section
* adding spacing to list
* all spacing consistent now
* move imports as per CI
2017-03-27 10:35:58 -04:00
Peter Sprygada
ab4b8cb104 removes unused code in eos action plugin (#22986) 2017-03-27 00:50:55 -04:00
Alex Lo
ac74520b6f ec2_group: description property is immutable (#19790)
* update integration tests for updated boto exception message

* integration tests fail on both "test credential" test cases

exception bubbles out of module.  instead catch and wrap

* ec2_group does not support updating a security group's description

AWS security group descriptions are immutable.
if ec2_group finds a group that matches by name, but the descriptions do not match, the module does not support this case
previously it would check if the group was used, but would not do anything if it was

old behavior was erroneous because it could make a user expect that the description change of a group was fine when in fact it did not occur
also, it made an expensive check against all ec2 instances for no good reason

* comments not doc strings

* else must have pass w/o doc-string statement

* Catch specific BotoServerException, give context around error when fetching SGs

* python3 compatible exception blocks

* add traceback to fail_json

* two blank lines before first function
2017-03-26 09:33:29 -04:00
Peter Sprygada
3169cbd493 roll up of fixes for sros modules (#22972)
* fixes action handlers for sros
* fixes sros_config module execution to use AnsibleModule
* fixes sros_command module to use socket connection
* adds sros to constants
2017-03-25 10:35:15 -04:00
Peter Sprygada
33624fe96f fixes junos_package module to use junos_pyez (#22973)
This allows junos_package to use junos_pyez directly instead of the
persistent connection.  This is a workaround fix for 2.3
2017-03-25 10:22:01 -04:00
Gabriele
9b2bdf2df6 Fixing module behavior when route_target_both is used (#20076) 2017-03-25 08:02:15 -04:00
Peter Sprygada
6a414371a1 fixes issue where nxos module will fail due to KeyError (#22966)
Updates nxos action handler to handle deleting provider key if exists or
silently continuing if a  KeyError is raised.
2017-03-25 07:45:08 -04:00
Peter Sprygada
e93cdecef1 fixes log message in junos action handler (#22965) 2017-03-25 00:38:05 -04:00
Toshio Kuratomi
9c9ef0d6ab Fix a few problems with the metadata extraction for docs (#22963)
* key is ANSIBLE_METADATA, not METADATA
* Need to check that the node is an ast.Dict, not a real dict.
* Need to convert the ast.Dict into a real dict via literal_eval.
2017-03-24 21:18:48 -07:00
ukaj
db328a0f83 [cloud] Add support for running s3 module in check mode (#22188) 2017-03-24 16:05:19 -04:00
Brian Coca
9a05113daf pass params to validate against 2017-03-24 15:53:15 -04:00
Brian Coca
25de905c6e subspec protptype 2017-03-24 15:53:15 -04:00
scottb
ed413f2b28 Update vault.py
Edit for conciseness and clarity.
2017-03-24 15:52:36 -04:00
Brian Coca
2a2e02aea4 .--. . .--. ---.. / .. ... / .- -. -. --- -.-- .. -. --. 2017-03-24 15:52:36 -04:00
Brian Coca
18a7a1ec31 added docs to CLI docstringsadded
removed 'now intermediate build files' from repo
adjusted gitignore
2017-03-24 15:52:36 -04:00
Brian Coca
b4c47ebf68 draft to generate man pages 2017-03-24 15:52:36 -04:00
Brian Coca
7b197d823e let user control "auto-de-vault" (#22739)
* added option to toggle off autodevaulting

* fixes per feedbazck
2017-03-24 15:39:25 -04:00
Toshio Kuratomi
29f623571e Handle the case where HTTPError.info() returns an object that aren't (#22894)
dict-like enough (can't be used with **).

This should give a better error message for #22872
2017-03-24 12:24:59 -07:00
Erwin Lang
f7c9f44aab synchronize: Convert cmd to list and fix handling of the copy_links argument (#22573)
* synchronize: Convert cmd to list and fix handling of the copy_links argument

Converting cmd from str to list stops the pain of argument quoting/escaping.

* synchronize: Update imports according to #pullrequestreview-28758614
2017-03-24 09:22:45 -07:00
Toshio Kuratomi
65d9feea4f Revert "Quote ssh_args"
This reverts commit a9c3a452f0.
2017-03-24 09:18:35 -07:00
Toshio Kuratomi
a9c3a452f0 Quote ssh_args
Fixes #22111
2017-03-24 09:17:34 -07:00
Alexander Gordeev
4b9b0a25c3 Add pvs info to linux hardware 'ansible_lvm' facts (#16773)
This change adds the information about physical volume to hardware
facts.
2017-03-24 12:13:33 -04:00
Miroslav Lichvar
c1a766df98 Add PHC and timestamping info to network interface facts on Linux (#21767) 2017-03-24 12:09:33 -04:00
Adrian Likins
25be6aebc3 Add HDD serial numbers. (rebase/fixes of #9454) (#22852)
Add HDD serial numbers to linux hardware facts via 'sg_inq' tool
2017-03-24 12:06:42 -04:00
Matt Davis
e084e8809e force Windows to always use preamble-free UTF8 input encoding (#22934)
* fixes #15770
* When running under the UTF-8 codepage, Powershell subprocesses will fail (eg, Start-Job, others) if the input encoding is using the default BOM preamble. This fix forces it to use no preamble in leaf_exec and win_shell, and includes tests to verify that Start-Job works.
2017-03-24 00:02:39 -07:00
Dhivyap
cd662efd2b Fixes#21557-Handled dellos9_facts crash with IPV6 configs (#21652) 2017-03-23 23:06:26 -04:00
Dag Wieers
1cfaa5caab win_command/win_shell: Clean up and make coherent (#21371)
* win_command/win_shell: Clean up and make coherent

Changes include:
- Make win_command and win_shell more coherent
- Make condensed one-line more readable

* Revert to original formatting
2017-03-23 20:05:22 -07:00
Artem Zinenko
f4b34a4c3b win_firewall_rule doesn't fail when profile is "any" or remoteip is IPv4 and the task runs more than once. (#22555)
* Fixed #22554

* Wrote tests for win_firewall_rule module

* Fixed #22786

* Fixed review comments

* Fixed #22799

* Added test when RemoteIP containt a netmask

* Revert comment
2017-03-23 20:01:26 -07:00
Gabriele
d7d76f3aaf Fixing nxos_vrf_interface when interface name is not full (#22769) 2017-03-23 22:57:24 -04:00
Luis Rueda
0fe29f8eb1 Update netconf_config.py (#22429)
Fixes issue https://github.com/ansible/ansible/issues/22410
Fix trailing whitespace at the end of line 66
Fix version_added: "2.3" for allow_agent and look_for_keys
2017-03-23 22:54:34 -04:00
Dag Wieers
ac43a1bbbc Windows: Use the correct newline sequence for the platform (#21846)
This change to the template action plugin make template use the
platform's native newline_sequence for Jinja.

We also added the option `newline_sequence` to change the newline
sequence using by Jinja if you need to use another newline sequence than
the platform default.

This was previously discussed in
https://github.com/ansible/ansible/issues/16255#issuecomment-278289414

And also relates to issue #21128
2017-03-23 19:47:10 -07:00
Peter Sprygada
866f67e213 fixes a number of issues with nxos_facts (#22923)
* updates command runs to return warning if command fails
* fixes variable issues from recent refactoring
* removes provider from return of module
2017-03-23 22:35:15 -04:00
Matt Davis
73f50b4f9f fix Windows env handling (#22927)
* fixes #22441
* fixes #22655
* moves all env handling into the exec wrapper; this should work for everything but raw, which is consistent with non-Windows.
2017-03-23 17:48:15 -07:00
Jordan Borean
f1ab879bb6 win_reg_stat change the module parameters for standardisation (#22732) 2017-03-23 15:15:28 -07:00
Jordan Borean
89b78cb5e8 win_share: tweaks after the caching mode changes (#22763)
* win_share: tweaks after the caching mode changes

* Re-added the Unknown option back in
2017-03-23 15:08:53 -07:00
Toshio Kuratomi
2fff690caa Update module_utils.six to latest (#22855)
* Update module_utils.six to latest

We've been held back on the version of six we could use on the module
side to 1.4.x because of python-2.4 compatibility.  Now that our minimum
is Python-2.6, we can update to the latest version of six in
module_utils and get rid of the second copy in lib/ansible/compat.
2017-03-23 13:35:05 -07:00
Toshio Kuratomi
c7c8481181 No need to specialcase comment characters
If the # is inside of quotes, it's a string.  If it's outside of quotes
then an exception will be raised which we'll catch and then send to the
to_text() call at the end of the function anyhow.

Fixes #22868
2017-03-23 13:13:10 -07:00
Toshio Kuratomi
589e217278 base64 functions must be given byte strings
The base64 stdlib functions require byte strings.  So we have to
transform the strings into bytes before handing to the stdlib and then
transform them back into text before handing back to ansible.

Fixes #22873
2017-03-23 12:15:02 -07:00
Toshio Kuratomi
d0712b1ec7 Make yum's state=list obey disablerepo and enablerepo
Fixes #22876
2017-03-23 12:10:59 -07:00
Peter Sprygada
cda3e001c6 fixes issue when host is defined in provider for junos (#22918)
The junos action handler was not honoring the host value in the provider
argument.  This patch will now use the provider host entry if it exists
and falls back to the inventory hostname
2017-03-23 15:05:11 -04:00
Matt Martz
0ced29c51b Don't skip action/__init__.py (#22911) 2017-03-23 13:40:02 -05:00
Matt Martz
ed52d91249 Swap pep8 current to legacy (#22891) 2017-03-23 13:16:55 -05:00
Sloane Hertel
1ca4a42c0e include traceback in exception handling (#22807) 2017-03-23 14:08:02 -04:00
Adrian Likins
0bb3545333 Remove ununsed Connection.log method (#22837)
method referenced 'logger' which no longer exists.
2017-03-23 12:24:39 -04:00
Adrian Likins
dfec69b9a1 Fix bad ref to AnsibleConnectionError -> AnsibleConnectionFailure (#22838) 2017-03-23 10:43:02 -04:00
Dustin Spicuzza
78de05e58d win_iis_webapppool: Use Get-AnsibleParam to retrieve parameter
- Fixes #22805
2017-03-23 07:42:47 -07:00
Adrian Likins
ee478c4885 make netconf.py stylish (#22839)
(flake8 stuff)

netconf.py:22:1: F401 're' imported but unused
netconf.py:23:1: F401 'socket' imported but unused
netconf.py:24:1: F401 'json' imported but unused
netconf.py:25:1: F401 'signal' imported but unused
netconf.py:31:1: F401 'ansible.module_utils.six.moves.StringIO' imported but unused
2017-03-23 10:29:24 -04:00
Brian Coca
91a385b87d etcd doc tests 2017-03-23 01:27:19 -04:00
Brian Coca
d14634ca21 uncommit the crime of extra spaces in docstring 2017-03-23 01:27:19 -04:00
Brian Coca
7839f70e36 Enable documentation in plugins
Made ansible-doc more plugin agnostic
We can have docs in lookup, callback, connectionm strategy, etc
Use first docstring and make pepizis happy
generalized module_docs to plugin_docs
documented cartesian, ssh, default, jsonfile, etc as examples
changed lack of docs to warning when listing
made smarter about bad docstrings
better blacklisting
added handling of options/config/envs/etc
move blacklist to find_plugins, only need once
2017-03-23 01:27:19 -04:00
Brian Coca
d3115ae8f3 put cache base classes in __init__ (#22809)
* put cache base classes in __init__

* added placeholder
2017-03-23 01:26:10 -04:00
Brian Coca
97cb2016d8 keep ansible_local as top level var, always present 2017-03-23 01:25:39 -04:00
Evgeni Golov
7a00f28804 synchronize: explicitly set the executable for localhost
Otherwise the executable for the destination is also used on the local
machine and this might not exist.

Fixes: #22867
2017-03-22 21:27:47 -07:00
Matt Martz
3164e8b561 E501 fixes (#22879) 2017-03-22 20:50:28 -05:00
Glen Maetzig
ac992eff1c Import camel_dict_to_snake_dict method to fix error when executing get_nat_gateways() method
(cherry picked from commit 223fc34ab9)
2017-03-22 16:30:59 -07:00
Shaun Brady
cd24bbbc9c Missing purge_subnets parameter on function call
purge_subnets|routes were introduced recently.
ensure_subnet_associations now takes purge_subnets as a parameter.  A
call to this function was missed when introducing this feature.  With
out, results in a "got 5 expected 6" error.
2017-03-22 16:22:54 -07:00
mjfroehlich
cc50b803df [cloud][route53_health_check] Consider port in identity test (#22762)
Allows to health-check two services on one host. Before, asking for 2 health checks being present for `http://myhost:8888` and `http://myhost:9999`  resulted in just a single health check, as this module considered the two specs as equal.

Bonus: route53_health_check now passes style guidelines
2017-03-22 12:49:39 -04:00
Brian Coca
052be86605 fix for loosing ungrouped hosts in ini
fixes #22861
2017-03-22 12:48:19 -04:00
Brian Coca
5e98be2e62 better handling of parsed
updated tests to match new result output
2017-03-22 12:03:43 -04:00
Brian Coca
9ad62a48ab prevent failure for meta: reset_connection
now plugins that don't explicitly support it give a warning.
2017-03-22 11:00:32 -04:00
Robin Schneider
bbc6af6749 Fix use of unauthenticated connection examples in git module docs
Ref: https://git-scm.com/book/ch4-1.html#The-Git-Protocol
2017-03-22 10:26:48 -04:00
Ricardo Carrillo Cruz
98c98125f0 Fallback to show-run on ios_banner for devices where show banner does not work (#22793)
On switches 'show banner' command doesn't work, fallback to show run|begin banner
and extract the banner text in case that fails.
2017-03-22 10:01:41 +01:00
Matt Martz
02f66b9369 E1 legacy pep8 fixes (#21933)
* E1 pep8 fixes

* e111 fix for rds.py
2017-03-21 21:19:40 -05:00
Ted Timmons
887456ab8e Fix stderr false return value (#22845)
* ensure exit_json does not fail from stderr=False

- do a little bit of safety-checking in exit_json to not try to .splitlines() on a boolean
- remove the stderr=boolean from uri.py, this is the only spot that uses it (at least so obviously)
- add unit tests that call exit_json. These are useless because the stderr parsing is in _execute_module and is difficult to mock; deleting these tests after the commit.

* remove added unit tests per prev commit

exit_json doesn't do the param parsing, that is buried deep inside _execute_module.
2017-03-21 18:11:11 -04:00
Brian Coca
5beb27ef5e use namespaced facts 2017-03-21 17:10:15 -04:00
yuriy-z
40a1f20bea Add storage device WWN to facts for Linux (#16640)
World Wide Name (WWN) is unique identifier of device.
This patch adds this identifier to facts for Linux.
2017-03-21 16:51:18 -04:00
Johan Guldmyr
897201c4be add infiniband network type (#18833) 2017-03-21 16:31:30 -04:00
Christian Albrecht
66818050b0 Add perm_hwaddr on Linux bonding slave nics (#19071)
This patch will additionally report the `perm_hwaddr`
fact of a Linux bonding slave network interface.

Related to issue #19067
2017-03-21 16:29:38 -04:00
Brian Coca
455aff8436 ported fix from ansible-core #5639
From 3d09c94faeaa52075055f23744d8b52581c59bb2 Mon Sep 17 00:00:00 2001
Evan Kaufman <evan@digitalflophouse.com>
2017-03-21 16:03:00 -04:00
Brian Coca
2022fc162a fixed name to unit 2017-03-21 14:28:23 -04:00
Brian Coca
b82aa41e31 removed deprecated config/env vars 2017-03-21 14:02:39 -04:00
Brian Coca
3f4b87f0c0 allow systemd to 'just' reload 2017-03-21 13:49:44 -04:00
Peter Sprygada
d6787632c9 fixes return data structure (#22830)
The return was being re-written instead of updated so warnings were
lost.  This patch now updates the result instead of replacing it.
2017-03-21 14:41:59 +01:00