* Handle errors in jmespath in json_query better
Catch any exceptions raised from jmespath and raise
an AnsibleFilterError instead.
Avoid a traceback.
Fixes#20379
* pep8
* Fix logic in os_nova_host_aggregate module
Fix logic around adding availability zone to metadata and comparing existing host list to parameter host list.
Previously, when no availability zone was defined, an empty availability zone was being appended to metadata. This was causing 'empty named availability zone' errors when running the module against an already existing host aggregate with no availability zone. This was fixed by only appending availability zone to metadata if it is not an empty parameter.
Also added set() casting when comparing existing and new host lists. Previously, if existing host list was not in the same order as the host list in the .yml parameter file the module would consider this a change even if the two lists had the same entries.
* Update os_nova_host_aggregate.py
Currently the ignore_image option can be set, but can not work as it is
descripted in document. The reason is the code will check the difference
of configurations between current container and target image, and it
will mark the `different` to `True` when the image is different even we
set `ignore_image=true`, that will cause the container being re-create.
Add new option to pass the path to the hponcfg binary which may not live in
$PATH. For example on ESXi hypervisors it tends to be located in
/opt/hp/tools/ instead. Also properly implement a verbose option for which the
code was already commented out.
The command lxc-clone is deprecated in favor of lxc-copy. This patch
changes the lxc module to use the new lxc-copy command by default. If
not present, it will fallback to the old lxc-clone command to keep it
backward compatible with older versions of lxc.
As discussed in full at https://github.com/datacenter/aci-ansible
we desired a better naming convention for ACI modules before they ship
with Ansible v2.4
The result is summarized in this PR.
The modules now also include the classes from the object model, as well
as a link to the documentation.
When verifying if a router needs update, the os_router module should
take into account only network ports which are owned by routers. Other
ports might have been added e.g. by the HA network tenant, which would
lead the router to always be detected as changed and cause the module to
try removing these network interfaces.
* add infinity ansible module into ansible package
* move infinity to be the correct direction without a folder
* remove dependency on requests library and use ansible built-in method to send rest api call
* add missing whitespace
* Use open_url from module_utils instead of urlopen based on suggestions
* correct the path for infinity ansible modue, moving it into the ansible/modules/network/infinity
* make change on the documentation and code based on feedback
* change the data type in the Return documentation based on feedback
* add importing for path and define metaclass based on testing failure
* change the postion of importing __future__
* Move Infinity module from Network module into net_tools directory based on review
* put back the file that is accidently removed
* change ansible-metadata version to be 1.1
* Fix for os_recordset.py to filter based on record type. Fixes https://github.com/ansible/ansible/issues/19572
* remove redundant variable
* Needing to use recordset ID to update and delete records. Using the record name for update/delete causes issues when A and AAAA records exist for a name
* Adding exception handling for dictionary item
* alternatives: add integration tests
* alternatives: handle absent link (fix AttributeError)
Error occurred at least on Debian Stretch and OpenSuse 42.2:
Traceback (most recent call last):
File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 161, in <module>
main()
File "/tmp/ansible_RY6X41/ansible_module_alternatives.py", line 113, in main
current_path = current_path_regex.search(display_output).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
update-alternatives stdout sample:
dummy - manual mode
link best version is /usr/bin/dummy1
link currently absent
link dummy is /usr/bin/dummy
* alternatives: PEP 8 fixes
* alternatives: fix copyright in integration tests
* alternatives: nested loops handle more than 2 items
Thanks to Michael Scherer (@mscherer) for pointing that.
* alternatives: enable integration tests
* refactors nxos_vrf_af module
fixes#27595
* fix up unit test cases
* add commands to result dict
* add route-target on afi create
* adds deprecation note to safi argument
* updates network parse_cli filter to handle blocks from output
* minor updates to finish up parse_cli filter
* all vars are now under the vars key
* attributes key has been changed to keys
* added the start_block and end_block directives
* update PEP8 failures