* Add shorthand debugger method to recreate the task from the original ds, and re-template. Fixes#46321
* Fix rst header
* Indicate update_task was added in 2.8
* Major slow down due to using the wrong loader for plugin_types
* traceback due to adding httpapi and cliconf plugins to the plugins we
allow ansible-doc to process
- Added check to see if attribute even exists, if not, it exits.
- Then checks if attribute is already set to value we want to update
it to. If yes, then it exits and changed=False
- Otherwise updates the attribute and changed=True
* Add Scaleway API pagination to server inventory call
* Move Link parsing to helper module
* Correct some PEP8 errors
* Replace AnsibleError with ScalewayException in module_utils since the former doesn't work
* Simplify the regexes to match the intended purpose
* Cleanup helper to conform to review
* Cleanup Scaleway inventory to conform to review
* Flatten the conditional branches structure
* fix a regexp typo
* Add Support of healthcheck in docker_container module
Fixes#33622
Now container can be started with healthcheck enabled
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Extend docker_container healthcheck (#1)
* Allowing to disable healthcheck.
* Added test for healthcheck.
* Make sure correct types are used.
* Healthcheck needs to be explicitly disabled with test: ['NONE'].
* pep8 fixes
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Fix bug if healthcheck interval is 1 day or more
`timedelta` object has days too and seconds are up to one day.
Therefore use `total_seconds()` to convert time into seconds.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Add test for healthcheck when healthcheck is not specified
This is to avoid the situation when healthcheck is not specified and
treat this as healthcheck is changed or removed.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Convert string syntax for healthcheck test to CMD-SHELL
Also add another test case to check idempotency when healthcheck test
is specified as string
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Playbook fails if minimun docker version is not satisfy for healthcheck
This is to make more consistent with other non-supported options.
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
* Add matrix notification module
* try to make ansibot happy
* docs
* fix typo in encoding
* is ansibot happy now?
* change matrix python lib requirement description
* Example formatting & no_log
Thanks for this PR.
Few minor things that are easier for me to just fix, than explain and get you to fix.
* We suggest using `- name:` for examples, as Ansible best practice is to name your tasks
* To prevent secrets being leaked out use `no_log` in argspec
* use `requirements:` in `DOCUMENTATION`
* Clean up argument requirements
* Remove requirements duplicate
* not sure on syntax with these, were adapted from an example elsewhere
* WinRM/PSRP: Ensure shell returns UTF-8 output
This PR makes UTF-8 output work in PSRP shells.
* Add win_command and win_shell integration tests
* Fix tests
* more test fixes
kubeconfig should be loaded if *either* or both of context
or kubeconfig is set (this allows picking a context and default
kubeconfig or picking a kubeconfig with default context)
Fixes#47149
* Behave better if auto_remove and output_logs are combined. Warn if output cannot be retrieved because of auto_remove.
* Add tests.
* Added changelog.
Currently there is no way to reset the custom_compatibility_version to
NULL. If we provide a empty string('') to custom_compatibility_version,
it will fail with error "IndexError: list index out of range" at _get_minor
function.
To reset the custom_compatibility_version, we have to pass None value to
types.Version. The PR fixes the same.
This reverts commit 0e933f76ba.
The tests for this were broken on centos6 because jinja2 does not have
a map filter on that platform. Tests need to be rewritten
This patch fixes an error that occurs when attempting to see if the
netns already exists on the remote device. This change will now execute
`ip netns list` and check if the desired namespace is in the output.
Signed-off-by: Peter Sprygada <psprygada@ansible.com>
* Fix prompt mismatch issue for ios
Fixes#40884#44463
* If the command prompt is matched check if data is
still pending to be read from buffer.
* This fix adds a new timer `buffer_read_timeout`
which will be trigerred after command prompt
is matched and data is attempted to be read from channel.
If not data is present of channel the timer will expire
and response we be returned to calling function.
* Fix unit test failure
* Update to make buffer timeout float
* Update doc and fix review comment
* Fix CI issues
* Update doc
* Fix review comments
* Fix review comments
* Fix AWS EC2 inventory plugin caching of groups
* Added changelog fragment for aws_ec2 caching fix
* Store the AWS query results
The underlying inventory object contains inventory from other sources,
so caching it as ours would be wrong.
It seems easiest and safest to just cache the boto query results
instead.
* Remove unused functions
When a non-existent Gluster volume is to be deleted, i.e.:
gluster_volume:
state: absent
name: vol1-does-not-exist
the "gluster_volume" module would always fail with "volume not found
vol1-does-not-exist". The reason is that the code checked whether the
state is "delete", a value which isn't accepted for the "state"
parameter. Instead the expected value for volume deletion is, as above,
"absent".
Using blockinfile with a custom marker lacking {mark} results in non-idempotency - block is repeatedly inserted on subsequent playbook runs.
+label: docsite_pr
* New module vmware_host_powermgmt_policy
* minor changes
Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* New module vmware_host_ipv6
* Minor changes
Signed-off-by: Christian Kotte <christian.kotte@gmx.de>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
If a "domain" parameter is provided, use it in looking up the user ID.
Additionally, if both a domain and project parameter are provided, then
remove the domain ID from the list of filter criteria after having used
it to look up both the user and the project. OpenStack will not allow us
to apply both a project ID (which implies a domain) and a domain ID as a
search filter.
Fixes#42911
* Add datacenter_name alias
* Improve vcenter_folder module
* add check mode support
* fix VM folder deletion
* fix folder deletion under parent folder
* fix (host) folder creation if two datacenters are present
* Resolve invalid-unary-operand-type.
* Resolve raising-format-tuple.
* Resolve stop-iteration-return.
* Use disable comment instead of fixing logic.
The affected line in _find_address_range will only fail on Python 3.7
and later if the function is called with an empty address list. As an
internal method it is never called in this way, making it a non-issue
for use via public methods.
Using a comment to disable the rule in favor of an ignore.txt entry
since there are no plans to change the logic in the code itself. This
will also prevent any potential future issues being added in other
parts of the code when updating it based on upstream changes.
Fixes: https://github.com/ansible/ansible/issues/45900
This PR fixes the case when the cloud_init_persist was used, but we
still sent use_cloud_init=False, which is in oVirt API evaluated as not
to use cloud_init in first VM execution. This patch is changing it to
send just None, instead of False.
Signed-off-by: Ondra Machacek <omachace@redhat.com>
* Add runtime option to docker_container module
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add changelog fragment
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
* Add idempotency test for docker_container.runtime
Signed-off-by: Antoine Bardoux <abardoux@nvidia.com>
##### SUMMARY
The azure_rm_cdnprofile module was missing a valid sku 'standard_microsoft'. Added it to the list of valid choices.
##### ISSUE TYPE
- Bugfix Pull Request
##### COMPONENT NAME
azure_rm_cdnprofile
##### ANSIBLE VERSION
```
ansible 2.8.0.dev0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0]
```
##### ADDITIONAL INFORMATION
It was not possible to deploy using the 'standard_microsoft' sku previously. This addition allows this.
* win_domain: Add missing functionality
* Fix typo: Treshold -> Threshold
* Improvements based on feedback
* moved mode checks to after pre-reqs are installed
The kind: paramter is missing from the original example (which won't actually work). The organization needs to be listed as required (if you don't list it, you will get an error). Also adding additional example using the tower_username and tower_password method.
* reboot: Add timeout in error to help troubleshooting
So we've been hit by 'Timed out waiting for boot_time check' and it was
unclear what timeout was used for the boot_time check. By adding the
timeout value it is easier to understand the used value, and verify if a
change to the timeout is reflected in the output.
* Add changelog fragment
This PR fixes the update check method so it now check also the next_run
configuration of the virtual machine if it exists.
So if previously the VM was updated with new parameters, and then reset
back, the module didn't set the parameters to be set back in next_run.
This PR fixes it so the next run configuration is set back with proper
parameters.
Signed-off-by: Ondra Machacek <omachace@redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1639894
Signed-off-by: Ondra Machacek <omachace@redhat.com>
* kick off
* done for the day
* beta code and test
* fix a typo
* boto3_conn and boto_exception aren't used in this code, ec2_argument_spec is used but unneeded.
* Returning when find a match avoids doing extra work, especially when pagination is involved
* add new permissions for test
* (output is changed) is preferred over accessing the attribute directly.
* pass the result through camel_dict_to_snake_dict() before returning it.
* AnsibleAWSModule automatically merges the argument_spec.
* deletes the created resources even if a test fails.
* AnsibleAWSModule automatically merges the argument_spec.
* fix typo
* fix pep8
* paginate list_repositories
* specify permissions for test
* cut the unnecessary code.
* add return doc string
* add missed ':'
* fix syntax error: mapping values are not allowed here
* add description for return
* fix syntax error
* rename module name and turn off automated integration test.
* add key_data argument
The key_data argument helps when using a private key stored in Vault.
* Add "version_added" line
Add version_added line to pass automated tests.
* remove unnecessary nesting
* Adding iam_password_policy module
* fixing various issues -- error handling, bugs
* fixing various issues based on tests
* renaming dummy var
* fixing type reference in documentation
* adding int tests and other updates
* removing typo
* fixing auth for int tests
* removing int tests for now
* readding integration tests w/ unsupported designation
* removing conflicting group
* Update aliases
* Fix unused variable
* removed hardcoded loader/plugins list
* updated a few errors to keep orig object
* fix httpapi/cliconf listing
* ansible-doc fixes
* show undocumented as UNDOCUMENTEd
* added missing undoc
* 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.
* An earlier optimization of ansible-doc -l caused failures.
The optimization quickly searches the plugin code for short_description
fields and then uses that in the -l output. The searching was a bit too
naive and ended up pulling out malformed yaml. This caused those
plugins to be omitted from the list of plugins of that type with
a warning that their documentation strings were wrong.
This change makes the documentation parser aware that the documentation
string could have a relative indent for all of its fields which makes it
robust in the face of this particular problem.
* Don't search for space after short_description:
Any whitespace would be valid. In particular newline