Commit graph

1924 commits

Author SHA1 Message Date
Xyon
5c721e8a47 Add new configuration parameter to make Windows async startup timeout configurable (#66670)
* Add new configuration parameter to make this timeout configurable

* Rename keys to be more correct and reformat exception message for whitespace handling

* Rename config away from default prefix. Add vars element and associated changes to support.

* Update 65001-allow_configuring_async_startup_timeout.yml

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-01-24 06:04:52 +10:00
Sato Kenta
a4b59d0213 pamd: Fix AttributeError when removing the first or last rule (#66398) 2020-01-23 14:08:42 -05:00
Andrew Klychkov
72fbed2c61 postgresql_user: add comment parameter (#66711)
* postgresql_user: add comment parameter

* add changelog

* fix CI
2020-01-23 14:34:50 +00:00
Markus Fischbacher
e646bd08e1 zabbix_template - fixing errors linked templates and dump/imports (#66463)
* Fixing errors on empty linked templates

fixes #66417

Line 409 fixes KeyError if existing template has no linked templates - as Zabbix API isn't returning an empty array either.
Line 417 is needed to mark as changed if new/modified template has no linked but existing one has.
Line 442 is needed to actually update even if link_templates was None.

* decode parsed xml root

fixes #66466

Line 533: without .decode() the ET.tostring on python3 returns byte-like object

* Create 66463-zabbix_template-fix-error-linktemplate-and-importdump.yml

* Update changelogs/fragments/66463-zabbix_template-fix-error-linktemplate-and-importdump.yml

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>

* Update changelogs/fragments/66463-zabbix_template-fix-error-linktemplate-and-importdump.yml

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>

Co-authored-by: Dusan Matejka <D3DeFi@users.noreply.github.com>
2020-01-23 08:22:19 -05:00
Andrew Klychkov
fabb2eb555 mysql_db: add skip_lock_tables option (#66688)
* mysql_db: add skip_lock_tables option

* add changelog fragment
2020-01-22 20:19:49 +01:00
Sam Doran
a412e4d9fd Add validate_collection_path function (#66441)
* Add validate_collection_path function

Utility function for ensuring a collection target ends with 'ansible_collection'

* Fix bad syntax

* Correct docstring
2020-01-22 10:46:41 -05:00
Martin Krizek
ec371eb227 Set HostVars._variable_manager's attrs (#65508)
When HostVars are part of the data that goes through (de)serialization
when being passed from a worker process to the main process, its
variable manager reference loses some of its attributes due to the
implementation of __getstate__ and __setstate__ (perf utilization).
Since HostVars already has those attributes, use __setstate__ to assign
them.

Fixes #65365
2020-01-22 05:57:09 -05:00
Matt Clay
ebf21bb48d Fix ansible-test inventory delegation. 2020-01-21 22:37:14 -08:00
Matt Clay
934d6b235b Add --venv-system-site-packages to ansible-test. 2020-01-21 17:32:29 -08:00
Felix Fontein
c58d8ed1f5 Improve deprecate sanity check; remove deprecated features which should have been removed for 2.9 (#65745)
* Update deprecation check.

* Remove support for check_invalid_arguments.
2020-01-21 16:58:26 -05:00
Sam Doran
2b7393141f
reboot - add boot_time_command parameter (#62680)
Allow the built in commands for checking boot time to be overridden. This is mainly for containers and other odd systems where it would add too much complexity to the plugin code to try and discern the correct command to use.
2020-01-21 13:42:32 -05:00
Sam Doran
617fbad743
synchronize - fix password authentication (#66542)
On Python 2, leave all fds open since there is no mechanism to close specific fds with subprocess.Popen() on Python 2

Add unit tests.

Co-authored-by: Matt Martz <matt@sivel.net>
2020-01-21 10:43:56 -05:00
Abhijeet Kasurde
14ae3ba8c0
Fixed argument spec for multiple modules - Part II (#65497)
This change contains fixes for argument spec and respective datatypes.
Created separate PR since these changes might alter the behavior of these modules.
Will need shipit from individual module owner(s).

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-21 11:37:38 +05:30
Adam Miller
22fe22f796 yum - fix bug where enablerepo is not honored when disablerepo all (#66557)
Fixes #66549

The inefficiency improvement
https://github.com/ansible/ansible/pull/63713 introduced a bug where
`enablerepo` was not being honored if combined with
`disablerepo="*"`. This fixes that issue.

Signed-off-by: Adam Miller <admiller@redhat.com>
2020-01-20 14:26:36 -05:00
sky-joker
1befb52321 VMware: add properties option to vmware_datastore_info module (#62940)
* add_properties_option_to_vmware_datastore_info
* fix document indent error
* add changelog file for vmware_datastore_info
2020-01-20 13:47:13 +05:30
Adam Miller
077a8b4898 podman - fix rootless container copy no pause (#66583)
Fixes #66263

Signed-off-by: Adam Miller <admiller@redhat.com>
2020-01-17 16:41:10 -05:00
Mohammadreza Abdoli
7ae5331218 update ismount() to match upstream from cPython (#64586) 2020-01-17 16:32:14 -05:00
Mario Lenz
864a3fd59d VMware: Add advanced settings to vmware_cluster_drs (#66233)
* VMware: Add advanced settings to vmware_cluster_drs

* Add DRS advcanced settings example
2020-01-17 16:23:19 -05:00
Sam Doran
9b7198d25e
file - change _diff_peek type in argument_spec (#60428)
* Add integration tests
* Handle error in _get_diff_data()
* Change to warning rather than error
* Also change failure to warning in assemble action plugin
2020-01-17 16:02:28 -05:00
Sam Doran
9a51dff0b1
Rename private function (#66577)
Make find_existing_collections() a public function since it is being used across mulitple files now to support listing and verifying collections
2020-01-17 15:27:15 -05:00
Florian Apolloner
a7e4479d01 Fix DNF idempotency. (#66209) 2020-01-17 11:22:06 -05:00
Abhijeet Kasurde
84b68aa05f gitlab_project_variable: Remove sensitive information (#66556)
Redact GitLab Project variables which might include sensetive information
such as password, api_keys and other project related details.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-17 01:42:15 -05:00
Sam Doran
1f340721a7 ansible-galaxy - add "--token" command line argument (#66376) 2020-01-16 12:51:21 -08:00
Andreas Calminder
3b764c6dcb Add diff and check_mode support to os_server (#62206)
* don't mix " and '

* rename functions that perform changes

* add diff, reorganize _present/_absent functions

* update tests to match function reorg

* add result to _exit_hostvars and removal of possibly sensitive information

* shallow copy dict for proper diff, add check_mode

* set check_mode to False for unit tests

* move _parse_meta back to it's original place

* use get_openstack_vars for diff when not in check_mode

* add changelog fragment
2020-01-16 10:39:54 +01:00
Jordan Borean
e459eac565
Use UTF-8 without a BOM for win coverage (#66510) 2020-01-16 09:52:05 +10:00
Patrick Easters
d5c5cb5a17 podman_image: Use provided credentials when pulling image (#66372)
* Use credentials when pulling from a remote registry
2020-01-15 12:47:12 -05:00
Sloane Hertel
1cb634a3ab Add a metadata property for CollectionRequirement (#66370)
* Add a metadata property for CollectionRequirement so the _metadata attribute doesn't need to be accessed directly

* changelog
2020-01-15 12:40:26 -05:00
Abhijeet Kasurde
afb71c14bd
VMware: Use existing DVPG network in vmware_guest_network (#65994)
* Handle all cases of networks

Fixes: #65968

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-15 21:56:19 +05:30
Abhijeet Kasurde
257ac9d175
Fortios: Correct underscore_to_hyphen API (#66119)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-15 10:35:57 +05:30
Ric de France
62991a8bdd terraform: Remove line that is suppressing output being shown (#66322)
* remove the line that is suppressing the output being shown when running
terraform from ansible
* Address #56934 and #57044
* added changelog for bug fix for missing terraform output

Co-authored-by: Adam <adam.lemanski@gmail.com>
2020-01-15 09:42:58 +05:30
Sloane Hertel
1b3ca349eb
RoleRequirement - Include stderr in the error message (#66006)
* RoleRequirement - Include stderr in the error message if there's a non-0 return code

* Don't try to concatenate str and bytes

Co-Authored-By: Sam Doran <sdoran@redhat.com>
2020-01-14 09:46:23 -05:00
Jordan Borean
6f04f87a13
Deprecate Windows 2008, and 2008 R2 (#66257)
* Deprecate Windows 2008, and 2008 R2

* Remove shippable nodes

* Update windows_faq.rst

Be less specific about 2008/R2 timeframes

* Update setup.ps1

tweak warning text

Co-authored-by: Matt Davis <nitzmahone@users.noreply.github.com>
2020-01-14 11:22:39 +10:00
Piotr Stawarski
9a1329153e ec2_vol module filtering bug (#65960)
* Update ec2_vol.py

When `name` is specified, it ignores `zone` filter. That is you could not have same tag:Name in different zones.

* Add changelog fragment
2020-01-14 11:09:06 +10:00
Matt Clay
3db1ac4f56 Ignore warnings in ansible-test environment check. 2020-01-13 16:16:55 -08:00
Matt Clay
51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
2020-01-13 13:09:33 -08:00
Nathaniel Case
3a2257c45c
net_facts modules: Don't warn about defaults changing if they're not being used (#66270) 2020-01-13 11:36:01 -05:00
Ganesh Nalawade
654b9e2754
Add collection support with local for supported network platforms (#66302)
* Add collection support with local for supported network platforms

*  The legacy behavior of network action plugins using persistent
   the framework is to override the connection=local with the actual connection type (network_cli/netconf/httpapi) based
   on the value of transport option in provider.
*  After the actual connection plugin is identified try to load it from
   `ansible.netcommon` collection, if it fails load it from ansible
   core. This is done to work with Ansible 2.10 and also maintain backward compatibility for
   Ansible 2.9 version to ensure it works with network collections.
*  To support this need to pass collection_list value to connection
   plugins. As in case of connection=local it loads `persistent`
   connection within action plugin which in turn invokes `network_cli`
   or `netconf` connection. Similarly `network_cli` connection plugin invokes
   `terminal` and `cliconf plugins and `netconf` connection plugin invokes `netconf`
   `plugins` based on value on `ansible_network_os`.
*  Add deprecation warning for connection=local support and
   provider support for applicable platforms

* Fix CI failures
2020-01-13 09:49:55 +05:30
Felix Fontein
c380b18dcf
openssl_* modules: allow direct input for some files (#66384)
* Allow to not read content from file.

* Allow to feed content directly into _info modules.

* Allow to feed non-primary content into openssl_certificate, openssl_csr and openssl_publickey.

* Rename changelog.
2020-01-12 19:12:33 +01:00
Andrew Klychkov
515c4a7e2c Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3 (#66331)
* Bugfix of 65367: postgresql_query doesn't support non-ASCII characters in SQL files with Python3

* add changelog

* fix

* change changelog fragment, add example
2020-01-11 15:19:55 +01:00
Nathaniel Case
0a3a81bd12
Persistent connections: These timeouts seem unused (#66267)
* These timeouts seem unused

* Add changelog
2020-01-10 23:09:21 -05:00
Bill Dodd
5f966ef664 Update deprecation version and porting guide for resource_id option (#66060)
* update deprecation version and porting guide for resource_id option

* add changelog fragment
2020-01-10 16:37:53 -06:00
Ganesh Nalawade
0d85ab1fe3 Add collection support for network platform agnostic modules (#66342)
*  Refactor net_base action plugin to invoke platform
   action plugin with implementation module name updated
   in the new task copy.
2020-01-10 12:42:53 -05:00
Jordan Borean
c92b538cc5
WebRequest - remove generically named aliases from util (#66325)
* WebRequest - remove generically named aliases from util

* Fix location of deprecated aliases key
2020-01-10 13:01:26 +10:00
Paul Belanger
7a7f70612a
Revert "Fix net_put module text file issue (#66065)" (#66328)
This PR didn't properly run testing for network jobs. As a result it has
broken jobs for ios and junos.

This reverts commit fa66813696.
2020-01-09 21:51:59 -05:00
Matt Clay
3c0a836004 Add changelog entry for PR #66321 2020-01-09 15:26:14 -08:00
Jordan Borean
595ab62ab8
Ansible.Basic - Added deprecated_aliases (#66323) 2020-01-10 09:13:13 +10:00
kaorihinata
3ca4580cb4 Allow no_log=False to silence the no_log warnings for module parameters (#64733)
As AnsibleModule._log_invocation is currently implemented, any parameter
with a name that matches PASSWORD_MATCH triggers the no_log warning as a
precaution against parameters that may contain sensitive data, but have not
been marked as sensitive by the module author.

This patch would allow module authors to explicitly mark the aforementioned
parameters as not sensitive thereby bypassing an erroneous warning message,
while still catching parameters which have not been marked at all by the
author.

Adds tests for various no_log states including True, False, and None (as
extracted by AnsibleModule._log_invocation) when applied to an argument with
a name that matches PASSWORD_MATCH.

Fixes: #49465 #64656
2020-01-09 16:47:57 -05:00
Jordan Borean
d3427bb860
Make sure warnings are printed during fact gathering (#66258) 2020-01-10 06:16:20 +10:00
Jordan Borean
aba8f12495 ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list
2020-01-09 14:24:36 -05:00
Ganesh Nalawade
fa66813696
Fix net_put module text file issue (#66065)
*  Modify the parent class for net_put and net_get
   module to refer from `ActionModule` class in
   network.py action plugin which contains the
   common code for network plugins.
*  Replace `_handle_template` with `_handle_src_option`
   function name which is defined in common class.
2020-01-09 18:42:00 +05:30
James Cassell
963b8249ec setup: more reliably detect container environment (#66183)
* virtual facts: /proc/<pid>/environ is NULL-separated
* non-empty "container" env is a guest container
* This is consistent with `systemd-detect-virt --container`
* fact utils: line_sep option: specify delim for split
* allow using the same function to split null-delimited objects
2020-01-09 11:51:45 +05:30
Markus Fischbacher
b05529c5a3 adding proxy_address field for active proxies (#66247)
Since 4.0.0 there is a field proxy_address for limiting proxy requests.

Official Docs: "Proxy address	If specified then active proxy requests are only accepted from this list of comma-delimited IP addresses, optionally in CIDR notation, or DNS names of active Zabbix proxy.
This field is only available if an active proxy is selected in the Proxy mode field. Macros are not supported.
This option is supported since Zabbix 4.0.0."
updated documentation/help
fixed test issues
fixed version_added not a string
fix suggestions by D3DeFi


added changelog fragment
applied D3DeFi suggestions

way cleaner and better readable
2020-01-08 19:25:10 -05:00
Marc Hörsken
53e405dd42 Fix 'CyberarkPassword' object has no attribute 'delimiter' (#66268)
This is a very small follow up to PR #59500
2020-01-08 15:36:41 -05:00
kaorihinata
40394ed671 Update user module to support no_log=False. (#66219)
Updates the user module to support pull request #64733. Neither the
update_password or password_lock field contains sensitive information, so
mark them as such.
2020-01-07 11:26:55 -05:00
Abhijeet Kasurde
469f104ec2 loop: simplify dict2items example in docs (#66235)
* Added a simple example to explain "dict2items" filters for better understading.

Fixes: #65505

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-07 10:32:46 -05:00
Matt Martz
f8654de851
Ensure that data within a tuple is marked as unsafe (#65918)
* Use is_sequence, and Mapping throughout, add support for tuples. Fixes #65722

* Address tests

* Remove unused import

* Add changelog

* Add docstring for clarity

* Argh, linting fix

* Not chasing this rabbit

* wrap_var doesn't return a ref to the original item

* no ref tests

* Remove unused import
2020-01-07 08:41:37 -06:00
njferrant
bac2e02900 vmware_guest: exclude dvswitch_name from guest os customization (#65997)
- exclude dvswitch_name from guest os customization
- add changelog fragment for ansible PR#65997
2020-01-06 16:41:02 -05:00
Marcel
02c126f5ee docker_container - #65993 - update restart policy (restart policy & restart retries) wit… (#66192)
* #65993 - update restart policy (restart policy & restart retries) without restarting the container

* - proper indentation on the continuation-line
- set restart_policy to the correct value independent from the api version

* - move restart_policy definitions into the if block
- add a new variable for the restart_policy configuration value

* add changelog fragment

* typo; minus -> underscore

* rename changelog fragment to contain the correct module name

* rename restart_policy_config_value to just restart_policy and refer to the correct dict values
2020-01-06 20:49:48 +01:00
Mads Jensen
ec34235e2e Use a context handler for file handling in paramiko_ssh.Connection. (#65624) 2020-01-06 13:09:57 -05:00
Anthony Bourguignon
d3e9ef3c35 add a path_join filter which joins path components (#62713) 2020-01-06 11:56:40 -05:00
Rémi REY
7888eafb82 Fix callback set_options issue with collections (#66128)
Fixes: #66127
2020-01-06 11:32:36 -05:00
Thomas Hucke
d56d0f97e3 Add support for OSCM-distribution in hostname module (#66190)
Fixes: #66189

Added subclass to detect the new distribution OSMC
2020-01-05 12:37:39 +05:30
Felix Fontein
b0b00b555f
docker_container: configure removal wait timeout (#66144)
* Add support for timeout while waiting for state.

* Allow to limit removal wait time.

* Add changelog.

* Forgot version_added.

* Add some check mode tests.

* Use removal_wait_timeout in tests.
2020-01-04 17:56:59 +01:00
Abhijeet Kasurde
9a13d56b26
Misc typo fixes (#66120)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-01-04 21:13:30 +05:30
Emerson "Duke" Almeida
865e767d39 PostgreSQL : Create unique index (#66157)
* Postgresql : Create unique index

TODO:

* fix syntax error

* add version added

* adding specs and improve doc

* add changelog

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* Update lib/ansible/modules/database/postgresql/postgresql_idx.py

* remove check about concurrent

* Apply suggestions from code review
2020-01-04 10:38:17 +00:00
Andrew Klychkov
4ecc9da244 mysql_db: add master_data parameter (#66048)
* mysql_db: add master_data parameter

* add changelog

* fix CI
2020-01-04 10:37:40 +00:00
Andrew Klychkov
b48366c2fe postgresql modules: use query parameters with cursor objects (#65862)
* postgresql modules: use query parameters with cursor objects

* add changelog fragment

* fix typo in changelog fragment
2020-01-04 05:18:45 -05:00
Hannes Ljungberg
f31b8e08b2 docker_swarm_service: Fix parsing of Healthcheck.StartPeriod (#66151)
* Parse Healthcheck.StartPeriod properly

* Add changelog fragment

* Use proper markup in changelog

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-01-02 09:23:36 -05:00
Felix Fontein
4df5bdb11e
docker_container: wait for removal if removal is in process (#65854)
* Allow to inspect containers directly.

* Wait for containers to be removed before recreating them.

* Also wait for containers to be removed before creating them.

* Add changelog.
2019-12-29 23:16:32 +01:00
Felix Fontein
17ef253ad1
docker_network: fix multiple subnet (of same IP version) idempotence (#65839)
* Fix multiple subnet (of same IP version) idempotence for docker_network.

* Add changelog.

* Unit tests no longer make sense, since the part of the code they test has been removed.

* Re-add CIDR validation. Move it to better position (module setup instead of idempotence check).

* Update changelog.

* Only run new tests on VM test images.

* Actually do what is documented. Especially since an empty object is a valid value for aux_addresses.
2019-12-29 23:16:17 +01:00
Andreas Olsson
b733178bac nsupdate: Use provided TSIG key for all queries (#63174)
In addition to signing update queries also use the TSIG key to sign
lookup queries. By doing that we allow a hidden master to not only to
be looked down network wise, but also TSIG wise.

A bonus benefit of threating update queries and lookup queries more
the same is that will allow for all queries to be refactored into a
shared helper method. Currently we have a bit too much duplicated code
within the module.
2019-12-27 16:02:24 +01:00
pypypyo14
c35a7b88d4 Homebrew: some functions ignored check_mode option (#65387)
update_homebrew and upgrade_all now support check_mode

Fixes: #65352
2019-12-27 10:45:34 +05:30
Abhay Kadam
2fa8f9cfd8 Fix env lookup plugin error on utf8 values (#65541)
This commit fixes issue #65297.

The env lookup plugin used to fail when environment variable value
contained any UTF-8 characters (e.g., δ, ζ).
2019-12-25 17:24:38 +05:30
Abhijeet Kasurde
683c467609
Check if task file is specified for import_tasks (#57572)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-24 10:26:32 +05:30
Abhijeet Kasurde
34acabd70a
VMware: Handle NoneType in vmware_vmkernel_info (#65834)
Check for virtualNicManager in Esxi host system before accessing properties in vmware_vmkernel_info.

Fixes: #62772

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-24 09:38:38 +05:30
Lénaïc Huard
10b6038e21 Fix pacman stdout parsing in the Ansible module (#65238)
pacman output is localized and the Ansible module is parsing its output.
So, we need to force the locale.
Add changelog fragment

Fixes #65237
2019-12-23 14:23:46 +05:30
sky-joker
3caadca3f4 Include groups in name-based search results (#66026)
add changelogs
2019-12-23 02:47:02 -05:00
Dusan Matejka
22d93d9496 zabbix_hostmacro support for zabbix native macro names and macro_value not required when state=absent (#65884) 2019-12-22 02:58:23 -05:00
Mads Jensen
a0e6bf366e Use context manager for file handling in misc files. (#65372)
The file handles are left open in those files.
2019-12-21 13:01:38 +01:00
Christophe Drevet-Droguet
b580f2929d terraform workspace list failure warns instead of fails (#65044)
* terraform workspace list failure warns instead of fails

Fixes #64788

* add a changelog fragment
2019-12-21 12:50:31 +01:00
Adam
e711d01ed1 #58578 support absolute paths additionally (#58812)
* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix
2019-12-21 12:49:38 +01:00
Pilou
7ee3103a86 clc_aa_policy: deprecate unused 'wait' parameter (#64367) 2019-12-20 23:46:53 -05:00
Matt Clay
9ea5b539b6 Add ansible-test constraint to avoid coverage 5.0+ 2019-12-20 11:55:54 -08:00
Sam Doran
18130e1419
user - honor update_password parameter on BusyBox hosts (#65977)
The check for this parameter was missing from BusyBox.modify_user(), resulting in unexpected password changes to existing user accounts.
2019-12-20 13:09:22 -05:00
Sloane Hertel
d50fac9905 Remove illusion of caching in the inventory script plugin (#64151)
* Load the cache plugin for the inventory script plugin and fix update cache logic

* Remove the illusion and let individual scripts deal with it

* reword that

* Deprecate instead of a hard failure

* changelog
2019-12-20 11:44:07 -05:00
Ganesh Nalawade
1cfab26fab
Fix netconf plugin related to collections (#65718)
* Fix netconf plugin related to collections

Fixes #65655 (partly)

*  Make netconf plugins configurable so that the
   information of ncclient device handler
   for give platform resides in the platform
   specific netconf plugin.
*  If the device handler value in ncclient is
   different from the ansible_network_os value
   the right value of `ncclient_device_handler`
   should be set in the plugin documentation.

* Fix review comments

* Fix CI issue

* Fix review comment
2019-12-20 12:25:59 +05:30
Andrew Block
fc31b4e506 VMware: Corrected documentation on vmware_guest module (#65733)
Update link for vapp_properties as per VMware docs in vmware_guest module
2019-12-20 10:16:38 +05:30
ngp-star
4769d731ac VMware: filter VMs of Same name on the basis of folder (#65922)
vmware_guest now filters VMs of same name on the basis of additional information of folder.
2019-12-20 08:54:15 +05:30
Alexandre Mulatinho
7bb925489e elb_{network_lb,target_group}: allow UDP/TCP_UDP (#65828)
elb_network_lb.py: allow UDP and TCP_UDP protocols

- Fixing documentation
- Add support to UDP and TCP_UDP as described on AWS SDK

elb_target_group.py: allow UDP, TLS, TCP_UDP proto

- Fixing documentation
- Making health checks with response codes and paths only in HTTP/HTTPS
- Allow UDP, TLS, TCP_UDP protocols as described on AWS SDK.

others:
- Added changelog fragments
- Integration test

Fixes: #65265
Signed-off-by: Alexandre Mulatinho <alex@mulatinho.net>
2019-12-19 15:06:16 -07:00
Baptiste Mille-Mathias
32a8b620f3 [get_url] Return status_code on HTTP 304 (#65739)
Return field status_code on HTTP status 304 (implemented by lkthomas)
Add an integration test for this case.
Fixes #65263
2019-12-19 14:50:44 -05:00
Mario Lenz
fec883dfff VMware: Add advanced settings to vmware_cluster_ha 2019-12-19 14:19:45 -05:00
Sloane Hertel
c870457339 free strategy - include failed hosts that were notified (#65576)
* free strategy - include failed hosts that were notified so --force-handlers is used

* trim line length a bit

* Loop over the force handler tests with the strategies linear and free

* rename changelog

* Use the play iterator instead of TQM for accurate failure representation in blocks

* Remove hack in a backwards compatible way for 3rd party plugins
2019-12-19 14:10:51 -05:00
Clint Byrum
284f26303c Add support for ECR Lifecycle Policies to ecs_ecr (#48997)
* Fix copy/pasta for ecs_ecr test names

* Add support for lifecycle policies to ecs_ecr

New feature for ecs_ecr to support [ECR Lifecycle Policies][].

Fixes #32003

 [ECR Lifecycle Policies]: https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html

* Improve error message for ecs_ecr parsing errors

Replaces the exception and stack trace with a description of what's
actually going wrong from a user perspective.

* Rename delete policy to purge policy

Marks the `delete_policy` parameter as deprecated, to be removed in
Ansible 2.6.

* Add version_added to purge_policy

* Remove changing results based on verbosity

What I really want is --diff support, and changing results based on
verbosity is abnormal.

* Ensure repository name is lowercase

* Fix deprecation cycle to 4 releases

* Use a YAML anchor for credentials

* Remove filters from assertions

* Add minimal permissions needed

* Updating version_added and deprecation cycle

The original PR sat while a few releases happened.

* Bumping version added and deprecation version

We missed the 2.8 release.

* Removing bare except:

This is not allowed and is generally bad practice.

* Fix lint errors

* update ansible release metadata

* Use the new alias deprecation scheme

This was added in the time the PR has been in development, so rework
things to use it.

* Add test coverage

This makes sure that lifecycle_policy is produced when passed in.

*Also a minor suggestion for simplification from PR.

* Restore changes from 62871 lost in rebase

* Add changelog

* Remove version_added for new purge_policy option

Per sanity test fail.
2019-12-19 11:41:41 -07:00
ivog74
bd989052b1 Add ansible cli options --ask-vault-password and --vault-pass-file (#63782)
* Move new Ansible cli options '--ask-vault-password' and '--vault-pass-file' to the existing calls to add_argument
* Add changelog fragement
* Change order of ansible cli arguments to use --ask-vault-password and --vault-password-file by default
* Update runme.sh in vault integration tests to test new options --ask-vault-password and --vault-pass-file
2019-12-19 12:07:25 -05:00
Abhijeet Kasurde
b31b5d105a
vars: Fail with warning for extra_vars filename without @ sign (#59915)
Rather than silently processing extra_vars filename without @ sign,
CLI now fails with appropriate warning about requirement.

Fixes: #51857

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-19 18:01:22 +05:30
Bill Dodd
973e36c6b6 Fix version param in deprecate() call and update porting guide (#65894)
* fix version= param in deprecate() call and update porting guide

* add changelog fragment
2019-12-19 07:09:28 +01:00
Mark Chappell
c40832af48 ec2_launch_template: Add default_version and latest_version to output, matching the documentation (#61279)
- Add tests for default/latest version manipulation
2019-12-18 15:53:57 -05:00
borborpa
71ea16995a Meraki: Fixed line 174 changed from None to the actual net_id… (#59395)
* Fixed line 174 changed from None to the actual net_id variable

* Update meraki_content_filtering.py

* Create 59395_meraki_content_filtering.yaml
2019-12-18 12:10:16 -05:00
Sean Whitesell
dfd998bcbc Added ability to specify plan information for images that require it. (#65335)
* Modified to include plan information.

* Fixed where plan is passed to the virtual machine object.

* Added changelog file

* Update changelogs/fragments/65335-add-plan-to-azure-vmscaleset-module.yaml

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

* Added plan suboptions with required flag. Removed code block checking plan since suboptions were added.

* Changed true to True. Added space after commas where failed tests indicated.

* Removed extra blank line. Added promotion_code to plan param list.

* Trying to fix indention issue

* Trying to fix indention

* Changed example capacity to trigger build check. Last failure was not due to code.

* Removed property for accepting terms and code block using it..

* Removed extra unneeded spaces.
2019-12-18 12:55:33 +08:00
Andrew Klychkov
9b85a51c64 Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2 (#65903)
* Bugfix of 65761: postgresql_privs fail after it's updated to 2.9.2

* add changelog
2019-12-17 13:53:51 +00:00
Jordan Borean
ae6fc265c9
Add-Type - Added a way to reference assemblies by type name (#65866)
* Add-Type - Added a way to reference assemblies by type name

* Also add architecture symbols during compile time

* Fix stray output values
2019-12-17 09:06:54 +10:00
Sam Doran
6f76a48f59
Make sorting in collection_loader match plugin loader (#65776)
* Simply sorting of Windows files below other plugin types
    Using the sort method with a custom key function uses less memory than creating multiple lists then joining them.

    This seemed to be an acceptable use of a lamdba, even though I geneally try to avoid them.

* Fix sorting of plugins inside of collections
    Explicitly sort Windows files below others, mimicking what we do in plugin/loader.py

* Add documentation about ansible.builtin and ansible.legacy
    Also document to the two different methods used for searching based on the candidate type.

* Add changelog
* Add integration test
* Update comment with expected sort order
2019-12-16 11:28:24 -05:00
Ganesh Nalawade
74e9b1e219
Fix network action plugin load in collection (#65849)
* Fix network action plugin load in collection

Fixes https://github.com/ansible/ansible/issues/65071

*  Load network action plugin that matches the module
   prefix name from list of collections.

* Update changelog

* Fix unit test
2019-12-16 19:15:41 +05:30
sky-joker
7b2cfdacd0 Zabbix: Handle KeyError in zabbix_host module (#65392)
Fixes: #65304
2019-12-16 13:32:11 +05:30
Ganesh Nalawade
88008badb1
Fix nxos_file_copy option value path validation (#65423)
* Fix nxos_file_copy option value path validation

*  Modify `local_file`, `local_file_directory` and
   `remote_file` option type from `str` to `path`
   so that the option value is validated in Ansible
   for a legitimate path value

* Fix review comments
2019-12-15 10:41:33 +05:30
Ricardo Leonardo
d7414d55e1 fixes bug: visible_name was not updated when not set in existing host… (#64095)
* fixes bug: visible_name was not updated when not set in existing host in zabbix

* Update changelogs/fragments/fix_zabbix_host_visible_name.yml

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>

* Update lib/ansible/modules/monitoring/zabbix/zabbix_host.py

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
2019-12-14 22:13:49 -05:00
Ganesh Nalawade
ff5253fa0e Fix network_cli become check to be compatible with collections (#65829)
*  The become method name check is not required in network_cli
   as the become command is specific to platform and is implemented
   in the platform specific terminal plugins
2019-12-14 16:50:51 -05:00
gp
98f19c970f VMware: Fix cluster argument of module vmware_content_deploy_template (#65715) 2019-12-14 20:43:35 +05:30
Andrew Klychkov
885cecfc94 postgresql modules: use query parameters with cursor objects (#65791) 2019-12-14 13:43:59 +05:30
Andrew Klychkov
24b1409667 postgresql_sequence: use query parameters with cursor object (#65787) 2019-12-14 09:46:27 +05:30
Andrew Klychkov
c5a42a9ac6 Fix a typo in changelog fragment's file name (#65788)
Changed '65679-postgresql_schema_user_query_params_with_cursor.yml' to '65679-postgresql_schema_use_query_params_with_cursor.yml'
2019-12-14 09:45:43 +05:30
Andrew Klychkov
a68269660e mysql_user: support for MySQL plugin authentication (#65789)
* mysql_user: support for MySQL plugin authentication

* add changelog fragment
2019-12-13 09:23:06 -05:00
Ganesh Nalawade
2ef47148cd
Fix action plugin issue with network connection type in common collection (#65078)
* Fix action plugin isse with network connection type in common collection

*  For network connection in common collection the value of
   ansible_connection is the FQCN of the connection type
   For example ansible_connection=network.common.network_cli

*  Add fix in supported network action plugins to extract
   the connection name from FQCN

* Fix CI issue

* Fix review comments and update community network action plugins
2019-12-13 19:22:56 +05:30
Andrew Klychkov
0079b8eaa2 mysql_info: add return_empty_dbs parameter (#65755)
* Bugfix of 65727: mysql_info doesn't list empty DBs

* add changelog

* mysql_info: add return_empty_dbs parameter

* fix
2019-12-12 14:10:52 +01:00
Arvind Shyamsundar
4a54873023 Correct the spelling of property to last_modified (#65752)
Fixed the misspelt 'last_modified' field in azure_rm_storageblob output
2019-12-12 13:49:08 +05:30
Abhijeet Kasurde
41e19a4058
inventory: Fail on non-existing limit file (#59758)
Ansible now fails with error message when user provides
non-existing limit file.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-12 09:09:40 +05:30
Abhijeet Kasurde
e82b28a920
cgroup_perf_recap: Check if user wants to write to files or not (#64988)
if user sets 'write_files' to False or does not set value, then
handle file write related operations.

Fixes: #64936

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-11 20:21:38 +05:30
Jiri Tyr
f89db2af99 Adding filename and destroy options to vmware_guest_disk (#63740)
Adding filename and destroy options to vmware_guest_disk
2019-12-10 10:30:15 -05:00
Kiyo Nagamine
f89ea5677b Fix typo in a changelog fragment of #64902 (#65533) 2019-12-10 09:51:47 -05:00
Abhijeet Kasurde
7d2ae7e322 solaris_zone: Allow only valid characters in zone name (#65686)
CVE-2019-14904 - solaris_zone module accepts zone name and performs actions related to that.
However, there is no user input validation done while performing actions.
A malicious user could provide a crafted zone name which allows executing commands
into the server manipulating the module behaviour.

Adding user input validation as per Solaris Zone documentation fixes this issue.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-10 07:18:55 -05:00
Andrew Klychkov
c791f916d3 postgresql_schema: use query_params with cursor object (#65679) 2019-12-10 14:11:23 +05:30
Abhijeet Kasurde
2e82989b3b
Add support for podman in virtualization facts (#64981)
Check additional file check virtualization facts for podman

Fixes: #64954

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-10 11:26:34 +05:30
Sam Doran
d35c1a435b
Handle InternalError raised by cryptography when running in FIPS mode (#65477)
Since older versions of paramiko do not require cryptography,
we cannot catch the exact exception from cryptography.

Remove other exceptions since we're catching everything now
2019-12-09 13:18:32 -05:00
Abhijeet Kasurde
0b2558051c
VMware: Minor fixes in vmware_httpapi modules (#65663)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-09 22:14:00 +05:30
Jiri Tyr
28019233db Don't search for VMDK if filename is defined (#63741) 2019-12-09 11:06:31 -05:00
Mark Chappell
d8943d495e AWS NLB: Deprecate current default behaviour of 'absent' (#65468)
* Deprecate elb_network_lb default of *delete*.

* Add changelog fragment

* Porting guide entry
2019-12-09 15:55:32 +01:00
Felix Fontein
57c042243f
crypto modules: fix various errors in argument specs (#65633)
* Fix various errors in crypto module argument specs.

* Adjust PR #.

* Fix provider requirement.

* Make sure openssl binary is installed.
2019-12-09 13:40:11 +01:00
Felix Fontein
e9cec0262d
docker_* modules: fix various errors in argument specs (#65632)
* Fix various errors in docker module argument specs.

* Adjust PR #.

* Fix option name.

* Fix username/password requirements for docker_login.
2019-12-09 13:39:02 +01:00
Mark Chappell
5c9539903e iam_policy: Make 'iam_name' a required option to match the documentation (#65559)
Without it we'd always throw a boto error
2019-12-09 15:08:43 +05:30
Mark Chappell
4919d5658a iam_cert: Make 'name' a required option to match the documentation (#65558)
Without it we'd always throw a boto error
2019-12-09 14:53:53 +05:30
Mark Chappell
cf3f1b9d3f iam: Make 'name' required to match the documentation (#65557)
With the exception of deleting Users and Roles (where we'd do nothing and exit) not passing a name would trigger a boto exception.
2019-12-09 14:46:02 +05:30
Mark Chappell
eac7d2a958 ec2_placement_group: Make name 'required' to match the documentation (#65555)
Previously you'd get one of the following behaviours:
- A boto3 error
- Nothing would change
- An error that you're not allowed to change the strategy

So of the bahaviour would depend on the random order that AWS returns the list of all Placement Groups
2019-12-09 14:35:36 +05:30
Mads Jensen
965474841f Use a context manager in docker.ImageManager. (#65609)
Co-Authored-By: Felix Fontein <felix@fontein.de>
2019-12-08 08:36:33 -05:00
Matt Martz
03a4edb477 Add method to automatically clean up after an action plugin (#65509)
* Use correct var, move cleanup for async
* Add changelog and tests. Fixes #65393. Fixes #65277.
* Kill off all long running async tasks from listen_ports_facts
* Update task to work with older jinja2
2019-12-06 17:29:26 -05:00
Abhijeet Kasurde
c97360d21f vmware: vmware_vm_inventory use port value when with_tags:True (#65568)
If user specifies a port number in vmware_vm_inventory plugin configuration,
then use that port to connect to vCenter rather than connecting to 443 which
is default port.

Fixes: #64096
2019-12-06 15:23:12 -05:00
Jordan Borean
b782227642
display - Fix up tracebacks on 3rd party loggers when log path is set (#65582) 2019-12-07 06:06:52 +10:00
Dan Ramaley
09fca101b7 Nagios module: minor change, added "start" parameter (#61562)
* Finished implementing the "start" parameter to the nagios module. The backend functions already had it; this change just exposes it. This allows setting the time a Nagios outage begins rather than always starting at the time the module was run. If not provided, "start" defaults to the current time (preserving compability with existing playbooks).
* Changed default start time to None, as per comment by @goneri. This avoids initializing the variable twice.
2019-12-06 12:23:03 -05:00
Andrey Klychkov
85486b1ce4 mysql: add changelog fragment for PR 64585 (#65594)
* mysql: add changelog fragment for PR 64585

* change fragment name and bug description
2019-12-06 12:05:47 +05:30
Jordan Borean
f21e72d55a
win_package - Use newer module wrapper as refactor baseline (#65586)
* win_package - Use newer module wrapper as refactor baseline

* Fix aliases in new arg spec
2019-12-06 13:37:52 +10:00
Jordan Borean
9a81f5c3b7
win_uri win_get_url - Fix up redirection defaults (#65584) 2019-12-06 11:47:35 +10:00
Jordan Borean
eaba5572cd
ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578) 2019-12-06 10:34:14 +10:00
Jordan Borean
fcdebe41e9
win_find - Refactor for better performance and alignment to find (#65536)
* win_find - refactor to make more performance and use newer style

* win_find - refactor for performance improvements and alignment to find

* More path alignment to find

* Fix yamllint error
2019-12-06 10:01:11 +10:00
Alexandre Chouinard
edc7c4ddee Fix encrypt command output when using --stdin-name (#65122)
* Fix encrypt command output when using --stdin-name

Add a new line after reading input if input doesn't end with a new line

* Only print is we're in a tty

* Add changelog fragment
2019-12-05 15:42:15 -05:00
Felix Fontein
a0f26b40cb Sanity checks: test for print statement (#65219)
* Add test for print() call in module_utils and modules.

* Add changelog fragment.

* Add ignore.txt entries.

* Use blacklist plugin instead of adding a new.

* Update ignore.txt
2019-12-06 05:31:31 +10:00
Andrew Gaffney
8a409f37db Throw an error on unsupported vars_prompt keys (#65487) 2019-12-05 10:54:32 -05:00
Andrey Klychkov
c59e061cff mysql_info: add exclude_fields parameter (#63371)
* mysql_info: add exclude_fields parameter

* mysql_info: add exclude_fields parameter, add changelog fragment

* change logic
2019-12-05 13:29:58 +00:00
Andrey Klychkov
8f78a0f8bf postgresql_publication: use query params with cursor object (#65404)
* postgresql_publication: use query params with cursor object

* add changelog
2019-12-05 10:44:45 +00:00
Andrey Klychkov
0c71249b03 mysql_db: add force parameter (#65547)
* mysql_db: add force parameter

* mysql_db: add force parameter

* add changelog

* add the param to state dump
2019-12-05 10:44:22 +00:00
Andrey Klychkov
c266fc3b74 postgresql_db: add executed_commands returned value (#65542)
* postgresql_db: add executed_commands returned value

* add changelog

* fix tests
2019-12-05 10:53:08 +01:00
Abhijeet Kasurde
96df2bdcf3
Fixed argument spec for multiple modules (#65496)
This change contains fixes for argument spec and respective datatypes.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2019-12-05 11:59:05 +05:30