Commit graph

7743 commits

Author SHA1 Message Date
Peter Sprygada
e9f804614d removes unneeded message in netcfg
removes old warning message in netcfg that is no longer used
2016-09-11 23:38:44 -04:00
Peter Sprygada
815a683e9c minor clean of openswitch shared module
* updates regexp entries
* removes legacy 2.1 code for get_module()
2016-09-11 23:37:19 -04:00
Peter Sprygada
75f1573ed5 roll up of updates to vyos shared module
* cleans up method signature
* removes save_config method in favor of super class
2016-09-11 23:35:54 -04:00
Peter Sprygada
a6cf394ebc updates sros shared module
* adds rollback to load_config() method
* updates error regexp list
2016-09-11 23:34:46 -04:00
Peter Sprygada
e5d931de6b updates junos shared module methods
* cleans up load_config() arguments to simply
* removes unused methods in Cli transport
* updates error regexp
2016-09-11 23:33:20 -04:00
Peter Sprygada
a8daff1590 clean up iosxr shared module
fixes up method signatures in iosxr shared module removing unneeded **kwargs
2016-09-11 23:32:05 -04:00
Peter Sprygada
456fbf011e cleans up load_config() in eos shared module
cleans up the load_config() method
2016-09-11 23:30:51 -04:00
James Cammarata
f5cff2ced5 Revert "Flush the queued items in linear periodically"
This reverts commit d3418fd658.
2016-09-11 14:28:49 -05:00
Robin Schneider
d76dd56ca3
Use addresses and names reserved for documentation
Trying to preserve the meaning of the examples. Not all occurrences in
`docsite/rst/playbooks_lookups.rst` have been changed for instance to
allow the unchanged examples to be used for testing.

