Commit graph

29501 commits

Author SHA1 Message Date
The Magician
0515633189 Bug fixes for GCP modules (#64083) 2019-11-04 14:52:57 -05:00
The Magician
def62163c2 New Module: gcp_compute_reservation_info (#64134) 2019-11-04 14:52:36 -05:00
The Magician
1a726d436e New Module: gcp_compute_target_instance (#64135) 2019-11-04 14:52:28 -05:00
The Magician
14cf1c1197 New Module: gcp_logging_metric (#64339) 2019-11-04 14:51:52 -05:00
The Magician
9517d4c755 New Module: gcp_logging_metric_info (#64340) 2019-11-04 14:51:44 -05:00
The Magician
4569949bcd Bug fixes for GCP modules (#64407) 2019-11-04 14:50:42 -05:00
Mark Chappell
819ba2259d Sanity test fixups for AWS ec2 modules (#64230)
* ec2_ boilerplate

* Deprecate unused options.

* ec2_vol: Perform explicit type checking on volume_size and iops when parsing the args

Boto would through a type exception if the string couldn't be converted to an int.

* ec2_lc_find: remove duplicate definition of region

It's defined in ec2_argument_spec and ec2 doc fragment

* ec2_lc_info: Move responsibility for type checking/conversion of sort_start and sort_end into arg parser

* General sanity test related doc fixups

* Remove EC2 related sanity/ignore.txt entries

* Add changelog fragment
2019-11-04 18:39:31 +00:00
Mark Chappell
8528fbc790 Amazon related Sanity test fixups (remaining batch 2) (#64358)
* Remove sanity/ignore.txt entries

* replace use of "_" as a variable name

* Cleanup boilerplate

* Remove default values from mandatory parameters

* Sanity test documentation updates

* Remove unused imports from iam_role
2019-11-04 16:56:14 +00:00
Sloane Hertel
c1f1b2029c
Support vars plugins in collections (#61078)
* Move var plugins handling to a separate file

* Allow var plugins to require whitelisting

* Add global configuration ('demand', 'start') for users to control when they execute

* Add 'stage' configuration ('all', 'task', 'inventory') for users to control on a per-plugin basis when they execute

* Update ansible-inventory and InventoryManager to the global and stage configuration

* Update host_group_vars to use stage configuration and whitelisting

* Add documentation for using new options and to the developer's guide

* Add integration tests to exercise whitelisting and the new configuration options, using vars plugins in collections, and maintain backward compatibility

* Changelog

Co-Authored-By: Brian Coca <brian.coca+git@gmail.com>
Co-Authored-By: Sandra McCann <samccann@redhat.com>
2019-11-04 11:41:14 -05:00
Mads Jensen
39bf09517a wait_for - remove an obsolete fallback for Python 2.6 (#63988) 2019-11-04 11:39:19 -05:00
Mark Chappell
8c8077b5be Amazon related Sanity test fixups (remaining batch 1) (#64368)
* Remove Sanity test ignore.txt entries

* Fixup boilerplate

* Remove use of blacklisted _ variable name

* cloudformation: Add an explicit removal version for template_format

This option's been ignored since ansible 2.3

* General docs cleanup to clear sanity errors

* elasticache_parameter_group: Add list of choices

- matches documented choices
- other values wouldn't have worked

* data_pipeline: Deprecate 'version' - always ignored

* Add deprecation documentation
2019-11-04 15:13:27 +00:00
Mads Jensen
3126c38f8a Replace import of pycompat24.literal_eval with ast.literal_eval. (#64088) 2019-11-04 09:55:08 -05:00
Sam Doran
c67c23234a
clean_facts - use correct variable when evaluating the string (#64284)
A regexp object has no .startswith() method, which caused an unnecessary
try/except block to be added to handle this.
2019-11-04 09:44:10 -05:00
Martin Nečas
816e194e37 ovirt_vm: update cpu_threads docs (#64380) 2019-11-04 07:19:07 -05:00
Xu Yuandong
9e3b1f3b32 Doc notes 2 (#64347)
* addd

* all  update

* add/fix notes about modules work with connection

* duplication of key "notes"

* Update ce_evpn_bgp_rr.py

* Update ce_evpn_bgp.py
2019-11-03 21:56:57 -05:00
Xu Yuandong
1d40d429a0 Doc notes 5 (#64350)
* addd

* all  update

* add/update notes.

* add/updates notes.
2019-11-03 21:46:18 -05:00
Xu Yuandong
25e03b1e75 Doc notes 6 (#64351)
* addd

* all  update

* update/add notes.
2019-11-03 21:46:07 -05:00
Xu Yuandong
ad0769c095 Doc notes 3 (#64348)
* addd

* all  update

* update/add notes.
2019-11-03 21:35:12 -05:00
Xu Yuandong
703f7a149a Doc notes 4 (#64349)
* addd

* all  update

* add/update notes.
2019-11-03 21:35:03 -05:00
Xu Yuandong
705c014ec3 Doc notes 1 (#64346)
* addd

* all  update

* add notes to set modules works with C(connection)
2019-11-03 21:25:24 -05:00
Ganesh Nalawade
c27e47327f
Refactor CLI prompt mode check for network plugins (#63945)
* Refactor CLI prompt mode check for network plugins

*  Move the CLI prompt mode check logic from action plugin
   to the controller side with the cliconf plugins.

*  This refactor also allows the network modules
   to initialise the persistent connection with remote device
   only when it is required.

* Fix review comments
2019-11-03 04:10:30 +05:30
Andrey Klychkov
73526b9d65 mysql_variables: add mode parameter (#63547)
* mysql_variables: add mode parameter

* mysql_variables: add mode parameter, add changelog fragment

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix

* mysql_variables: add mode parameter, fix sanity

* mysql_variables: add mode parameter, remove warns

* mysql_variables: add mode parameter, refactoring

* mysql_variables: add mode parameter, fix logic
2019-11-02 10:16:28 +01:00
Chris Smart
42b290b781 cloud/openstack: fix os_server_action errors when wait is False (#64330)
Using os_server_action to perform start, stop and pause actions on a
server in OpenStack results in an error when 'wait' is False.

The command is successfully sent to OpenStack, however Ansible fails the
task:

  fatal: [127.0.0.1]: FAILED! => {
    "changed": false,
    "msg": "New-style module did not handle its own exit"
  }

This patch ensures that those actions always exit, whether running with
'wait' set to True or False.

As we are not waiting to confirm the result, this assumes that the
actions were successful.

Fixes #62958

Signed-off-by: Chris Smart <chris.smart@humanservices.gov.au>
2019-11-02 04:42:34 -04:00
willtome
bbbaf0dfe7 VMware Inventory Enhancements (#63938)
* Fixes #63937

* Add the environment variables VMWARE_HOST, VMWARE_USER, and VMWARE_VALIDATE_CERTS for consistency

* Follow the general pattern for config file naming requirements and update the documentation
2019-11-01 16:16:56 -04:00
Sloane Hertel
371d7aae31
Use templating in HostVarsVars __repr__ (#64282)
* Fix HostVarsVars templating

* Add some tests for HostVars and HostVarsVars templating

* changelog
2019-11-01 15:51:34 -04:00
The Magician
5dff5603af New Module: gcp_compute_reservation (#64133) 2019-11-01 13:46:42 -04:00
The Magician
6e63210620 New Module: gcp_compute_target_instance_info (#64136) 2019-11-01 13:46:34 -04:00
Pierre Prinetti
2444fae208 Add a named parameter to the filter to_uuid (#64057)
Let the caller choose a namespace for `to_uuid` and document the
behaviour of both the default case, and the new explicit case.

This PR does not change the existing behaviour of the `to_uuid` UUIDv5
filter.
2019-11-01 13:11:34 -04:00
Geoffrey Blake
7b7f15cb3a Fix ec2_instance module where if placement_group and tenancy are (#63340)
both set in params, the placement_group setting is ignored.
2019-11-01 10:10:07 -07:00
Patrick O'Brien
c76e074e4c Callback: removing args from task_fields from Sumologic and Splunk plugin(#63527)
CVE-2019-14864 Ansible: Splunk and Sumologic callback plugins leak sensitive data in logs

Fixes #63522

Signed-off-by: Patrick O’Brien <patrick.obrien@thetradedesk.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-11-01 19:51:11 +05:30
Ganesh Nalawade
60276d3d8d
Fix network plugin config option load from collection (#64046)
* Fix network plugin config option load from collection

Fixes #63975

* Update the complete sub-plugin name within network
  connection plugins to handle sub-plugin in collection
  scenario.

* Fix review comments
2019-11-01 11:25:28 +05:30
Bill Dodd
4349ab5777 Add option to specify ID of System/Manager/Chassis to modify (#62921)
* add option to specify ID of System/Manager/Chassis to modify

* added version to deprecate() call

* fix merge TODOs to use new self.systems_uri variable
2019-10-31 22:09:48 +00:00
Mads Jensen
c3838b5d73 Replaces deprecated usage of functions in ansible.module_utils.basic (#63990) 2019-10-31 16:22:44 -04:00
Sergey
1ad3879430 Add podman_volume_info module (#63380)
Add module podman_volume_info that collects data about podman
volumes on the host. Acts as docker_volume_info module.

Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
2019-10-31 16:17:33 -04:00
Sam Doran
d5fbe6573b
paramiko_ssh - Improve authentication error message (#64157)
The error is not always an invalid username/password. It could be a connection timeout or refusal.
2019-10-31 15:39:53 -04:00
Alejandro Lazaro
63ce7d57b1 Remove extra dot at the end of the sentence (#64149)
Dot is already set in display.deprecated.
2019-10-31 11:07:23 -04:00
Bill Dodd
b4cd9086dc allow setting multiple BIOS attributes at a time (#62764)
* allow setting multiple BIOS attributes at a time

* fix documentation string errors
2019-10-31 14:47:05 +00:00
Chris Van Heuveln
ec1c5585af nxos_vrf: N6K regression test failures (#63277)
* nxos_vrf: N6K regression test needs 'nv overlay evpn'

* Add delay for vrf creation

* Revert "Add delay for vrf creation"

This reverts commit 8afa5281ff4b3c5a1775fbd40c5acb7ab5ecdf68.

* Add vrf_error_check w/delay to module

* whitespace

* httpapi fixes

* /input/input_data/ - 'input' is a built-in

* shippable retry
2019-10-31 18:17:39 +05:30
Sumit Jaiswal
be1bcc7450
fix bug 63761 (#63901) 2019-10-31 18:09:03 +05:30
Pavan Bidkar
548fa65ac6 VMware: Allow dash in Windows server dnsname (#64052)
Fixes: #62810
2019-10-31 14:02:52 +05:30
panyy3
8316fa66e8 add GetManagerServices and SetManagerServices (#62815)
* add GetManagerServices in redfish_info module, and add SetManagerServices in redfish_config module

* fix incorrect-version-added, fix incorrect Comparison to None, fix continuation line under-indented for visual indent, fix line too long, fix blank line at end of file

* update parameter format to allow multi-services update and additional parameter update

* fix bad-whitespace and trailing-whitespace detected by ansible-test

* change command name from GetManagerServices/SetManagerServices to GetNetworkProtocols/SetNetworkProtocols, and update parameter name to network_protocols with dict type, and enhance set_network_protocols() to follow suggestions

* donot need to import ast any more

* fix problems caused by code merge
2019-10-31 07:57:20 +00:00
Mark Chappell
4e8bb334a9 Sanity test fixups: AWS VPC related modules (#64089)
* Add missing boilerplate

* Avoid blocklisted variable name '_'

* doc fixups

* Remove defaults for required parameters

* Remove explicit definition of 'region' from argument spec
it's automatically added by ec2_argument_spec and redefining removes the aliases

* remove sanity ignore entries for AWS VPC related modules

* Suggested Review changes
2019-10-30 14:28:14 -07:00
Felix Fontein
fed267df03
openssl_csr and openssl_certificate: fix support for Ed25519 and Ed448 private keys (#63984)
* Move X25519, X448, Ed25519 and Ed448 feature tests to module_utils.

* Correctly sign with Ed25519 and Ed448 keys.

* Fix public key comparison. Ed25519 and Ed448 do not have public_numbers().

* Add tests.

* Add changelog.

* Give better errors for cryptography 2.6.x and 2.7.x.

* Test for new errors.

* Forgot one.

* Used wrong private key.

* Use private key password for CA key. Add more stuff to its certificate.
2019-10-30 21:36:36 +01:00
Sergey
554285acb7 Fix image detection in os_image openstack module (#63959)
Currently first check was by checksum only, and if there are 2
images with the same checksum, but different names, this check
fails with error:
* Multiple matches found for None *

To prevent this let's add more exact check in the beginning:
1. Firstly try to find by unique ID if it's given, most safe way.
2. Try to find by combination of name and checksum, not only
checksum, it will drop duplicates with different name.
3. Try to find just by name, as most general approach.

By going from most narrow to more general checks we can drop
duplicates in more efficient manner.
2019-10-30 13:19:08 -07:00
Nathaniel Case
0cd2ad5880
Try to escalate before on_open_shell to work around ios (#63571) 2019-10-30 16:10:36 -04:00
Mark Chappell
0a38460176 Fixup sanity test issues related to aws_ modules (#64064)
* Add AWS_ boilier plate

* AWS_ modules: clean up missing parameter types

* Remove documentation duplicated by ec2 document fragment

* Add missing documentation for options and sub-options

* Add missing return type documentation

* Remove AWS_ sanity-check ignores

* aws_waf_info: fixup conflicting 'defaults' information about the use of waf_regional

* Wrap URLs in U()

* Add elements entries, because felixfontein asked nicely

* Apply suggestions from code review

Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com>

* Second round of review comments.
2019-10-30 13:08:02 -07:00
parmsib
a5d69f2a26 Make docker_stack adhere to standard ansible return values (#63467)
* Make docker_stack adhere to standard return values

The names of the various fields returned from ansible modules are e.g defined here https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#msg.

Adhering to this improves usability and makes use of functionality for e.g stdout_lines etc.

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Fix under-indentation of continuation line (pep8)

Issue exposed in test here https://app.shippable.com/github/ansible/ansible/runs/146667/1/console

* Don't break old playbooks/roles

Made sure the changes are only adding new variables, not removing anything existing yet.

* Added comment

* Minor fixes

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* minor change to docker_stack.py

* Add changelog fragment for PR 63467

* Format changelog fragment

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Add fragment about docker_stack return val depr

* Add docker_stack doc note about deprecated vals

* Remove whitespace in empty line

* Add docker_stack depr notice to porting guide

* Update changelogs/fragments/63467-docker-stack-return-fix.yml

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update docs/docsite/rst/porting_guides/porting_guide_2.10.rst

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Update lib/ansible/modules/cloud/docker/docker_stack.py

Co-Authored-By: Felix Fontein <felix@fontein.de>

* Added back a missing new line
2019-10-30 19:42:19 +01:00
Alexander Korsunsky
b7e38dfa52 copy - check for changes beyond first level of subdirectories (#58323)
Add integration test for copy: deep recursive with remote_src=True
2019-10-30 12:17:11 -04:00
Sandra McCann
26236f474b fix spelling issues (#64103) 2019-10-30 09:26:36 -05:00
Mike Wiebe
e82d407fa8 Add filter option to netconf_config module (#63593)
* Add filter option for netconf_config module

* Address review comments and add tests

* Refactor integration tests

* Address review comments

* Review comments

* Fix nxos_netconf include check
2019-10-30 19:09:13 +05:30