A lot of modules have a short_description with a trailing dot even
though we don't want trailing dots in the index. This change removes
it when creating the document index.
* Fail on attrs that don't work for includes
* Prefix with VALID_ to make it more clear
* Sort keywords
* Remove unnecessary list
* Adjust dynamic/static checking
In DNF < 3.0 are lists, and modifying them works
In DNF >= 3.0 < 3.6 are lists, but modifying them doesn't work
In DNF >= 3.6 have been turned into tuples, to communicate that
modifying them doesn't work
Further explanation of this is available via Adam Williamson from
the Fedora QA Team.
https://www.happyassassin.net/2018/06/27/adams-debugging-adventures-the-immutable-mutable-object/
Signed-off-by: Adam Miller <admiller@redhat.com>
* win_nssm: add failing tests for issue #44079
* win_nssm: use Run-Command instead of Invoke-Expression to prevent interpretation issue
Fix#44079
* win_nssm: add more failing tests
These tests highlight several issues with this module:
* Service not started when state=started
* Errors with app_parameters (see #25265)
* Exception when passing several dependencies separated by comma as specified in doc
* win_nssm: fix service not started when state=started
Nssm status returns a multiline output that doesn't match any of the strict patterns in the switch statement.
* win_nssm: fix incorrect separator in doc for service dependencies
The dependencies parameter works with space as separator, but not with comma as shown in the documentation
* win_nssm: fix error with app_parameters parameter
Fix#25265
* win_nssm: add idempotence tests
* win_nssm: fix several idempotence issues and misbehaviors
Add missing space between arguments when app_parameters contains several keys.
Use Argv-ToString and Escape-Argument to improve arguments handling (parameters with quotes, backslashes or spaces).
* win_nssm: test parameters with spaces, quotes or backslashes
* win_nssm: restore comma as separator for service dependencies
Revert commit ddd4b4b
* win_nssm: restore support of string as dict form for app_parameters and remove support of literal YAML dict
* win_nssm: wrong variable in tests
* 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.
* Update win_robocopy.py
<!--- Show example of UNC path copy of a single file, noting trailing backslash required -->
+label: docsite_pr
* addresses jborean comment, removes double quotes
* Remove trailing slash part
* Added feature facts to nxos_facts
* Fixed ansibot indentation
* Resolved ansibot whitespace missing after ','
* Per PR suggestion, created method in base class to gather switch config
and store in global variable to prevent multiple calls to switch.
* Addressed ansibot blank line & whitespace after ,
* Enable support for launch_templates in ec2_asg
* Fix asg create with LT and no version number
* Update mutually exclusive list
* Better function names
Maintain one Templar for the lifetime of VariableManager, calling
set_available_variables() prior to each use, enabling _get_filter()'s
cache to function correctly.
It does not seem possible for concurrent calls into one (non-copied)
VariableManager instance, and so it need not be reentrant. If that
became a requirement, serializing its or Templar's entry points would be
fine, as it's so CPU-heavy other threads will only fight with it for the
GIL anyway.
Reduces _get_filters() runtime 91%, get_vars() runtime 19%, function
call count 16%, overall runtime 10%.
Tested aginst dummy load comprised of the 12 disabled steps of
debops.auth with an inventory of 80 hosts, which stresses variable
processing and task setup. Before:
7447296 function calls (7253994 primitive calls) in 32.611 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 32.762 32.762 ansible-playbook:3(<module>)
1 0.007 0.007 31.733 31.733 ansible-playbook:21(<module>)
...
1371/971 0.671 0.000 21.332 0.022 manager.py:154(get_vars)
...
3044 0.315 0.000 5.166 0.002 __init__.py:295(_get_filters)
After:
6252978 function calls (6059638 primitive calls) in 29.055 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 29.218 29.218 ansible-playbook:3(<module>)
1 0.007 0.007 28.159 28.159 ansible-playbook:21(<module>)
...
1371/971 0.675 0.000 17.211 0.018 manager.py:154(get_vars)
...
3044 0.028 0.000 0.441 0.000 __init__.py:295(_get_filters)
* 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
* Update synchronize.py
If you want a different rsync binary on the local side, you need to set task variable ansible_rsync_path.
See examples.
Variable ansible_rsync_path looks to not be documented anywhere. If documented, needs to be said that is does not belong to synchronise options, instead belongs to tasks. (Sorry, I have no better wording)
* [rabbitmq_binding] Fix the quoting of vhost and other names, which was broken in PR #35651
* Merge missing urllib_parse.quote from PR #42422
* Missed one line, where also needs to be escaped, i.e., the destination
* Various changes to nxos_logging. Plus added purge capibility.
* Made a few new nxapi_logging test cases conditional based on version
and/or platform.
* Addressed PR comments and ansibot shippable. Fixed up nxos_logging documentation format.
* Addressed ansibot shippable issues with whitespaces and documentation.
* Resolved ansibot codestyle trailing whitespace
* adds support for null values to the ternary filter
This change adds a third optional argument to the ternary filter to
handle a null value. If the third option is specified null and false
are treated differently.
For instance, take the following example:
{{ enabled | ternary('no shutdown', 'shutdown') }}
If enabled == True, then 'no shutdown' is used.
If enabled in (False, None), then 'shutdown' is used.
With this change the following is possible:
{{ enabled | ternary('no shutdown', 'shutdown', omit) }}
If enabled == True, then 'no shutdown'
If enabled == False, then 'shutdown'
If enabled == None, then omit
* update documentation with example of filter
* update filter documentation example per comments
* fix logic error in user_guide example
* Ensure that the value of PLUGIN_FILTERS_CFG is treated as type=path, and that we use the standard section of 'defaults' instead of 'default'
* deprecate the default section
* Don't add version_added for the corrected section
<!--- Your description here -->
The documentation states the use of the "value" attribute for environment variables while this should also be the "job" attribute.
+label: docsite_pr
* Sorting args.
* Doing comparisons of options with container parameters in a more context-sensitive way.
This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).
* Make blkio_weight work.
* Fix cap_drop idempotency problem.
* Making groups idempotent if it contains integers.
* Make cpuset_mems work.
* Make dns_opts work.
* Fixing log_opts: docker expects string values, returns error for integer.
* Adding tests from felixfontein/ansible-docker_container-test#2.
* Make uts work.
* Adding changelog entry.
* Forgot option security_opts.
* Fixing typo.
* Explain strict set(dict) comparison a bit more.
* Improving idempotency tests.
* Making dns_servers a list, since the ordering is relevant.
* Making dns_search_domains a list, since the ordering is relevant.
* Improving dns_search_domains/dns_servers.
* Fixing entrypoint test.
* Making sure options are only supported for correct docker-py versions.
* Update yaml-style in password-lookup example
##### SUMMARY
Update the yaml-style in a password-lookup example to match best-practices.
##### ISSUE TYPE
- Docs Pull Request
##### COMPONENT NAME
password_lookup plugin
##### ANSIBLE VERSION
devel
* remove whitespace
* fixes#45941
* corrects regression introduced by #26104; when the resource group doesn't exist, the module exits prematurely with an error instead of creating it.
* Unify login behavior between 1Password lookup plugins and module
- Use the same names for all credential aspects
- Only require the minimal amount of information for each
- Add more examples
* Change parameter terms
- use terms in line with 1Password documentation.
- update examples
- update tests
* Improve error messages in lookup plugin
* Unify onepassword_facts with lookup plugins
- use same methods and logic for signing in or reusing existing session
- unify terms with lookup plugins
* Change rc test for determing login
An rc other than 1 can be returned when a current login session does not exist.
* Create AnsibleModuleError class
ansible.errors is not available to modules, so create an AnsibleModuleError class within the module
Do not user os.path.expanduser since this is already done by virtue of the type being "path" in the argument spec.
* Add note about risk with fact caching sensitive data
* Add note on op version that was used for testing
This is because underscores are illegals in hostnames and users might
want to create the same host names are the name of the Linode machine
(as in the report in #30059).
Closes https://github.com/ansible/ansible/issues/30059.
* Update azure_rm_virtualmachine.py
A lot of Azure images are not cloud-init ready and need to be prepared manually before attempting to use the custom_data option of this module. Adding a line to the description to make others aware. If, like me, they are used to working with AWS AMIs that all seem to have cloud-init baked in, this could prevent some troubleshooting as to why their custom_data scripts aren't running in Azure.
* fixing addition to azure_rm_virtualmachine.py
* Update azure_rm_virtualmachine.py
* final update
* fixed url syntax
* nuked trailing whitespace
* Ensure that the src file contents is converted to unicode in diff info. Fixes#45717
* Fix up and cleanup
* The diff functionality in the callback plugins should have the
to_text() calls removed since we're now doing it in ActionBase
* catching of UnicodeError and warnings in the callback diff
functionality from 61d01f549f haven't been
needed since we switched to to_text so remove them.
* Add a note to ActionBase's diff function giving an example of when the
diff function will be inaccurate and how to fix it
* Fix callback get_diff() tests
I believe the unittests of callback's get_diff() were wrong. They were
sending in a list where strings were expected. Because previous code
was transforming the lists into strings via their repr, the previous
tests did not fail but they would have formatted the test cases output
in an odd way if we had looked at it.
* Try to intuit proper plugins to send to ansible-connection
* Move sub-plugins to init so that vars will be populated in executor
* Fix connection unit tests
* win async: use async_dir for the async results file directory
* tried to unify POSIX and PowerShell async implementations of async_dir
* fix sanity issue
* handle yum and dnf lockfiles - fixes#44120
Signed-off-by: Adam Miller <admiller@redhat.com>
* fix logic problem to properly check for dnf lockfile glob
Signed-off-by: Adam Miller <admiller@redhat.com>
* Added documentation for collectstatic --clear.
Added a description of the --clear argument used with the Django management
command, collectstatic. (When #1810 added this feature the documentation
was not updated).
no such option "config" for diff_against argument.
Further below, there is an example of eos_config using diff_against with a valid option.
+label: docsite_pr
Also fixes an error related to the required parameters. The l3out parameter is required but only 'name' was being accepted, and that should only be the alias.
* efs.py: Add support for EFS provisioned throughput
* efs_facts.py: Add support for EFS provisioned throughput
* efs_facts integration tests updated with provision throughput
* efs_facts: Tests refactoring - add failure and success playbook according to botocore version.
* efs_facts: More tests and new option descriptions adjustment
* efs_facts tests renamed to efs
* Improve iam_group exception handling
Use AnsibleAWSModule for iam_group and handle BotoCoreErrors
as well as ClientErrors. Use fail_json_aws to improve error messages
* Add minimal iam_group test suite
Update some of the read-only IAM permissions (this is not sufficient
to run the test suite but it gets further than it did until it tries
to add a (non-existent) user)
* Clean up after tests