* Add support for IOS vlan parsing filter.
Example usage below:
{% set parsed_vlans = vlans | vlan_parser %}
switchport trunk allowed vlan {{ parsed_vlans[0] }}
{% for i in range (1, parsed_vlans | count) %}
switchport trunk allowed vlan add {{ parsed_vlans[i] }}
* Update test_network.py
Add import statement for filter
* Fixed PEP8 issues relating to comments
* Fix PEP8 issues related to blank lines
* Removed magic numbers for line lengths. This should generalize support
to other IOS-like NOS that use similar methods for listing vlans. The
default arguments for line lengths will still be specific to Cisco IOS.
The unit tests for line length are still specific to Cisco IOS.
* Add url_username and url_password options for url lookup
* Update url.py
Fix documentation
* Fix options documentation
Default value for url_password and url_username is None not an empty string
* Add version added to documentation
* Break command over multiple lines to fix linting
* Fix more linting
* Update version_added in url.py to 2.8
This fix checks if executable exists in local connection specified using
ANSIBLE_EXECUTABLE variable.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* win_reboot: Fix for ignore post_reboot_delay
This fixes an issue where win_reboot would be ignoring the provided
post_reboot_delay (and on Windows timing/waiting is everything!)
This must be backported to the v2.7 branch.
* Merge post-reboot handling into run()
* Adding a basic get lookup for rabbitmq.
* Always return a list
* If content type is JSON, make accessible via dict.
* Fixed incorrect json.loads variable and missing raise
* Change to document returned data
* Fixed pep8 issues
* Adding integration testing
* Moving lookup intgration tests to new target
* New rabbitmq lookup plugin (#44070).
* New rabbitmq lookup plugin (#44070).
* PR review feedback updates
* Testing pika is installed
* Minor mods to tests
* Check if connection is already closed or closing
* Updated tests and connection testing
* PR review feedback updates
* PR review include ValueError in AnsibleError output
* Suggesting to use set_fact when using returned variable more than once.
* Cleaned up some tests, added some notes and handling connection closure on some exceptions.
* Removed finally statement and added some additional error handling.
* Added some additional error handling.
* PR review updates.
* Additional integration tests and removing return in finally
* Updated version
* Changing back to running tests on ubuntu.
* Additional tests
* Running tests on Ubuntu only
* Fixing syntax error
* Fixing ingtegration tests and a string/byte issue
* Removed non-required test and fixed BOTMETA
* Trying to fix integration test failure on ubuntu1404
* Some issues occured when handling messages from the queue with to_native. Switching to to_text resolved the issues.
* Renaming channel to queue (thanks dch). Disabling trusty tests.
Fixes#35120 : the redis cache plugin keeps key/value
entries in an in-memory cache to avoid hitting the
redis database each time.
The problem is that a cache entry is only set when
a value is get or set but it is always deleted when
trying to delete a value.
When the --flush-cache ansible-playbook option is used,
the redis cache plugin is first asked to remove every
entry corresponding to every hostname present in the inventory.
As no value as been set/get so far, it then tries to delete
an unexisting value from the cache and hence crashes with
a KeyError exception.
* win_exec: refactor PS exec runner
* more changes for PSCore compatibility
* made some changes based on the recent review
* split up module exec scripts for smaller payload
* removed C# module support to focus on just error msg improvement
* cleaned up c# test classifier code
* New option JUNIT_TASK_RELATIVE_PATH to output relative paths.
It makes the output in Jenkins much more readable as the absolute
path was taking the whole width of the screen, leaving no space for
the actual message.
A makedirs instead of mkdir slipped in as to make the creation of
the output directory recursive, hope this is OK.
* Add version_added field to doc set to 2.8
* Check that union Jinja filter can be chained
* set filters: fix unexpected templating type error
this error occurs with Jinja 2.10 since 32ec69d827,
for example when union filters are chained:
$ ansible all -i localhost, -mdebug -a"msg={{ []|union([])|union([]) }}"
localhost | FAILED! => {
"msg": "Unexpected templating type error occurred on ({{ []|union([])|union([]) }}):
unsupported operand type(s) for +: 'set' and 'list'"
}
* fix callback Plugin json to support global stat set by set_stats module
* refactor to not break compatiblity, add trailing comma on output dict
* Remove sorted, as it not needed
* refactor, to sivels better code
* clean some code messup
* add changelog fragment
* added missing new line
* fix pep8 stuff
The stdout and stderr values returned from self._low_level_execute() are text, not bytes. This results in an error in Python 3 since str and bytes cannot be concatenated.
Changing to unicode type allows this to work without error on Python 2 and Python 3.
* openshift inventory: fix exception when auth fails
Fix 'ForbiddenError' object has no attribute 'message':
[WARNING]: * Failed to parse test.yml with openshift plugin: 'ForbiddenError' object has no attribute 'message'
File "ansible/lib/ansible/inventory/manager.py", line 270, in parse_source
plugin.parse(self._inventory, self._loader, source, cache=cache)
File "ansible/lib/ansible/plugins/inventory/openshift.py", line 122, in parse
self.setup(config_data, cache, cache_key)
File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 58, in setup
self.fetch_objects(connections)
File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 250, in fetch_objects
super(OpenShiftInventoryHelper, self).fetch_objects(connections)
File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 81, in fetch_objects
namespaces = self.get_available_namespaces(client)
File "ansible/lib/ansible/module_utils/k8s/inventory.py", line 95, in get_available_namespaces
raise K8sInventoryException('Error fetching Namespace list: {0}'.format(exc.message))
Don't try to get 'message' attribute from:
- K8sInventoryException instances
- Exception instances
- KubernetesException instances (because KubernetesException can be
Exception)
* move k8s/OpenShift inventory plugin dedicated code
inventory plugin specific code should not be located in
lib/ansible/module_utils directory. Then ansible.utils methods can be
reused (for example Display).
* Remove unused class variables 'helper'
unused since 4d77878654.
* allow jinja2 unique filter compat
* detect if unique is provided, fallback with warning
* handle j2 specific params
* now all filters using unique must pass environment
* added env to tests
also normalized on how we normally import and use exceptoins
* Start of work on pylint plugin to catch due/past-due deprecated calls
* Improve deprecated pylint plugin
* Catch call to AnsibleModule.deprecate also
* Skip splatted kwargs, we can't infer that info
* Add error for invalid version in deprecation
* Skip version if it's a reference to a var
* Disable ansible-deprecated-no-version for displaying deprecated module info
* fix comments
* is None
* Force specifying a version, this can be disabled on a per case basis
* Disable ansible-deprecated-version by default
* Remove to look for 2.8 deprecated
* Revert "Remove to look for 2.8 deprecated"
This reverts commit 4e84034fd1.
* Add script and template used for creating issues for deprecated issues
* Fix underscore var