Commit graph

20888 commits

Author SHA1 Message Date
James Cammarata
307f98167a Updating submodule reference for core after meta change 2016-08-31 14:14:01 -05:00
James Cammarata
078840b427 Updating CHANGELOG for meta end_play and meta conditionals feature 2016-08-31 14:13:29 -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
33245b2011 Add checklist item on how to use env vars with basic auth helpers 2016-08-31 09:33:33 -07: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
Andrea Tartaglia
6fab8bc643 Added allow_world_readable_tmpfiles in config #17013 (#17153) 2016-08-31 17:07:13 +02:00
Fabio Alessandro Locati
b931873f3a Remove see also at the same page (#17317) 2016-08-31 16:39:51 +02: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
Toshio Kuratomi
bc8680f12d Running the test with a locale other than English make that test fail (#17306)
While tests are supposed to be run in docker, people might still
want to use them on their own boxes.
2016-08-31 07:02:22 -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
Michael Scherer
878d0d5b87 Running the test with a locale other than English make that test fail
While tests are supposed to be run in docker, people might still
want to use them on their own boxes.
2016-08-31 00:55:14 +02: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
d8f66defd0 Ignore difference on whitespace (#17302)
While trying to fix the test suite on python3, I noticed
this test fail due to to_json adding more whitespace in
python3 than in python2. So -w should ignored those
differences.
2016-08-30 10:52:19 -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
Scott Butler
4ba90a3817 Edited dynamic vs. static includes update 2016-08-30 10:27:35 -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
James Cammarata
9c311b6b13 Add docs on static/dynamic includes 2016-08-30 07:05:18 -05:00
Senthil Kumar Ganesan
f6aa730c3c Utilities to support DELL Networking OS10 command and config modules 2016-08-29 21:29:26 -07:00
Senthil Kumar Ganesan
f4f1075e86 Merge remote-tracking branch 'upstream/devel' into devel
Merge the latest code from upstream
2016-08-29 16:06:55 -07:00
Matt Davis
1c33b5a9f0 fix remote shippable target failures (#17287)
cryptography upgrade caused fatal error when pycrypto was not installed
2016-08-29 14:01:25 -07:00
Toshio Kuratomi
54d3a977f2 Update submodule refs 2016-08-29 13:21:02 -07:00
René Moser
8210260d94 changelog: update new modules from module-extras (#17286) 2016-08-29 18:42:47 +02:00
Toshio Kuratomi
b8a8027b7d We've decided that python-3.5 is the minimum python version (#17270) 2016-08-29 09:12:37 -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