* [Docs] Fix old YAML style in async docs
This patch fixes some old-style YAML in the documentation for
asynchronous playbooks.
* Removed hard-to-localize colloquialisms
Bug fix: Permissions were not parsed correctly if the database name contains a colon (:) character. For example, a privilege string of "*.*:USAGE/`lnx-www-prod:wordpress`.*:ALL" would fail with "invalid privileges string: Invalid privileges specified: frozenset(['WORDPRESS`.*'])". This 1-line fix works around the problem.
* Do not run script in check mode
Fixes#30676
* Reformat script integration test
* Add integration tests for check mode of script module
* Fix name on test
* Cleanup temp file
* win_script integration test syntaxt changes
* Add check mode tests for win_script
* Use proper variable in test
* Fail if source file does not exist
* Verify script is accessible and don't copy in check mode
Use shlex to properly split shell arguments, though a path with spaces in it still needs to be quoted in the playbook.
Add note to docs describing such.
Improve error message if file is not found indicating there may be a space in the path.
* Properly encode path now that path is split using shlex
* Allow for spaces in both path and script name
* Add unicode character test to Linux script tests
* Add Linux test for space in path to script
* fixes asa action plugin for connection=local
This change fixes asa modules when using connection=local to load the
provider values.
* fix up pep8 issues
* Remove uses of assert in production code
* Fix assertion
* Add code smell test for assertions, currently limited to lib/ansible
* Fix assertion
* Add docs for no-assert
* Remove new assert from enos
* Fix assert in module_utils.connection
* Clean up after two recent synchronize tests
- add clean up after the last two tests in synchronize to make them
match with the expectations in the previous tests
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
* Add link-dest functionality to synchronize module
- add the link-dest option to the synchronize module code
- add tests for the link-dest option
- add documentation of the link_dest option to synchronize
- modify changed flag so it can properly work around rsync
upstream not flagging hardlinks as a change properly in
formatted output
Signed-off-by: Robert Marshall <rmarshall@redhat.com>
* Minor change to test
* Add mtu option nxos_interface feature idea
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* Add unit test for mtu feature
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* nxos_inteface TypeError fix
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* Make sure that run_commands does not list of strings for json output
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* return default value to handle exception
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
* When splitting, use rsplit and 1 just in case the string has more pipe
characters than anticipated
* When converting to text, make decoding errors an error instead of
silently corrupting data
* When converting to text for message strings, use the default error
handler as that is already surrogate_then_replace
* update sros local action plugin to support network_cli
This updates the sros local action plugin to only start the connection
if connection=local is specified. This is to support network_cli
connection plugin
* fix up pep8 issues
* Fixup keyword dumping
* Clarify introductory text
* Turn links in the keyword description into seealso entries in the rst.
* Have plugin_formatter cleanup trailing whitespace
The indent filter in jinja2 < 2.10 indents blank lines by default which
leads to trailing whitespace. Cleanup after that filter.
* Edits
* Copy edit
* 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