Related to: #17479
2016-09-11 17:31:41 +02:00
James Cammarata
d3418fd658 Flush the queued items in linear periodically 2016-09-10 09:43:49 -05:00
James Cammarata
6b206f5d00 Re-adding processing of results inline with queuing tasks for linear 2016-09-10 09:43:49 -05:00
Chris Houseknecht
39aa740531
Use LooseVersion comparison. Default docker_api_version to 'auto'. 2016-09-10 03:02:50 -04:00
Peter Oliver
c87d84f5b8 Filesystem blocks are of size f_frsize (#17493)
The statvfs(3) manpage on Linux states that `f_blocks` is the "size of fs in `f_frsize` units".  The manpages on Solaris and AIX state something similar.

With ext4 on Linux, I suspect that `f_bsize` and `f_frsize` are always identical, masking this error.  On Solaris, the sizes differ for each of ufs, vxfs and zfs causing the `size_available` and `size_total` facts to be set incorrectly on this OS.
2016-09-09 17:39:39 -04:00
Brian Coca
a3028783d4 removed previously deprecated ';' host separator 2016-09-09 17:32:53 -04:00
Brian Coca
0aaee0272a using delegated host's facts when delegating (#17489)
fixes #17313
2016-09-09 17:26:47 -04:00
jctanner
af2ce7725b Iterate through role paths when installing roles (#17487)
* Iterate through role paths when attempting to install roles
2016-09-09 16:50:50 -04:00
Alvaro Aleman
e8897a9b91 Fix from_yaml for non-string_types. This resolves #17397 (#17398) 2016-09-09 13:21:58 -04:00
Peter Sprygada
19e00cf160 Merge pull request #17481 from privateip/junos
minor update to catch expection if trying close a non existent session
2016-09-09 10:42:05 -04:00
Brian Coca
cd2f60e11a take delegated vars before removing them
fixes #17455
2016-09-09 09:55:24 -04:00
Dag Wieers
2daf527e63 Fix fileglob filter to work just like fileglob lookup plugin (#17480)
The fileglob lookup plugin only returns files, not directories.
This is to be expected, as a mixed list would not be very useful in with_fileglob.
However the fileglob filter does return anything glob.glob() returns.

This change fixes this, so that fileglob returns files (as the name indicates).

PS We could also offer a glob filter for thos that would need it ?

This relates to comments in issue #17136 and fixes confusion in #17269.
2016-09-09 09:37:29 -04:00
Peter Sprygada
1dac6edbe4 minor update to catch expection if trying close a non existent session
This will prevent the junos shared module from throwing an exception if
the session is trying to be closed when it doesn't exist
2016-09-09 09:34:12 -04:00
Dag Wieers
d52a9cee46 Support late evaluation, suppress warnings on SyntaxError (#17462)
See #14304 comments (https://github.com/ansible/ansible/pull/14304#issuecomment-245453209) for more information.
2016-09-09 09:33:23 -04:00
Matt Martz
eefe359d6b Don't use the shell to catch output, catch output in python. Fixes #17137 (#17449) 2016-09-09 09:30:37 -04:00
Dag Wieers
1df924e1d5 Clean up unarchive action plugin (#17429) 2016-09-09 09:27:38 -04:00
Maciej Delmanowski
f5a4677680 Allow for no prefix in the comment filter (#17421)
In the 'comment' filter, if the 'prefix' parameter is set as empty,
don't add an empty line before the comment. To get the previous
behaviour (empty line before comment), set the prefix to '\n'.
2016-09-09 09:23:39 -04:00
Matt Clay
d317560914 Update submodule refs. 2016-09-08 18:09:36 -07:00
Peter Sprygada
686d79a515 Merge pull request #17467 from privateip/netcfg
fixes issue with netcfg not working with match=line and path
2016-09-08 15:48:40 -04:00
Peter Sprygada
457a6ca03e fixes issue with netcfg not working with match=line and path
The difference() method now checks this condition and doesn't filter
the path when match=line
2016-09-08 15:19:12 -04:00
Tobias Wolf
9838d6420a Re-fix the per-item diff output, (#17458)
which got lost in recent big 'performance improvements' merge by @jimi-c.

I had made a previous PR to fix this, then @bcoca had committed an
improved fix. Now it's lost again.

cf: d2b3b2c03e (lost here)
cf:  25e9b5788b (previous fix)

Earlier PR #14849
Earlier issue #14843

Please note that jimi-c broke this last time as well ... seeing a
pattern here.
2016-09-08 11:59:35 -04:00
Edward Marshall
1ec9ac4b70 Defined children for get_vm (#15904) 2016-09-08 08:41:32 -07:00
Abhijit Menon-Sen
032bd1dacf Fix typo 2016-09-08 19:01:37 +05:30
Peter Sprygada
982db58aff Merge pull request #17452 from privateip/netcfg
adds context to diff functions based on config path
2016-09-07 21:49:09 -04:00
Peter Sprygada
d64eaae232 Merge pull request #16553 from ericchou1/devel
Added axapi_authenticate_v3 and axapi_call_v3 for AXAPIv3
2016-09-07 21:41:51 -04:00
Peter Sprygada
08eeb1518a adds context to diff functions based on config path
* difference() now accepts a path keyword to specify comparision domain
2016-09-07 19:40:47 -04:00
Andrea Tartaglia
ba28f1a2da Make ssh_executable available as ansible_ssh_* variable (#17450) 2016-09-07 14:13:11 -07:00
James Cammarata
d1a7e07ccc Fixing another logic issue related to include_role changes 2016-09-07 15:16:11 -05:00
Peter Sprygada
715b800ef1 Merge pull request #17447 from privateip/eos
minor fix in eos shared module returning diff
2016-09-07 15:10:43 -04:00
Peter Sprygada
675e87f68d minor fix in eos shared module returning diff
The diff returned from eos when the transport was set to eapi was as
a dict but is expected to be a str.  This change extracts the diff string
from the dict object and returns it.  The behavior is now consistent
between cli and eapi transports.
2016-09-07 14:26:10 -04:00
Brian Coca
65c373c55a fixed bad condition hiding results 2016-09-07 12:55:03 -04:00
@skg_net
e5b8a177d7 Support files for dnos10_template module (#17399) 2016-09-07 17:35:02 +01:00
Brian Coca
a4abf8da79 Flush cache (#17445)
* transfer module based on pipelining, not tmp

fixes #17381

* added missing flush cache option back
2016-09-07 12:12:41 -04:00
Andrea Tartaglia
dd71469bb7 Added option to change ssh executable path (#17377) 2016-09-07 08:41:43 -07:00
Adrian Likins
07e713e7c6 Fix NameError on 'ansible-vault view' (#17440) 2016-09-07 10:48:01 -04:00
Toshio Kuratomi
8c43750a3e Update submodule refs 2016-09-07 07:23:03 -07:00
Peter Sprygada
d67af04c45 Merge pull request #17431 from privateip/eos
minor roll up of fixes to eos shared module
2016-09-07 08:42:34 -04:00
Toshio Kuratomi
4ed88512e4 Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423)
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing.  So once created it we had two sets of functions that did
the same things but had different implementations.  To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
2016-09-06 22:54:17 -07:00
Peter Sprygada
ca95b2ae4f minor roll up of fixes to eos shared module
* added back import of Command object
* fixed eapi requests to handle output format correctly
* get_config() now honors include_defaults kwargs
2016-09-06 22:54:04 -04:00
Matt Davis
f239e1e61f windows async changes and tests (#17400) 2016-09-06 17:38:12 -07:00
nitzmahone
056a7cb957 bump core submodule ref for async_wrapper.ps1 bugfix 2016-09-06 16:52:44 -07:00
Matt Clay
94a0d2afb4 Add partially backwards compatible version of _fixup_perms. (#17427)
Also added a deprecation notice for _fixup_perms.

Resolves issue #17352 (assumes custom actions use recursive=False).
2016-09-06 16:49:59 -07:00
Toshio Kuratomi
1d412059a0 Fix UnicodeError loading plugins with non-ascii in them on python3 2016-09-06 16:35:25 -07:00
Peter Sprygada
113dfc5562 Merge pull request #17426 from privateip/nxos
fixes issue when piping commands through json with output not specifed
2016-09-06 19:24:05 -04:00
Peter Sprygada
52d1187f5c Merge pull request #17425 from privateip/netcli
removes command caching on retrieve from netcli
2016-09-06 19:23:53 -04:00
Peter Sprygada
666b19869b Merge pull request #17424 from privateip/fix-17408
removes unneeded code from netcli
2016-09-06 19:23:41 -04:00
Peter Sprygada
5730c97f9e Merge pull request #17422 from privateip/fix-17407
bug fix for AttributeError: 'str' object has no attribute 'get'
2016-09-06 19:23:28 -04:00
Peter Sprygada
c228dfe692 fixes issue when piping commands through json with output not specifed
There is an issue when piping cli commands through json but the output
is specified as either text or the output is none and the transport is
cli.  The results would not be loaded properly for conditional
evaluation.  This is similar to #17422
2016-09-06 16:55:53 -04:00
Peter Sprygada
da931b04ad removes command caching on retrieve from netcli
The caching of commands in CommandRunner is providing no useful feature
and causing problems.  This removes the code and simply returns the
requested command results.
2016-09-06 16:53:14 -04:00
Peter Sprygada
fbda7d127f removes unneeded code from netcli
Some old remnants of code from the refactor of netcli was left over as
reported in #17408.  This commit removes the old code as it isn't need
and in fact wasnt doing anything
2016-09-06 16:35:06 -04:00
nitzmahone
abbb93e117 bump core submodule ref for windows async 2016-09-06 13:29:45 -07:00
Matt Davis
b860b2d258 windows environment support (#17402) 2016-09-06 13:00:21 -07:00
Peter Sprygada
7fe64ef9b8 bug fix for AttributeError: 'str' object has no attribute 'get'
Exception thrown when using cli transport in eos but piping the command
through json

* eos now checks for `| json` and automatically changes the output type
* adds back import of Command object

tested on EOS 4.15.4F
2016-09-06 15:33:55 -04:00
Toshio Kuratomi
b6d24be09e Update submodule refs 2016-09-06 12:30:20 -07:00
James Cammarata
37f721f315 Remove debug lock 2016-09-06 13:04:50 -05:00
Nathaniel Case
972dc3fc97 Network module cleanup (#17334)
* Clean up EOS, IOS, IOS-XR, Junos, NX-OS, and OpenSwitch

* Cleanup net* files

* Re-add NetworkModule import to network module_utils files

This will trick modules into importing code from module_utils code, thus
including it in the final Ansiballz zipfile.

* Give asa a look over, too
2016-09-06 13:49:48 -04:00
James Cammarata
7a0b25d5fa Fixing incorrect 'task' variable bug in strategy/__init__.py 2016-09-05 23:41:21 -05:00
Marc-André Gatien
d56b0aa813 typo fix for variable ANSIBLE_ETCD_VERSION (#17373) 2016-09-05 23:00:56 -04:00
Michael Scherer
02d9f14b8b Do not crash if current dir do not exist, fix #17369 (#17379)
Do not crash if current dir do not exist
2016-09-05 22:46:47 -04:00
Brian Coca
ff34f5548d Dynamic role include (#17401)
* dynamic role_include

* more fixes for dynamic include roles

* set play yfrom iterator when dynamic

* changes from jimi-c

* avoid modules that break ad hoc

TODO: should really be a config
2016-09-05 20:07:58 -04:00
Peter Sprygada
439aa353f1 fixes bug when template is missing src argument
adds AttributeError to exception handling to change missing src argument

fixes #17391
2016-09-05 08:54:14 -04:00
Peter Sprygada
9c5bcda4fe Merge pull request #17388 from privateip/asa
fix up asa shared module
2016-09-04 20:59:20 -04:00
Peter Sprygada
06c76034dc Merge pull request #17385 from privateip/shell
minor optimizations and clean up in shell.py
2016-09-04 09:21:28 -04:00
Peter Sprygada
1b1c1fe992 Merge pull request #17386 from privateip/netcli
clean up method signatures in netcli
2016-09-04 09:21:17 -04:00
Peter Sprygada
d976c80a22 roll up of updates to junos shared module
* adds implementation for Network methods
* adds action plugin junos_config
* removes _log() and raises exceptions instead to be handled by the module
2016-09-04 08:37:33 -04:00
Peter Sprygada
a839acfa33 clean up method signatures in netcli
removes unneeded **kwargs from methods in netcli
2016-09-04 08:34:37 -04:00
Peter Sprygada
a40515524f minor optimizations and clean up in shell.py
* cleans up method signatures
* drops checking for Command properties that no longer exist
2016-09-04 08:33:26 -04:00
Peter Sprygada
7aa1220b96 fix up asa shared module
* add authorize() method to handle authorization
* move terminal commands to after authorization completed
* add save_config() method to handling writing config to disk
* fix minor issues with get_config
* adds action plugin asa_config
2016-09-04 08:31:40 -04:00
Rene Moser
a6c0f07fbb Update extra module submodule ref, fixes build 2016-09-04 09:43:01 +02:00
Toshio Kuratomi
9ad77a5398 Update submodule refs 2016-09-03 11:21:23 -07:00
Toshio Kuratomi
f7b22a5eaa Fix paramiko's exec_command() to return bytes on python3 (#17372)
* Fix paramiko's exec_command() to return bytes on python3

* Run test_connection for python3 now too

* Fix atomic_move for problem in shippable's testing

* Python-2.4 needs to use b()
2016-09-02 20:32:14 -07:00
Matt Clay
3b2830818e Update submodule refs. 2016-09-02 18:37:54 -07:00
Matt Clay
cfacc1fd53 Pass '_' to async_wrapper for no argsfile. (#17374)
This provides compatibility with changes made to the async_wrapper module.
2016-09-02 18:33:33 -07:00
Matt Clay
bc143a9adb Update submodule refs. 2016-09-02 18:20:41 -07:00
Matt Clay
2392865d69 Update submodule refs. 2016-09-02 12:43:43 -07:00
Toshio Kuratomi
7728d70bea Replace long with int (#17368)
I can't figure out any reason that we'd need to use long explicitly here
as python implicitly moves from a C long int to python Long
automatically under the covers.  My best guess is that it was originally
used so that the facts module would work on python-2.2 where the user
had to convert a number from int to long manually but python-2.4 is our
current baseline.

long isn't present on Python3 so now is a good time to remove this
cruft.  (We had a workaround for Python3; this commit also removes the
workaround.)
2016-09-02 11:26:47 -07:00
Toshio Kuratomi
67177105e3 We now have an exception return value. Make use of it instead of putting the traceback into msg (#17365) 2016-09-02 08:27:01 -07:00
Toshio Kuratomi
6d0755f71e Update submodule refs 2016-09-02 07:19:38 -07:00
Brian Coca
4457985062 added ability to use pure boolean in conditionals 2016-09-02 08:54:38 -04:00
Will Thames
d54f5277d5 Add ksu privilege escalation (#17340)
Allow ksu privilege escalation to be used
as a standard become_method

https://web.mit.edu/kerberos/krb5-1.12/doc/user/user_commands/ksu.html
2016-09-01 16:54:31 -04:00
Peter Sprygada
c8431e334b Merge pull request #17296 from skg-net/devel
Add support for Dell Networking OS10 Command and Config Modules
2016-09-01 10:26:30 -04:00
John R Barker
02308ce27b docs_fragments: Correct spelling mistakes, fix formatting (#16930)
docs_fragments: Correct spelling mistakes, fix formatting
2016-09-01 13:20:13 +01:00
Toshio Kuratomi
88d17642c5 Update submodule refs to sync to_text, to_bytes, to_native changes with usage 2016-09-01 04:20:58 -07:00
Tobias Wolf
c23b11d212 [Inventory] Cache the result of enumerating groups and host names
for `VariableManager._get_magic_variables()`.

This saves a lot of time re-iterating the nearly always constant global
list of groups and their members.

Generate once and cache, and invalidate cache in case `add_host:` or
`group_by:` are used.
2016-09-01 06:19:49 -05:00
Toshio Kuratomi
28227546fa Various python3 updates for module_utils: (#17345)
* Port set_*_if_different functions to python3
* Add surrogate_or_strict and surrogate_or_replace error handlers for
  to_text, to_bytes, to_native
* Set default error handler to surrogate_or_replace
* Make use of the new error handlers in the already ported code
* Move the unittests for module_utils._text as they aren't in basic.py
* Cleanup around SEQUENCETYPE.  On python2.6+ SEQUENCETYPE includes
  strings so make sure code omits those explicitly if necessary
* Allow arg_spec aliases to be other sequence types
2016-09-01 04:19:03 -07:00
Peter Sprygada
d8f0ceee61 Merge pull request #17331 from privateip/openswitch
add Ssh transport class to openswitch shared module
2016-08-31 22:05:30 -04:00
Roman Belyakovsky
d80d986a38 Added to_datetime filter (#17145)
* Added to_datetime filter

* Added to_datetime filter documentation
2016-09-01 01:51:03 +02:00
Senthil Kumar Ganesan
008e79fe74 Removed the unused module imports 2016-08-31 14:36:50 -07:00
Toshio Kuratomi
28429a636d Update submodule refs for fix that new unittest needs 2016-08-31 14:24:34 -07:00
Matt Clay
6744332600 Update submodule refs. 2016-08-31 13:21:41 -07:00
Brian Coca
f39799fbcd implemented loop pausing (#17289)
* implemented loop pausing

- added loop pause to changelog
- only pause between iterations, avoid 1st/last
- added example to docs

* fixed note placement

* else

* added docs for loop_control: label
2016-08-31 16:09:37 -04:00
Matt Clay
e6e541fcb3 Update submodule refs. 2016-08-31 13:09:15 -07:00
James Cammarata
307f98167a Updating submodule reference for core after meta change 2016-08-31 14:14:01 -05:00
Peter Sprygada
4ed8306099 add Ssh transport class to openswitch shared module
This adds a Ssh transport class for working directly with DC config
on OpenSwitch enabled nodes.
2016-08-31 15:06:22 -04:00
James Cammarata
78b8f81cab New feature: add new meta action end_play
This feature also cleans up and extends the meta subsystem:
* Allows for some meta actions (noop, clear_facts, clear_host_errors,
  and end_play) to operate on a per-host basis, meaning they can work
  with the free strategy as expected.
* Allows for conditionals on meta tasks.
* Fixes a bug where (for the linear strategy) metas were not treated
  as a run_once task, meaning every host in inventory would run the
  meta task.

Fixes #1476
2016-08-31 13:59:58 -05:00
Nathaniel Case
01911e4958 Update Junos to NetworkModule (#17197)
* Junos NetworkModule adaption.

* Take CLI_PROMPTS_RE & CLI_ERRORS_RE from ios.py
2016-08-31 14:34:15 -04:00
James Cammarata
b71957d6e6 Move queuing tasks to a background thread 2016-08-31 13:33:01 -05:00
James Cammarata
9ecec6c28e Don't do parent stuff during serialize if squashed or finalized 2016-08-31 13:33:01 -05:00
James Cammarata
cddf1cf98e Some further cleanup in the meta branch
* adds squashing to objects, which allows them to be squashed down
  to a final "view" before post_validate to avoid expensive evaluations
  of parent attributes
2016-08-31 13:33:01 -05:00
James Cammarata
96e2be9bf8 Selectively assign the getter for better performance
Introduces the `inherit` param for FieldAttributes, which is now used
in BaseMeta when constructing the getter property to enhance performance
by reducing the amount of work the getter generally has to do.
2016-08-31 13:33:01 -05:00
James Cammarata
3a51587220 Meta meta meta 2016-08-31 13:33:01 -05:00
Toshio Kuratomi
71ef25d5e8 For module parameter checking, allow conversion of int to float (#17325)
Fixes https://github.com/ansible/ansible-modules-core/issues/4084
2016-08-31 08:57:47 -07:00
Toshio Kuratomi
811fc385ee Update submodule refs 2016-08-31 08:37:26 -07:00
Michael Scherer
acd69bcc77 Fix url lookup for python 3 (#17295)
* Use six instead of urllib2, for python 3 compat

* Open the certificate file using binary mode

On python3, os.write requires 'bytes'. Also avoid
using a too broad exception, since the issue was hard
to spot due to it.

* Do not add the header User-agent if not set

Python3 module do raise a exception if a header is
not a string-like object, and the default value is None.
2016-08-31 07:03:20 -07:00
Andrew Gaffney
f65a3ce547 Support for specifying item label in a loop (#17294) 2016-08-31 09:59:43 -04:00
Peter Sprygada
61e7c3af1a Merge pull request #17315 from privateip/openswitch
minor bug fixes in openswitch shared module
2016-08-31 09:59:30 -04:00
Peter Sprygada
539d13a2cc Merge pull request #17321 from privateip/ios
fixes authorize method in ios shared module
2016-08-31 09:59:08 -04:00
Peter Sprygada
390be19e29 Merge pull request #17320 from privateip/fix-netcli-iterable
fixes issue with converting commands to an iterable was not being done
2016-08-31 07:37:58 -04:00
Peter Sprygada
7fc46e8233 fixes authorize method in ios shared module
The authorize method was calling run_commands() instead of execute().  This
fixes that problem so that authorize() calls are made direclty on the shell
object now
2016-08-31 07:27:39 -04:00
Peter Sprygada
1f9253c032 fixes issue with converting commands to an iterable was not being done
This fix will now force the commands arg in __call__ to be a list of
objects which otherwise would cause netcli not process the stack
2016-08-31 07:21:59 -04:00
Senthil Kumar Ganesan
f12a8a2267 Incorporated Ansible community feedback 2016-08-30 20:05:44 -07:00
Peter Sprygada
ec3dcefd39 minor bug fixes in openswitch shared module
* fix setting cookie after successful login
* raise NotImplementedError if run_commands is called in Rest
* return header msg key if status is not 2xx
* add action plugin ops_config
2016-08-30 23:04:41 -04:00
Allen Sanabria
03132041fb Include vars updated to work with directories (#17207)
* New features for include_vars

include_vars.py now allows you to include an entire directory and its nested directories of variable files.

Added Features..

* Ignore by default *.md, *.py, and *.pyc
* Ignore any list of files.
* Only include files nested by depth (default=unlimited)
* Match only files matching (valid regex)
* Sort files alphabetically and load in that order.
* Sort directories alphabetically and load in that order.

```
    - include_vars: 'vars/all.yml'

    - name: include all.yml
      include_vars:
        file: 'vars/all.yml'

    - name: include all yml files in vars/all and all nested directories
      include_vars:
        dir: 'vars/all'

    - name: include all yml files in vars/all and all nested directories and save the output in test.
      include_vars:
        dir: 'vars/all'
        name: test

    - name: include all yml files in vars/services
      include_vars:
        dir: 'vars/services'
        depth: 1

    - name: include only bastion.yml files
      include_vars:
        dir: 'vars'
        files_matching: 'bastion.yml'

    - name: include only all yml files exception bastion.yml
      include_vars:
        dir: 'vars'
        ignore_files: 'bastion.yml'
```

* Added whitelist for file extensisions (yaml, yml, json)

* Removed unit tests in favor of integration tests
2016-08-30 14:34:31 -07:00
René Moser
26118a51f8 exo_dns: new module utils and integration tests for exoscale DNS (#17230) 2016-08-30 21:48:28 +02:00
Michael Scherer
e3f54cb798 Add support for become_flags on the task level (#17310)
Working on the test suite, I tried to replace a call to sudo to a
call to su, and found out that I can't change user to 'nobody'
without changing the option become_flags in ansible.cfg

As this would be dependent on the user and the task, it make more sense
to push the setting there.
2016-08-30 12:29:00 -07:00
Michael Scherer
65f1eb8e5c Reduce no longer exist in python3, so we have to use six (#17304) 2016-08-30 10:58:22 -07:00
Michael Scherer
adcb87f781 file() function in python3 no longer exist, so use open() (#17303) 2016-08-30 10:47:41 -07:00
Michael Scherer
9245c786db Fix the lines lookup to work on python3 (#17291)
Since stdout is (on python3) of type 'bytes', callbacks
plugins fail in the test suite, because calls backs expect
a string.
2016-08-30 10:38:55 -07:00
Michael Scherer
8f364b549b Fix indexed_items.py to run on python3 (#17292)
On python3, zip is a iterator so we need
to explictily create the list from that.
2016-08-30 09:49:58 -07:00
Senthil Kumar Ganesan
f6aa730c3c Utilities to support DELL Networking OS10 command and config modules 2016-08-29 21:29:26 -07:00
Toshio Kuratomi
54d3a977f2 Update submodule refs 2016-08-29 13:21:02 -07:00
Toshio Kuratomi
fa804125b5 Python3 fixes and porting (#17271)
* Fix to_native call in selinux_context and selinux_default_context to
  use the error handler correctly.
* Port set_mode_if_different to work on python3
* Port atomic_move to work on python3
* Fix check_password_prompt variable which wasn't renamed properly
2016-08-29 09:11:40 -07:00
Peter Sprygada
c16f34bf8e Merge pull request #17279 from privateip/shell
catches timeout error when connecting to remote host in shell
2016-08-29 08:47:48 -04:00
Peter Sprygada
2179677294 Merge pull request #17278 from privateip/nxos
changes nxos method for passing kwargs to get_config()
2016-08-29 08:47:33 -04:00
Peter Sprygada
f5df946e6e Merge pull request #17277 from privateip/eos
fixes two bugs in the eos shared module
2016-08-29 08:47:13 -04:00
Peter Sprygada
820260b22d catches timeout error when connecting to remote host in shell
This will now catch a timeout error when shell attempts to open the
connection to the remove device and gracefully raise it as a ShellError
2016-08-28 23:03:46 -04:00
Peter Sprygada
2cb2ba1fe6 changes nxos method for passing kwargs to get_config()
This change makes both the Cli and Nxapi objects handle the get_config()
method consistently the same
2016-08-28 23:02:36 -04:00
Peter Sprygada
5ce032bf6d fixes two bugs in the eos shared module
* fixes issue with correctly returning the running-config over eapi when a
  call was made to get_config()
* fixes issue the MRO in Cli transport
2016-08-28 22:58:52 -04:00
Abhijit Menon-Sen
a9d5bf717c Merge pull request #17272 from PeterMartini/typo-fix
Simple documentation typo fix, 'iIf' to 'If'
2016-08-27 18:23:00 +05:30
Tobias Rüetschi
457cf49868 univention: add common code for univention corporate server modules (#16172)
* univention: add common code for univention corporate server modules

* univention: try import only univention specific libraries

* Code Review with @2-B, slight API changes and refactoring.

* Added module documentation overview, describing the provided functions
* Moved module-global objects into getter functions, so that we don't
  need to import possibly-unavailable univention modules at the module level.
* Renamed some exports for improved consistency:

  - module_name()    -> module_by_name()
  - orig_ldap        -> ldap_module()
  - ldap             -> uldap()

Note that this introduces slight API changes from the outside. Instead of
directly accessing module properties, you now have module functions with the
same name. Examples:

   - ansible.module_utils.univention.position_base_dn()
   - ansible.module_utils.univention.config_registry()
   - ansible.module_utils.univention.base_dn()
   - ansible.module_utils.univention.config()

* module_utils univention: fix library

* move module_utils from univention to univention_umc, because python import univention fails if library is called univention

* univention_umc: fix intention

* univention: change common code to BSD-2-clause
2016-08-27 09:42:53 +02:00
Peter Martini
15f10ab4bc Simple documentation typo fix, 'iIf' to 'If' 2016-08-26 22:52:12 -04:00
Brian Coca
4e6a7a9e01 allow include_role to specify vars/defaults files 2016-08-26 21:54:59 -04:00
Peter Sprygada
4b679ffd84 Merge pull request #17265 from privateip/iosxr
fixes iosxr configure method to commit the changes
2016-08-26 16:18:01 -04:00
Brian Coca
f25ec5adb3 fix action parsing to avoid conflicts agin 2016-08-26 16:15:55 -04:00
Peter Sprygada
bb630f52ff fixes iosxr configure method to commit the changes
The iosxr configure method did not send the commit command to active the
changes after pushed to the remote device.  This change address that problem
2016-08-26 15:58:06 -04:00
Peter Sprygada
be55bd6cdf disable prompt timestamps upon successful connection to iosxr 2016-08-26 15:09:02 -04:00
Peter Sprygada
66825f094d Merge pull request #17262 from privateip/iosxr
add commit keyword arg to load_config method
2016-08-26 14:26:41 -04:00
Brian Coca
c755ae6a1d updated sub refs 2016-08-26 14:12:15 -04:00
Brian Coca
bd9094c925 include_role (role revamp implementation) (#17232)
* attempt #11 to role_include

* fixes from jimi-c

* do not override load_data, move all to load

* removed debugging

* implemented tasks_from parameter, must break cache

* fixed issue with cache and tasks_from

* make resolution of from_tasks prioritize literal

* avoid role dependency dedupe when include_role

* fixed role deps and handlers are now loaded

* simplified code, enabled k=v parsing

used example from jimi-c

* load role defaults for task when include_role

* fixed issue with from_Tasks overriding all subdirs

* corrected priority order of main candidates

* made tasks_from a more generic interface to roles

* fix block inheritance and handler order

* allow vars: clause into included role

* pull vars already processed vs from raw data

* fix from jimi-c blocks i broke

* added back append for dynamic includes

* only allow for basename in from parameter

* fix for docs when no default

* fixed notes

* added include_role to changelog
2016-08-26 13:42:13 -04:00
Peter Sprygada
eac7caefd8 add commit keyword arg to load_config method
this adds a new keyword arg to the load_config method that will control
whether or not a loaded configuration is committed on the device
2016-08-26 13:16:18 -04:00
Michael Scherer
a30f545a62 Do not convert Nonetype to "None" (#17261)
If someone use a task with a empty name like this:

  - name:
    command: true

This will result in displaying 'None' as a task name instead of
'command'.
2016-08-26 09:48:27 -07:00
Brian Coca
1139d61d59 simplified logic paths 2016-08-26 11:39:12 -04:00