Commit Graph

1988 Commits (99abf93a22dbafc9af0615792461801b64cd6bff)

Author SHA1 Message Date
Matt Clay 3c3cf50e7a Fix ansible-test coverage of ansible-connection. 4 years ago
Matt Clay 21069c84d9 Fix ansible-test color `ls` logic. 4 years ago
Matt Clay 428aaf7e65 Keep SSH authorized keys in ansible-test setup. 4 years ago
Matt Clay efd2dd8929 Add more ansible-test args to delegation config. 4 years ago
Matt Clay ee50792416 Add a `--no-pip-check` option to ansible-test. 4 years ago
Mark Chappell 35652ca788 Add tests to make sure that the documented 'elements' matches that defined in argument_spec (#66385)
* Add tests to make sure that the documented 'elements' matches that defined in argument_spec

* Mass-add test/sanity/ignore.txt
4 years ago
Sam Doran 3461c682c3
Add mechanism for storing warnings and deprecations outside of AnsibleModule (#58993)
* Move warn() and deprecate() methods out of basic.py
* Use _global_warnings and _global_deprications and create accessor functions
    - This lays the foundation for future functions being moved outside of AnsibleModule
       that need an interface to warnings and deprecations without modifying them.
* Add unit tests for new warn and deprecate functions
4 years ago
Sam Doran cc2376b782 include_vars - fix stack trace when run ad-hoc with dirs parameter (#66581)
Add integration test

There are a number of other parameters that result in stack traces as well when this module is used ad-hoc. I'm not sure if we're interested in fixing them all since this module isn't meant to be run ad-hoc.
4 years ago
Martin Krizek 365f2aaed1 get_url: remove deprecated headers string format (#66649)
Fixes #61891
4 years ago
Mark Chappell 5ff899662d Add sanity test to require elements entry when argument type=list (#66386)
* Require elements entry for lists

* Bulk add initial test/sanity/ignore.txt
4 years ago
René Moser 78e666dd39
vultr: improve handling of dicontinued plans (#66792)
* vultr: improve handling of dicontinued plans

* add changelog
5 years ago
digi 5409904c35 vmware_cluster_facts: adds list of host in cluster (#61006) 5 years ago
sky-joker 65aedc5d4a VMware: Change node_wwn and port_wwn for FC HBA to hexadecimal value
Fixes: #63045
5 years ago
Matt Clay 965854fbd2
Add constraints for Jinja2 on Python 2.6. (#66826)
* Add constraint for Jinja2 on Python 2.6.

* Fix constraint in inventory_aws_conformance test.

* Add constrraints for template_jinja2_latest test.
5 years ago
Martin Krizek 4ca0c7f116 Fix case sensitivity for lookup() (#66521)
This brings consistency to lookup(), with_ and ansible-doc.

Fixes #66464

* Add a porting guide entry
5 years ago
Gonéri Le Bouder 3ce6440515 vmware_export_ovf: increase default timeout
I consistently reach a timeout with the current (10s) timeout. This
commit increases the default value to 30s, this should simplify the life
of our users.
Also, the documentation was incorrect. The value is in second, not minute.
5 years ago
Felix Fontein 8cff585891
Schema validation for argument_spec (#65747)
* Start of schema for argument_spec

* Add changelog.

* Remove superfluous import.

* Update ignore.txt

Co-authored-by: Matt Martz <matt@sivel.net>
5 years ago
Markus Fischbacher 055cf91d02 zabbix_template - enable new update rule to delete missing linked templates (#66747)
* enable new update rule to delete missing linked templates

New update rule is available from 4.0.16 and 4.4.4 up. Add check for version and enable new update rule.

fixes #66720

* adding fragment file

* Update zabbix_template.py

* Update zabbix_template.py
5 years ago
Andrew Klychkov 70017e2679 postgresql_db: add dump_extra_args parameter (#66717)
* postgresql_db: add dump_extra_args parameter

* add changelog

* fix doc

* fix example
5 years ago
Roman Haefeli 4d1e21bf18 mysql_user: make sure current_pass_hash is a string before using it in comparison (#64059)
* make sure current_pass_hash is a string before using it in comparison

* add changelogs/fragments file

* fix changelogs/fragments file: it is actually a bugfix, not a minor change
5 years ago
Sam Doran 8e195adda5
display - remove extra new line after warning message (#65199)
Add unit tests for display
5 years ago
dexpl 1152774f92 git - add an 'archive_prefix' option (#66067)
Add integration tests for new option
5 years ago
Pilou bbbdc1c25c throttle: fix linear based strategies (#65422)
* throttle tests: fix detection of parallel execution

The test wasn't able to detect if too many workers were running.

On my laptop:
- without this change, the 'throttle' target takes ~20 seconds
- with this change, the 'throttle' target takes ~70 seconds
- 1 second isn't long enough to encounter the issue

* Fix throttle test when strategy is 'free' based

'free' strategy allows multiple tasks to be executed in parallel: use
one 'throttledir' per task.

Use 'linear' strategy with a dedicated play for cleanup/setup tasks

* throttle: reset worker idx before queuing a new task

* TestStrategyBase: define task.throttle

otherwise '1' will be used instead of the default value due to the
following expression being equal to '1':

    int(templar.template(task_mock.throttle))

Co-authored-by: James Cammarata <jimi@sngx.net>
5 years ago
Matt Clay 8b63da7b43 Fix ansible-test egg-info directory detection. 5 years ago
René Moser 9e8fb5b7f5 galaxy: fix AttributeError on empty requirements.yml (#66726)
* galaxy: fix AttributeError on empty requirements.yml

* add changelog
5 years ago
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>
5 years ago
Sato Kenta a4b59d0213 pamd: Fix AttributeError when removing the first or last rule (#66398) 5 years ago
Andrew Klychkov 72fbed2c61 postgresql_user: add comment parameter (#66711)
* postgresql_user: add comment parameter

* add changelog

* fix CI
5 years ago
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>
5 years ago
Andrew Klychkov fabb2eb555 mysql_db: add skip_lock_tables option (#66688)
* mysql_db: add skip_lock_tables option

* add changelog fragment
5 years ago
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
5 years ago
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
5 years ago
Matt Clay ebf21bb48d Fix ansible-test inventory delegation. 5 years ago
Matt Clay 934d6b235b Add `--venv-system-site-packages` to ansible-test. 5 years ago
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.
5 years ago
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.
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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
5 years ago
Adam Miller 077a8b4898 podman - fix rootless container copy no pause (#66583)
Fixes #66263

Signed-off-by: Adam Miller <admiller@redhat.com>
5 years ago
Mohammadreza Abdoli 7ae5331218 update ismount() to match upstream from cPython (#64586) 5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Florian Apolloner a7e4479d01 Fix DNF idempotency. (#66209) 5 years ago
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>
5 years ago
Sam Doran 1f340721a7 ansible-galaxy - add "--token" command line argument (#66376) 5 years ago
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
5 years ago
Jordan Borean e459eac565
Use UTF-8 without a BOM for win coverage (#66510) 5 years ago
Patrick Easters d5c5cb5a17 podman_image: Use provided credentials when pulling image (#66372)
* Use credentials when pulling from a remote registry
5 years ago
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
5 years ago
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>
5 years ago
Abhijeet Kasurde 257ac9d175
Fortios: Correct underscore_to_hyphen API (#66119)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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
5 years ago
Matt Clay 3db1ac4f56 Ignore warnings in ansible-test environment check. 5 years ago
Matt Clay 51e5b714e0
Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
5 years ago
Nathaniel Case 3a2257c45c
net_facts modules: Don't warn about defaults changing if they're not being used (#66270) 5 years ago
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
5 years ago
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.
5 years ago
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
5 years ago
Nathaniel Case 0a3a81bd12
Persistent connections: These timeouts seem unused (#66267)
* These timeouts seem unused

* Add changelog
5 years ago
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
5 years ago
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.
5 years ago
Jordan Borean c92b538cc5
WebRequest - remove generically named aliases from util (#66325)
* WebRequest - remove generically named aliases from util

* Fix location of deprecated aliases key
5 years ago
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.
5 years ago
Matt Clay 3c0a836004 Add changelog entry for PR #66321 5 years ago
Jordan Borean 595ab62ab8
Ansible.Basic - Added deprecated_aliases (#66323) 5 years ago
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
5 years ago
Jordan Borean d3427bb860
Make sure warnings are printed during fact gathering (#66258) 5 years ago
Jordan Borean aba8f12495 ansible-galaxy ignore empty server_list (#65986)
* ansible-galaxy ignore empty server_list
5 years ago
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.
5 years ago
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
5 years ago
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
5 years ago
Marc Hörsken 53e405dd42 Fix 'CyberarkPassword' object has no attribute 'delimiter' (#66268)
This is a very small follow up to PR #59500
5 years ago
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.
5 years ago
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>
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Mads Jensen ec34235e2e Use a context handler for file handling in paramiko_ssh.Connection. (#65624) 5 years ago
Anthony Bourguignon d3e9ef3c35 add a path_join filter which joins path components (#62713) 5 years ago
Rémi REY 7888eafb82 Fix callback set_options issue with collections (#66128)
Fixes: #66127
5 years ago
Thomas Hucke d56d0f97e3 Add support for OSCM-distribution in hostname module (#66190)
Fixes: #66189

Added subclass to detect the new distribution OSMC
5 years ago
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.
5 years ago
Abhijeet Kasurde 9a13d56b26
Misc typo fixes (#66120)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
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
5 years ago
Andrew Klychkov 4ecc9da244 mysql_db: add master_data parameter (#66048)
* mysql_db: add master_data parameter

* add changelog

* fix CI
5 years ago
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
5 years ago
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>
5 years ago
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.
5 years ago
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.
5 years ago
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.
5 years ago
pypypyo14 c35a7b88d4 Homebrew: some functions ignored check_mode option (#65387)
update_homebrew and upgrade_all now support check_mode

Fixes: #65352
5 years ago
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., δ, ζ).
5 years ago
Abhijeet Kasurde 683c467609
Check if task file is specified for import_tasks (#57572)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
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>
5 years ago
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
5 years ago
sky-joker 3caadca3f4 Include groups in name-based search results (#66026)
add changelogs
5 years ago
Dusan Matejka 22d93d9496 zabbix_hostmacro support for zabbix native macro names and macro_value not required when state=absent (#65884) 5 years ago
Mads Jensen a0e6bf366e Use context manager for file handling in misc files. (#65372)
The file handles are left open in those files.
5 years ago
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
5 years ago
Adam e711d01ed1 #58578 support absolute paths additionally (#58812)
* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix
5 years ago
Pilou 7ee3103a86 clc_aa_policy: deprecate unused 'wait' parameter (#64367) 5 years ago
Matt Clay 9ea5b539b6 Add ansible-test constraint to avoid coverage 5.0+ 5 years ago
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.
5 years ago
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
5 years ago
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
5 years ago
Andrew Block fc31b4e506 VMware: Corrected documentation on vmware_guest module (#65733)
Update link for vapp_properties as per VMware docs in vmware_guest module
5 years ago
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.
5 years ago
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>
5 years ago
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
5 years ago
Mario Lenz fec883dfff VMware: Add advanced settings to vmware_cluster_ha 5 years ago
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
5 years ago
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.
5 years ago
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
5 years ago
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>
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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.
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
sky-joker 7b2cfdacd0 Zabbix: Handle KeyError in zabbix_host module (#65392)
Fixes: #65304
5 years ago
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
5 years ago
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>
5 years ago
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
5 years ago
gp 98f19c970f VMware: Fix cluster argument of module vmware_content_deploy_template (#65715) 5 years ago
Andrew Klychkov 885cecfc94 postgresql modules: use query parameters with cursor objects (#65791) 5 years ago
Andrew Klychkov 24b1409667 postgresql_sequence: use query parameters with cursor object (#65787) 5 years ago
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'
5 years ago
Andrew Klychkov a68269660e mysql_user: support for MySQL plugin authentication (#65789)
* mysql_user: support for MySQL plugin authentication

* add changelog fragment
5 years ago
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
5 years ago
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
5 years ago
Arvind Shyamsundar 4a54873023 Correct the spelling of property to last_modified (#65752)
Fixed the misspelt 'last_modified' field in azure_rm_storageblob output
5 years ago
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>
5 years ago
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>
5 years ago
Jiri Tyr f89db2af99 Adding filename and destroy options to vmware_guest_disk (#63740)
Adding filename and destroy options to vmware_guest_disk
5 years ago
Kiyo Nagamine f89ea5677b Fix typo in a changelog fragment of #64902 (#65533) 5 years ago
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>
5 years ago
Andrew Klychkov c791f916d3 postgresql_schema: use query_params with cursor object (#65679) 5 years ago
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>
5 years ago
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
5 years ago
Abhijeet Kasurde 0b2558051c
VMware: Minor fixes in vmware_httpapi modules (#65663)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Jiri Tyr 28019233db Don't search for VMDK if filename is defined (#63741) 5 years ago
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
5 years ago
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.
5 years ago
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.
5 years ago
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
5 years ago
Mark Chappell 4919d5658a iam_cert: Make 'name' a required option to match the documentation (#65558)
Without it we'd always throw a boto error
5 years ago
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.
5 years ago
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
5 years ago
Mads Jensen 965474841f Use a context manager in docker.ImageManager. (#65609)
Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
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
5 years ago
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
5 years ago
Jordan Borean b782227642
display - Fix up tracebacks on 3rd party loggers when log path is set (#65582) 5 years ago
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.
5 years ago
Andrey Klychkov 85486b1ce4 mysql: add changelog fragment for PR 64585 (#65594)
* mysql: add changelog fragment for PR 64585

* change fragment name and bug description
5 years ago
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
5 years ago
Jordan Borean 9a81f5c3b7
win_uri win_get_url - Fix up redirection defaults (#65584) 5 years ago
Jordan Borean eaba5572cd
ansible-galaxy - expand User-Agent string for Galaxy endpoints (#65578) 5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Andrew Gaffney 8a409f37db Throw an error on unsupported vars_prompt keys (#65487) 5 years ago
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
5 years ago
Andrey Klychkov 8f78a0f8bf postgresql_publication: use query params with cursor object (#65404)
* postgresql_publication: use query params with cursor object

* add changelog
5 years ago
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
5 years ago
Andrey Klychkov c266fc3b74 postgresql_db: add executed_commands returned value (#65542)
* postgresql_db: add executed_commands returned value

* add changelog

* fix tests
5 years ago
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>
5 years ago
Felix Fontein c3d5371510
route53: diff support (#64867)
* Refactoring.

* Add diff support.

* Add changelog.
5 years ago
Matt Clay fb69d68821
Fix plugin paths for ansible-test pylint test. (#65526)
* Fix plugin paths for ansible-test pylint test.
5 years ago
Ian Wienand fc54ae9227 dnf: don't return fail_json['msg'] as list (#65302)
Although it's not enforced that fail_json['msg'] should be a string
[1], I think it is pretty strongly implied.

In this case the failure_response['msg'] is sent through as the
fail_json['msg'], and the trailing commas here turn it into a tuple.
It's not clear if this is a typo or intended, but it does cause
problems for callbacks that expect this as a string (e.g. [2]).

Since there seems no point to having these values as a tuple, remove
the trailing commas so they return a string as per everywhere else.

[1] 4c589661c2/lib/ansible/module_utils/basic.py (L2078)
[2] https://review.opendev.org/#/c/696081
5 years ago
Jordan Borean c04fc52aad
win_dns_client - only configure ip enabled adapters (#65488) 5 years ago
Kevin Breit 4184b05cc1 meraki_organization - Ignore URL parameter when comparing for… (#65337) 5 years ago
Kevin Breit 79b088aeba Meraki - Remove type comparison for idempotency check (#65338)
* Remove type comparison in is_update_required()

* Add changelog
5 years ago
Andrey Klychkov 651dff6a2e mysql_db: add the executed_commands returned value (#65498)
* mysql_db: add the executed_commands returned value

* add changelog
5 years ago
Sylvain Monné 03c16096d7 Fix extract filter when key does not exist in container (#64959)
Fixes #64957
5 years ago
Abhijeet Kasurde 520a505caf
VMware: Fix state parameter in vmware_host_lockdown module (#65495)
Changed 'str' to 'type' in Argument_spec which is valid parameter.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Shachaf92 584824f560 win_share - Implement append paramtere for access rules (#59469)
* win_share - Implement append paramtere for access rules

* changed fragment

* add test

* missing bracket

* removed whitespace

* Wrong number of lines

* Forgot the actual new parameter in the test

* community review

* Change option names

* version update

* Update tests.yml

* Add idempotence to rule_action: add
5 years ago
Kiyo Nagamine daecbb9bf0 Ensure `allow_duplicates: true` enables to run single role multiple times (#64902) (#65063)
* Ensure `allow_duplicates: true` enables to run single role multiple times(#64902)

* Changed return value in `_load_roles` . Fixes #64902

* Add changelog fragment

* Add an integration test for the issue

* Fix changelog generation error and integration test.

* Fix yaml syntax error in changelog fragment
5 years ago
Felix Fontein 4be8b2134f Sanity checks: make sure that `required` in argument spec coincides with documentation (#65437)
* Add sanity test for required parameters, update ignore.txt, and add changelog.
5 years ago
Felix Fontein ae4363f6d1
openssl_csr: make sure privatekey_path is specified when state is present (#65435)
* Make sure privatekey_path is specified when state is present.

* Add changelog.
5 years ago
Jordan Borean 8648003c1f
ansible-galaxy - Add User-Agent to requests (#65438) 5 years ago
Jordan Borean 6586b7132c
galaxy - print HTTP reason on unknown error (#65273) 5 years ago
Mario Lenz 02e7c5a19f vmware_datastore_cluster: Added SDRS configuration (#65193) 5 years ago
Jordan Borean 694ef5660d
Fix using a URL for galaxy collection install (#65272)
* Fix using a URL for galaxy collection install

* Update lib/ansible/galaxy/collection.py

Co-Authored-By: Sloane Hertel <shertel@redhat.com>
5 years ago
Andrey Klychkov 0cadb952f9 postgresql_ext: use query_params (#64994)
* postgresql_ext: use query_params

* added changelog
5 years ago
Felix Fontein 08b53b94a9 acme_certificate: Fix ACME v1 support when modify_account is set to false (#64648)
* Fix ACME v1 when modify_account is set to false.

* Add changelog.
5 years ago
Maxim Babushkin da73bbd73c openssh_keypair - Add logic to handle password protected or broken key (#64436)
* The ssh key may be created manually prior the task execution with a
  passphrase. And the task will be executed on the same key.
* The ssh key may be broken and not usable.

The module will check the private key and if the key is password
protected or broken, it will be overridden.
The check of the ssh key performed by retrieve the public key from the
private key.

Set the "self.force" check before the "isPrivateKeyValid" check.
In case of any issue with the "isPrivateKeyValid" function, the user
will be able to force the regeneration of the key with the "force: yes"
argument.
5 years ago
Hans Jerry Illikainen a0b8b85fa5 ufw: add support for interface_in and interface_out (#65382)
* ufw: escalate privileges in integration tests

A few of the integration tests for the UFW module forgot to `become`.
This is problematic if the test suite is executed as a non-privileged
user.  This commit amends that by adding `become` when appropriate.

* ufw: add unit tests for direction and interface

Extend the unit tests for the UFW module to test the `direction` and
`interface` parameters.  This will help in the implementation of a fix
for issue #63903.

* ufw: add support for interface_in and interface_out

The UFW module has support for specifying `direction` and `interface`
for UFW rules.  Rules with these parameters are built such that
per-interface filtering only apply to a single direction based on the
value of `direction`.

Not being able to specify multiple interfaces complicates things for
`routed` rules where one might want to apply filtering only for a
specific combination of `in` and `out` interfaces.

This commit introduces two new parameters to the UFW module:
`interface_in` and `interface_out`.  These rules are mutually exclusive
with the old `direction` and `interface` parameter because of the
ambiguity of having e.g.:

    direction: XXX
    interface: foo
    interface_XXX: bar

Fixes #63903
5 years ago
Shachaf92 03dce68227 win_disk_facts - Set output array order to be by disk number property (#64997)
* win_disk_facts - Set output array order to be by disk number property - https://github.com/ansible/ansible/issues/63998

* Update win_disk_facts.ps1
5 years ago
Shachaf92 d8982b4992 win_nssm - Implement additional parameters (#65131)
* win_nssm - Implement additional parameters

* Update win_nssm.py

* Snake case change

* Update win_nssm.py

* Update win_nssm.ps1

* Remove duplicated executable option

* Added default values for new options
5 years ago
Hans Jerry Illikainen 2acfa0e08c Add passphrase support for luks_device (#65050)
* Elevate privileges for luks_device integration tests

Several tests in `key-management.yml` don't `become` before executing,
despite needing elevated privileges.  This commit fixes that.

* Add passphrase support for luks_device

Previously, the luks_device module only worked with keyfiles.  The
implication was that the key had to be written to disk before the module
could be used.

This commit implements support for opening, adding and removing
passphrases supplied as strings to the module.

Closes #52408
5 years ago
mrdrogdrog 38193f6b60 proxmox: fix proxmox 6 version detection by using LooseVersion (#59165)
* proxmox: use 'release' key for version detection if possible

* proxmox: fix PEP issues

* add changelog fragment

* Uses LooseVersion for proxmox version detection

* move imports

* removes useless comment
5 years ago