* Better handling of malformed vault data envelope
If an embedded vaulted variable ('!vault' in yaml)
had an invalid format, it would eventually cause
an error for seemingly unrelated reasons.
"Invalid" meaning not valid hexlify (extra chars,
non-hex chars, etc).
For ex, if a host_vars file had invalid vault format
variables, on py2, it would cause an error like:
'ansible.vars.hostvars.HostVars object' has no
attribute u'broken.example.com'
Depending on where the invalid vault is, it could
also cause "VARIABLE IS NOT DEFINED!". The behavior
can also change if ansible-playbook is py2 or py3.
Root cause is errors from binascii.unhexlify() not
being handled consistently.
Fix is to add a AnsibleVaultFormatError exception and
raise it on any unhexlify() errors and to handle it
properly elsewhere.
Add a _unhexlify() that try/excepts around a binascii.unhexlify()
and raises an AnsibleVaultFormatError on invalid vault data.
This is so the same exception type is always raised for this
case. Previous it was different between py2 and py3.
binascii.unhexlify() raises a binascii.Error if the hexlified
blobs in a vault data blob are invalid.
On py2, binascii.Error is a subclass of Exception.
On py3, binascii.Error is a subclass of TypeError
When decrypting content of vault encrypted variables,
if a binascii.Error is raised it propagates up to
playbook.base.Base.post_validate(). post_validate()
handles exceptions for TypeErrors but not for
base Exception subclasses (like py2 binascii.Error).
* Add a display.warning on vault format errors
* Unit tests for _unhexlify, parse_vaulttext*
* Add intg test cases for invalid vault formats
Fixes#28038
* vmware cfg backup module
* used ansible's urllib
* pep8 changes
* pep8 changes
* added ansible metadata
* user can define also the backup filename
* fixed required_if values
* Changes for vmware_cfg_backup as per recommendation
* small changes (pep, specific imports etc)
* added import from future
* Automatically loads and executes an inventory plugin specified by a standard YAML inventory config file containing a `plugin` key at its root.
* Moved inventory PluginLoader to a shared global instance.
* azure_rm_virtualmachine: added support for specifying custom image
* Use separate parameter for custom_image, add very basic test
* missed the version_added tag for doco
* removed whitespace I accidentally left in
* merged custom image into the image dict and added more tests
* added one more test
* fixes to events/callbacks
- made note of 'not called' methods for future fixes
- removed uncalled v2_runner_on_file_diff because dupe of v2_on_file_diff, which is called
- removed v2_runner_on_no_hosts due to existing pb level ones, which are called
- removed v2_on_setup, it is just a task, triggers normal task events
- v2_on_notify is now called when a handler is notified
- TODO: async, cleanup? and import events
these currently occur in code that has no access to sending events
* corrected display
* implements jsonrpc message passing for ansible-connection
* implements more generic mechanism for persistent connections
* starts persistent connection in task_executor if enabled and supported
* supports using network_cli as top level connection plugin
* enhances logging for persistent connection to stdout
* Update action plugins
* Fix Python3 RPC
* Fix Junos bytes<-->str issues
* supports using netconf as top level connection plugin
* Error message when running netconf on an unsupported platform
* Update tests
* Fix `authorize: yes` for `connection: local`
* Handle potentially JSON data in terminal
* Add clarifying detail if possible on ConnectionError
`synchronize` has supported the `private_key` option for a long time,
apparently. But for some reason it was never documented.
Today I managed to workaround the synchronize quoting bug by just using
```
private_key: /path/to/id_rsa
```
instead of
```
rsync_opts:
- "--rsh 'ssh -i /path/to/id_rsa'"
```
So, I'll just go ahead and document this useful option ...
* Protect AWS credentials from accidental commits
* Improve documentation for IAM policies
* Update ELB tests to be multi region
Allow AZs to reflect the region in which the tests are run.
This will not work for regions with fewer than three AZs,
but those are relatively rare
This fix adds details about snapshots in result of
vmware_guest_snapshot, when operation is successful.
Fixes: #32154
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Platform agnostic action plugin (net_base) calls
`get_provider_argspec()` to fetch the provider specific
details for each platform. This fix adds the function in
eos module_utils and retuns a dict of provider spec.
This fix adds additional error handling for vmware connect
method, where username provided user does not have required
permissions to use/login ESXi.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Moving modules from lenovo to cnos
* Merge conflicts
* Update cnos_conditional_template.py
Removed
180:5: E265 block comment should start with '# '
188:34: E226 missing whitespace around arithmetic operator
* Update cnos_template.py
155:5: E265 block comment should start with '# '
162:34: E226 missing whitespace around arithmetic operator
* Update cnos_vlan.py
210:1: E302 expected 2 blank lines, found 1
* Update cnos_backup.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_bgp.py
Added
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_backup.py
Added a line extra
* Update cnos_command.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_conditional_command.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_conditional_template.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_factory.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_facts.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_image.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_interface.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_portchannel.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_reload.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_rollback.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_save.py
Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_showrun.py
Add
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_template.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_vlag.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_vlan.py
Adding
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
* Update cnos_backup.py
Moving it to top of file
* Update cnos_backup.py
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Moving future and metaclass to top
* Putting condition to bye pass paramiko
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Condition to byepass paramiko import error
* Removing unused import and white spaces
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Dealing with white space and import issues
* Update cnos_template.py