Commit Graph

20466 Commits (7a9395b5e0059836fd510f252a9753229c4c24cc)
 

Author SHA1 Message Date
Andrew Gaffney f65a3ce547 Support for specifying item label in a loop (#17294) 8 years ago
Peter Sprygada 61e7c3af1a Merge pull request #17315 from privateip/openswitch
minor bug fixes in openswitch shared module
8 years ago
Peter Sprygada 539d13a2cc Merge pull request #17321 from privateip/ios
fixes authorize method in ios shared module
8 years ago
Peter Sprygada 390be19e29 Merge pull request #17320 from privateip/fix-netcli-iterable
fixes issue with converting commands to an iterable was not being done
8 years ago
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
8 years ago
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
8 years ago
Senthil Kumar Ganesan f12a8a2267 Incorporated Ansible community feedback 8 years ago
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
8 years ago
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.
8 years ago
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
8 years ago
René Moser 26118a51f8 exo_dns: new module utils and integration tests for exoscale DNS (#17230) 8 years ago
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.
8 years ago
Michael Scherer 65f1eb8e5c Reduce no longer exist in python3, so we have to use six (#17304) 8 years ago
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.
8 years ago
Michael Scherer adcb87f781 file() function in python3 no longer exist, so use open() (#17303) 8 years ago
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.
8 years ago
Scott Butler 4ba90a3817 Edited dynamic vs. static includes update 8 years ago
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.
8 years ago
James Cammarata 9c311b6b13 Add docs on static/dynamic includes 8 years ago
Senthil Kumar Ganesan f6aa730c3c Utilities to support DELL Networking OS10 command and config modules 8 years ago
Senthil Kumar Ganesan f4f1075e86 Merge remote-tracking branch 'upstream/devel' into devel
Merge the latest code from upstream
8 years ago
Matt Davis 1c33b5a9f0 fix remote shippable target failures (#17287)
cryptography upgrade caused fatal error when pycrypto was not installed
8 years ago
Toshio Kuratomi 54d3a977f2 Update submodule refs 8 years ago
René Moser 8210260d94 changelog: update new modules from module-extras (#17286) 8 years ago
Toshio Kuratomi b8a8027b7d We've decided that python-3.5 is the minimum python version (#17270) 8 years ago
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
8 years ago
Peter Sprygada c16f34bf8e Merge pull request #17279 from privateip/shell
catches timeout error when connecting to remote host in shell
8 years ago
Peter Sprygada 2179677294 Merge pull request #17278 from privateip/nxos
changes nxos method for passing kwargs to get_config()
8 years ago
Peter Sprygada f5df946e6e Merge pull request #17277 from privateip/eos
fixes two bugs in the eos shared module
8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Abhijit Menon-Sen a9d5bf717c Merge pull request #17272 from PeterMartini/typo-fix
Simple documentation typo fix, 'iIf' to 'If'
8 years ago
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
8 years ago
Peter Martini 15f10ab4bc Simple documentation typo fix, 'iIf' to 'If' 8 years ago
Brian Coca 4e6a7a9e01 allow include_role to specify vars/defaults files 8 years ago
Peter Sprygada 4b679ffd84 Merge pull request #17265 from privateip/iosxr
fixes iosxr configure method to commit the changes
8 years ago
Brian Coca f25ec5adb3 fix action parsing to avoid conflicts agin 8 years ago
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
8 years ago
Peter Sprygada e4b0690ef3 Merge pull request #17264 from privateip/iosxr
disable prompt timestamps upon successful connection to iosxr
8 years ago
Peter Sprygada be55bd6cdf disable prompt timestamps upon successful connection to iosxr 8 years ago
Peter Sprygada 66825f094d Merge pull request #17262 from privateip/iosxr
add commit keyword arg to load_config method
8 years ago
Brian Coca c755ae6a1d updated sub refs 8 years ago
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
8 years ago
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
8 years ago
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'.
8 years ago
Brian Coca 1139d61d59 simplified logic paths 8 years ago
Patrik Lundin b4f338bca7 Add OpenBSD virtualization facts. (#17227)
* Add OpenBSD virtualization facts.

Patch written by @jasperla.

Tested by various people on:
- virtualbox
- vmware esx(i) + fusion
- kvm (smartos + plain linux + a random cloud provider)

This patch is already present in the OpenBSD port of ansible.

* Rework diff to get rid of extra returns.

Requested by @bcoca.

While here, use four-space indentations of all code blocks.

* Set facts even if no match is found.

Discussed with @bcoca.

* Find sysctl via get_bin_path().

Requested by @bcoca.

* Fail if we do not find a sysctl binary.

* Do not fail if a sysctl binary is not found.

Just set empty fact values instead.
Requested by @bcoca.
8 years ago
Abhijit Menon-Sen b4a035718e Make _display_plugin_load much less noisy
There was general consensus that displaying every plugin load on -vvv
was *way* too noisy. This commit reformats the log message to be less
verbose, and drops it down to debugging-only level.
8 years ago
Alexander Stock 238cccf166 Fix "Text file busy" exception in atomic_move (#9526) (#17204)
tempfile.NamedTemporaryFile keeps a file handle causing os.rename() to fail with windows based vboxfs: [Errno 26] Text file busy.
Changed NamedTemporaryFile to mkstemp() and added a finally block to unlink the temp file in each and every case.
8 years ago