Commit graph

30430 commits

Author SHA1 Message Date
Andrew Klychkov 9d8bd225af
postgresql_subscription: remove stat (#67470) 2020-02-19 09:34:20 +01:00
Markus Fischbacher 8aec058473
add omit_date option for template dump (#67302)
* added omit_date option for template dump

omit_date=yes removed the date field in the exported template

* Update zabbix_template.py

- ansibot fixes
- better function call handling

* Update zabbix_template_info.py

* Create 67302-zabbix_template_info-add-omit_date-field

* Rename 67302-zabbix_template_info-add-omit_date-field to 67302-zabbix_template_info-add-omit_date-field.yml
2020-02-19 01:56:40 -05:00
Mikhail Yohman cceb517aff
IOS: Add voice vlan to ios_l2_interfaces (#67211)
* Add voice vlan to ios_l2_interfaces

* Fixed pep8 issues, added voice vlan to tests, updated module docs
2020-02-19 12:23:59 +05:30
Nilashish Chakraborty e632d93371
Add iosxr_acl_interfaces RM (#66936)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-02-19 11:40:45 +05:30
Paul Belanger 493dda94e9
Remove unused imports for vyos (#67550)
These flake8 errors would caught in our collection testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-18 17:49:49 -05:00
Jordan Borean d7059881a2
win_credential - fix wildcard name (#67549) 2020-02-19 07:43:04 +10:00
Alex Stephen 650c3c5df3
doc fragment needs proper types (#67545) 2020-02-18 16:40:00 -05:00
Felix Fontein de5c18af7c
openssl_* / x509_* modules: refactoring (#67540)
* Move common code to module_utils.

* Unify get_relative_time_option.
2020-02-18 22:23:50 +01:00
Robert Gabriel 13a949e345
Update digital_ocean_droplet.py (#65251) 2020-02-18 15:09:28 -05:00
Sloane Hertel ed6a6aca25
Allow botocore configuration for aws modules (#55217)
* Allow botocore configuration to be configurable for boto3 modules

* Allow modification of the boto user agent

* play nicely with modules that might be modifying config

* changelog
2020-02-18 13:12:10 -05:00
Nijin Ashok 214bf8dc0b
Fix KeyError for iSCSI parameters (#67463)
The required parameters for the LUN mapping for destination LUN is
address, port and iqn. However if the user doesn't pass parameters
like  CHAP authentication parameters, we will get KeyError. The patch
fixes the same.
2020-02-18 12:56:15 -05:00
Felix Fontein 0f56ac018b
Add x509_crl module (#63435)
* Add x509_crl module.

* Add integration tests.

* Fix some errors.

* Fix inversion.

* Compare name instead of tpye.

* Fix fail_json() calls.

* Work around rename of serial_number attribute for cryptography 1.4.

* Don't die for non-cert loading errors.

* One more.

* Fix function call.

* Fixed/improved descriptions.

* Don't read issuer from certificate file.

* Allow to ignore timestamps.

* Default value for revocation_date.

* Update tests.

* Mention ignore_timestamps in update docs.

* Support privatekey_content, and require some options only if state is present.

* Allow to pass certificate in directly.

* Add tests.

* Fix required_if.

* Forgot to encode content.

* Forgot to adjust type.

* Allow to return CRL's content directly.

* return_crl_content -> return_content (as in #65400).

* Fix elements.

* Fix messages.

* Use required_one_of and mutually_exclusive instead of doing the checks by hand.

* Fix format.

* Skip tests on AIX.

* Fix typo.
2020-02-18 17:14:13 +01:00
Stefan Horning de230d04a3
Fixed documentation for elb_target_group module to match the code logic. (#66689) 2020-02-18 09:56:37 -06:00
Connor Adams 2a36ade26f
Update win_service example in win_nssm (#67530)
`user` should be `username` for use in `win_service`, see https://docs.ansible.com/ansible/latest/modules/win_service_module.html#parameter-username
2020-02-18 09:50:43 -06:00
iridian 3ccda78145
pause - add missing interpreter line (#67134) 2020-02-18 10:46:29 -05:00
Rohit 9eb7709c61
Vyos static route module added (#62193)
* Vyos static route module added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* empty config traceback fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity check fix

* model specific changes and SI test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* new state changes and SI test cases updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* UT cases added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* replaced operation fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* review comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* shippable fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* delete opr updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-02-18 07:32:26 -05:00
Abhijeet Kasurde b6753b46a9
Replace 'message' in module parameters (#60051)
* 'message' parameter is replaced by 'commit_message' in grafana_dashboard
* 'message' parameter is replaced by 'notification_message' in datadog_monitor

This change is required since 'message' as parameter name is used internally by
Ansible core engine.

Fixes: #39295 #45362 #47132 #59617

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-18 13:00:16 +01:00
Jannik Vieten 00bed0eb1c
facts virtual: detect KVM when product_name is 'KVM Server' (#66780)
* facts virtual: detect KVM when product_name is 'KVM Server'

* added changelog fragment for "facts virtual: detect KVM when product_name is 'KVM Server'"
2020-02-18 12:14:20 +01:00
Andrew Klychkov 5a7c58b2be
postgresql_info module: fix broken link (#67517) 2020-02-18 14:22:41 +05:30
Felix Fontein ca57871954
openssl_* modules: prevent crash on fingerprint determination in FIPS mode (#67515)
* openssl_* modules: prevent crash on fingerprint determination in FIPS mode.

* Add changelog.
2020-02-18 09:43:22 +01:00
Bruno Meneguello 9f41d0e914
route53: improve octal encoded characters handling (#60508)
* route53: improve octal encoded characters handling

* Update changelogs/fragments/60508-route53-improve-octal-characters-handling.yml

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

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-02-18 09:18:59 +01:00
Abhijeet Kasurde 70b9bdbce6
Fix links in Postgresql modules (#67511)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-18 13:18:16 +05:30
Abhijeet Kasurde 7dcf32294b
Update URLs in documentation (#67376)
Partially fixes: #67357

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-18 09:00:30 +05:30
Baptiste Mille-Mathias bb70c0b996
[doc] Set consistent return codes for modules (#67444)
Set consistent possible return codes for these similar two modules.
2020-02-17 17:50:52 -06:00
Jan Meerkamp cbc38d2e5a
Windows: Add multi-domain forest Support (#65138)
* Add multi-domain forest Support
cloned extra_args so there is no check for credentials needed.
Fixed Formatting
added missing extra_args to pure state

* minor Fixes
do not clone $extra_member_args again
do not overide $name
better description

* added Changelog
fixed typo in Documentation
2020-02-18 08:43:17 +10:00
Sandra McCann a60feeb3c1
Specify lowercase only for Galaxy namespaces (#67485)
* specify lowercase only for galaxy namespaces
* doh... include meta file
2020-02-17 15:26:47 -06:00
Bill Dodd b5b23efdcc
Add SimpleUpdate command (#65074)
* add SimpleUpdate command

* add AllowableValues check for Targets property
2020-02-17 21:19:47 +00:00
Sam Doran c64202a495
ansible-galaxy - fix role list bug (#67391)
Properly list roles even when the role name is the same or a substring of the
path to the role.
2020-02-17 16:16:14 -05:00
Sloane Hertel b0abc1f5f6
Fix bug in iam_role - _list_policies was not returning anything (#67495) 2020-02-17 15:43:26 -05:00
Sloane Hertel 6a8b1f867e
[aws_s3] fix deleting versioned objects before deleting bucket (#54435)
* [aws_s3] fix deleting the current objects and the previous versions from a version-enabled bucket

* use existing paginated_list function to keep compatibility with the other places it is called

* changelog

* Add noteworthy change to the porting guide

* Reword that with acozine's suggestion

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
2020-02-17 13:16:09 -05:00
Martin Nečas 3bf6802cb2
ovirt_disk: correct description of storage_domain (#67454)
* ovirt_disk: correct description of storage_domain
* add changelog

Signed-off-by: mnecas <necas.marty@gmail.com>
Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-17 11:19:57 -06:00
Lukas Kämmerling 62cc120dce
Add support for networks to hcloud inventory (#67453) 2020-02-17 13:39:37 +00:00
Rohit e76630c4e4
VyOS: firewall_rules module added (#65680)
* firewall_rules module added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* state fact gathering code

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* facts and operation code added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* unit tests added

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fixes

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* delete opr updated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-02-17 08:08:08 -05:00
Max Bubenick eff51c0122
Fix proxysql module cursor_class (#67339)
* Fix proxysql module cursor class

* Adding changelog file

* adding extension to changelog file
2020-02-17 13:55:44 +01:00
Jordan Borean 38f26ffcc7
win_domain_object_info: new module (#67450)
* win_domain_object_info: new module

* Added basic integration tests
2020-02-17 18:22:11 +10:00
Brian Scholer be26f4916f
win_dns_client DHCP improvements + more (#66451)
* Fix DHCP support in win_dns_client + more

* Fix bugs and test failures, add changelog fragment

* Add idempotency tests for DHCP

* Address review feedback; dedup address-family code

* Remove legacy function

* Remove old reference
2020-02-17 15:35:54 +10:00
Jordan Borean e3d5dc0ed0
win_domain_controller: Added domain_log_path (#67448) 2020-02-17 07:25:22 +10:00
Ali 4733af3376
Added support for GitHub Enterprise to github_deploy_key module (#59564) 2020-02-16 17:33:06 +00:00
Christian Köberl 569f0cf808
azure_rm_rg_info: fix KeyError: 'ansible_facts' (#66729)
* azure_rm_rg_info: fix KeyError: 'ansible_facts'

Fix facts for using old azure_rm_resourcegroup_facts, closes #66727

* fix intendation
2020-02-16 17:03:31 +01:00
Sylvia van Os ff0576802f
Support changing fetch_url settings for Rendeck modules (#66357) 2020-02-16 15:07:36 +01:00
CWollinger 274a07e7c7
Add module ipwcli_dns.py to manage DNS records on Ericsson IPWorks (#67135)
* Create ipwcli_dns.py

* add newline at the end

* Update after review and support AAAA

* Update lib/ansible/modules/net_tools/ipwcli_dns.py

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

* add integration tests and change param user to username

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-02-16 15:05:44 +01:00
Michael Heap a43f76cbf9
Add mas module for installing applications via the Mac App Store (#19768)
* Add `mas` module for installing applications via the Mac App Store

Currently, only the `install` command is available, and you must provide IDs
when installing applications.

* mas module: Update metadata

Brings the metadata in line with the current style.

* mas module: General refactor, support more states

- `check_mode` is now fully supported
- Support for states `absent` and `latest` (using `mas uninstall` and `mas upgrade`)
- Support for a list of apps to manage
- Remove return value as other packaging modules don’t support it either
- Return msg with details on the changes on success
- Code was refactored to be easier to read and maintain

* mas module: Add upgrade_all option

* mas module: Fix linting errors

* mas module: Implement review feedback

Co-authored-by: Lukas Bestle <account-github@lukasbestle.com>
2020-02-15 19:44:20 +00:00
Ronnie P. Thomas 807f4ea658
Don't send JOIN and PART commands if channel is not set (#62334)
Currently, the irc module is sending JOIN and PART commands even if the channel
key is not set in the irc module. This causes the module to send JOIN and PART
commands to the #None channel. This module can send PRIVMSGs to either a
channel or a list of nicks, so sending JOIN and PART doesn't make sense in
cases where channel is undefined. The same goes for the TOPIC command, which is
used to set a topic for channels.

This patch ensures that the JOIN, PART and TOPIC commands are only sent if the
channel is defined.
2020-02-15 12:39:28 -05:00
tottoto cc86748109
Fix url handling in lxd_container and lxd_profile module (#66097)
* Fix url handling in lxd_container module

* Fix url handling in lxd_profile module
2020-02-15 12:39:05 -05:00
koenw eaf879a7a7
Fix uptimerobot stacktrace on decode (#66244)
* Fix uptimerobot stacktrace on decode

`req.read()` always returns bytes whereas the json module expects
strings.

I don't know how this worked before.

* Use `module_utils._text.to_native` instead of decode
2020-02-15 11:10:23 -05:00
Daniel Sternig 11483921f2
Added additional error handling inside the hcloud.py inventory plugin… (#66381)
* Added additional error handling inside the hcloud.py inventory plugin. Otherwise, errors may happen, if the HCloud API is not able to correctly identify the server image.

* Corrected the previous commit to not check for None on variables that are always set. Additionally, used image.description if image.name was not set, instead of the previously added default string.
2020-02-15 11:09:18 -05:00
Pilou 5aa60a5fa7
ovirt: don't ignore instance_cpus parameter (#64366) 2020-02-15 14:57:19 +00:00
Ilija Matoski e1a815381a
Thresholds need to be passed for the log alert type (#64851)
* Thresholds need to be passed for the log alert type

* removed whitespace from linting error
2020-02-15 14:56:16 +00:00
Mads Jensen f978b6c789
Use https for Ansible Slack icon. (#65625) 2020-02-15 14:53:18 +00:00
Emmanuel MICKIEWICZ 8647d0a873
Removing a cron file when the 'name' parameter is specified is now allowed (#57471). Added integration tests to validate new behavior. (#65640)
Also added user input validation to return a clear error when deleting an environment variables without specifying a name.
2020-02-15 14:52:36 +00:00
Phil fe6848badd
sefcontext: fix fatal failure for socket file type (#65690)
fix #65689
2020-02-15 14:51:06 +00:00
Timm Drevensek 9541377a20
Port keycloak to python3 (#66452) 2020-02-15 14:44:18 +00:00
bitchkat 6b017db05b
support rabbitmq 3.8.x in version check (#66855)
* support rabbitmq 3.8.x in version check

* Removed extraneous white space
2020-02-15 14:42:32 +00:00
Felix Fontein b1de5d43fc
openssh_keypair and openssl_privatekey: add regenerate option (#67038)
* Add regenerate option to openssh_keypair and openssl_privatekey.

* Add changelog.
2020-02-15 14:39:36 +00:00
Felix Fontein 55cb8c5388
docker_login: fix permissions for ~/.docker/config.json (#67353)
* Fix permissions for ~/.docker/config.json.

* Add changelog, remove debug output.
2020-02-15 14:38:58 +00:00
Lujeni 25181e1b70
mongodb_user: Ensure to close database connection (closes #59353) (#65665) 2020-02-15 09:10:27 -05:00
Jill R c9b38bd74e
ec2_snapshot and ec2_snapshot_info test suite (#65896)
* ec2_snapshot and ec2_snapshot_info test suite

* Add a fact to make tests easier to follow.
Test all return values, and add missing RETURN docs to module.
2020-02-15 13:21:23 +00:00
Milan Ilic 717b7fee9f
Update redis module to support memory size units (#66975) 2020-02-15 13:15:12 +00:00
Pascal Stauffer 24ce97a49b
open_iscsi: Set default port as string (#67270) 2020-02-15 13:06:16 +00:00
Andrew Klychkov 59bcc9f739
Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string (#67418)
* Bugfix of 67377: postgresql_set converts value to uppercase if "mb" or "gb" or "tb" is in the value string

* fix CI

* add changelog
2020-02-15 13:03:53 +00:00
Tomer Brisker a4f5c2e993
Post reports to newer Foreman API endpoint (#64955)
The `/api/v2/reports` endpoint has been deprecated a long time ago and should
no longer be used. This changes to callback to use the correct API
endpoint and paramerter.
2020-02-15 13:01:27 +00:00
XuLei Ren 435bd91d2e
Add new command ClearSessions (#65600)
* Add ClearSessions command to clear all active sessions.

* Delete trailing whitespaces
2020-02-15 13:00:55 +00:00
Prasad Katti f21ee7f685
cloudformation - use mutually_exclusive for on_create_failure and disable_rollback (#65629)
* cloudformation - use mutually_exclusive for on_create_failure and disable_rollback

* cloudformation - remove unit test test_disable_rollback_and_on_failure_defined
2020-02-15 13:00:36 +00:00
Nick Lopez be1459af0f
use proxy settings for Redfish requests (#65998) 2020-02-15 12:58:27 +00:00
Mark Chappell 9edcda7ef7
Refactor iam_role to bring down the complexity score (#66027)
* Simplify BotoCore- / Client- Error try/except loops where we don't need different behaviour

* Refactor IAM Role manipulation to reduce complexity scores

* Missing permissions

* Add retry decorator by default

* compare_attached_role_policies is dead code, remove it
2020-02-15 12:57:52 +00:00
Markus Fischbacher 98bc53d3cb
zabbix_action - allowing string for esc_period (#66841)
* allowing string for esc_period

* add changelog fragment

* Update zabbix_action.py

* remove now unneeded test
2020-02-15 12:57:02 +00:00
Andrej Svenke f98874e4f9
ec2_asg: max_instance_lifetime and respect wait on replace (#66863)
* ec2_asg: max_instance_lifetime and respect wait on replace

* ec2_asg: max_instance_lifetime integration tests

* ec2_asg: address review comments
2020-02-15 12:56:39 +00:00
Bill Dodd fe2a8cb145
do not loop through chassis in manage_indicator_led() (#66044) 2020-02-15 12:49:18 +00:00
akatch 936bd83614
Fix duplicate log entries (and add item support for failures) (#66098) 2020-02-15 12:48:05 +00:00
ihard ad2428c176
fix hashi_vault lookup generates warning at LDAP authenticate #52131 (#67251) 2020-02-15 12:46:44 +00:00
Mark Chappell c36f03b3e1
Add AWSRetry decorator to ec2_vpc_nacl (#67204)
* Add AWSRetry decorator to ec2_vpc_nacl

* Also add a decorator to ec2_vpc_nacl_info to catch things like API rate limit errors.

* add double-removal integration tests to make sure things don't get too slow

* Fixup retry usage for _info

* Simplify changed logic when modifying a NACL

* tweak error message
2020-02-15 12:42:02 +00:00
René Moser bcd145c111
vultr: Fix retry max delay param ignored (#67437)
* vultr: Fix retry max delay param not taken

* add changelog
2020-02-15 12:40:03 +00:00
Jim Ladd a5af649a73
foreman: ansible_ssh_host should consider ip, ipv4, ipv6 (#67401) 2020-02-15 10:05:08 +00:00
Oliver Kastler 0760a7ec08
Fix for shared snapshot parameter (#60250)
* Fix for shared snapshot parameter

Fixing this bug:
`Unknown parameter in input: "IsShared", must be one of: DBInstanceIdentifier, DBSnapshotIdentifier, SnapshotType, Filters, MaxRecords, Marker, IncludeShared, IncludePublic, DbiResourceId`

* Updated documentation for shared snapshots

Tags can't get accessed for shared snapshots

* fixed indentation

* added test for shared snapshot

* fixed isPublic parameter to correct IncludePublic parameter

Co-authored-by: Oliver Kastler <oliver@realestate.co.nz>
2020-02-14 19:05:40 -07:00
Sam Doran 7ae34cef15
Fix role list regression (#67436)
Add the roles_path parent to the role_parser
object, so paths are passed to the list function

Add basic role list tests to prevent future regressions
2020-02-14 19:51:48 -05:00
Nirav Katarmal 5ea26b6e5a
Added nameAlias field (#67150)
* Added nameAlias field to all the supported ACI modules

* Changed nameAlias to name_alias

* Review changes
2020-02-15 01:50:37 +01:00
Vasili 9b28f1f5d9
Fix incorrect "Could not match supplied host pattern" warning (#66764) (#67432) 2020-02-14 15:50:52 -06:00
Jan Meerkamp 1d370bd189
VMware: vcenter_folder nested folder absent fix (#65283)
- no longer try to create folder which exists.
- correctly remove nested folders with absent.
2020-02-14 16:18:34 -05:00
Abhijeet Kasurde 7000c51c06 VMware: Add support for specify tag and category as dict
User can now specify tag and category using dict in vmware_tag_manager
module. This is useful when tag or category name contains colon.

Fixes: #65765

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-14 16:07:10 -05:00
Osman Ullah 33d5c68887
Add newline in description of win_file.state (#67427) 2020-02-14 15:30:35 -05:00
John McDonough 210e799375
UCS Emulator link to Doc Fragment use cs.co domain (#67434) 2020-02-14 15:20:17 -05:00
Sam Doran f506fd4730
Add ansible-galaxy collection list command (#65022)
* Start adding ansible-galaxy collection list options

* Working list all collections and list a specific collection

* Nuke debugging cruft

* Use to_text to get a string of the FQCN for sorting

* Improve collection output formatting

- add header
- display collection name and version in separate columns
- width of columns is dynamic based on collection name and version length

* Make role list output match collection output list

- add header
- add columns for role name and version
- make column width dynamic based on name and version length

* remove debug statemnt and extra header

* Revert "Make role list output match collection output list"

This reverts commit a0b3db47bb3b198aafd34c1f1be5b6561af2f928.

* Add validate_collection_path function

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

* Use validate_collection_path

* Do not warn if a specific collection in found in any search path

* Fix extraneous warning and remove duplicate code

Do not warn when listing a specific collection and it does not exist
in other collection paths.

Restructure the code that loops through collection paths to remove
duplicate conditional code.

* Indicate role path was found

* Use new function name

* WIP Save Point

* Use separate functions for role and collection list

* Wrap error message

There may be a better way to do this besides hard coding a line break, but this
does make the message a lot more readable.

* 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

* Bikeshed the names

* Properly list a single role

* Simplify _display_warnings()

Only display warnings. Move exception raise back to each caller.

* Move private methods to private functions

They don't need self, so it makes sense to have them as functions
Get rid of _display_warnings() function since it doesn't do anything worthy of
an independent function.

* Add integration tests for ansible-galaxy collection list

* Fix docs sanity test

* Fix bug where ansible_collections dir does not exist

The path may exist, but if there is no ansible_collections dir inside that path,
an exception was raised in find_existing_collections().

Add integration test for this scenario

* Put execute_list() method back

* Add some informational messages for debugging

* Add unit tests

Units tests for the various private methods in support of collection list

* Start adding unit tests for test_execute_list

* Display collection path when listing specific collection

* Add unit tests for listing all collections and specific collection

- Create fixture for creating test objects
- Add function for controlling os.path.isdir results

* Set defaults for minimum collection widths

Ensure that collections with small FQCNs display correctly.
Add unit tests

* Split up unit tests and fix fixtures

Add more fixtures for mocking objects during the specific collection tests

* Change help message for -p in list subcommand

Give accurate description of what it actually does rather than trying to use language shared between sub commands.

* Disable colorized output in unit test

* Add docs for collection list

* Fix integration test on macOS

The temp file path is really long on macOS, so the warning message gets wrapped
across multiple lines. That make seth grep fail. Switch to matching on a smaller
part of the warning.

* Recreate common path options for collections

Improve help about what the '-p' option does and how it works.

* Remove unnecessary elif after continue statements

* Account for duplicate paths in collections_searh_paths

If someone specifies the same path via '-p' that is the COLLECTIONS_PATHS,
do not list the collections twice.

* Docs updates
2020-02-14 14:00:00 -06:00
Gonéri Le Bouder 68620ced7f
vmware_host_firewall_manager: avoid ansible.netcommon dep (#67386)
We use `ansible.module_utils.compat.ipaddress()` just for trivial IP
validations that are not critical. This module will be ship in the
`ansible.netcommon` collection. If we continue this way, it means
the futur `community.vmware` will carry this extra dependency for
limited benefit.

This commit introduce a new `is_ipaddress()` that provide similar
feature.
2020-02-14 22:05:29 +05:30
Saúl Alonso 3fce39d610
Update azure_rm_aks.py (#66900) 2020-02-14 11:19:44 -05:00
Joost De Cock b763d79b75
Updated description of examples to avoid confusion (#67192) 2020-02-14 11:16:29 -05:00
Pradeep Gorthi 0680a91418
Updating broken link for UCS module (#67396) 2020-02-14 11:15:20 -05:00
Pradeep Gorthi 69e31a440c
Updating UCS Platform Emulator Link (#67400) 2020-02-14 11:13:00 -05:00
Abhijeet Kasurde 6cc326dcf1
VMware: Update VMware module defaults (#66486)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-14 10:00:08 -05:00
Bryan Parry 46205594c2
Fix typos in EC2 VPCE module docs (#67426) 2020-02-14 20:28:25 +05:30
Sloane Hertel 97f011cf94
Add verify subcommand to 'ansible-galaxy collection' (#65618)
* [WIP] Add verify subcommand command to 'ansible-galaxy collection'

* Fix pep8 and use consistent display order

* WIP - docs

* Remove some redundancy in verify display messages by using an error queue for each collection

* Share common code and improve output format

* clean up documentation

* typo

* Apply suggestions from code review

Co-Authored-By: Sandra McCann <samccann@redhat.com>

* Move ModifiedContent namedtuple to the global scope

Add a public metadata property

Rename function to _get_json_from_tar_file

* Add some unit tests

* fix using common functions after rebase

* changelog

* Improve efficiency finding specific installed collections

Improve efficiency by only downloading the tar.gz from the galaxy server for comparison after checking that the collection has been installed

Handle multiple collection paths

Fix up tests

* pep8

* reword that for accuracy

* use more common code and verify collection name

* Improve error message and add documentation

* Update unit tests and add coverage for both local and remote collections that are unable to be located

* Only validate collections using the format collection_namespace.collection_name

Fix tests to reflect that

Fix documentation

* Fix a bug when a local collection does not contain a file

* pep8

* Fix formatting

Co-authored-by: Sandra McCann <samccann@redhat.com>
2020-02-14 08:57:04 -06:00
Nilashish Chakraborty 5ca7a9ea26
Fix tracebacks with search_obj_in_list (#67389)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-02-14 09:46:59 +05:30
Fortinet Core CSE NA c1d8bdb87a
FortiAnalyzer Network Manager Hotfix (#62919)
* Hotfix for FortiAnalyzer HTTPAPI Plugin in response to connection issues introduced in Ansible 2.9.

* Changed _connect behavior per Mr. Case.

Co-authored-by: Luke Weighall <lweighall@users.noreply.github.com>
Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2020-02-13 19:36:48 -05:00
Jordan Borean 4881af2e7e
galaxy - Fix collection install dep resolver for bad versions (#67405)
* Also make sure version is a string and not an int/float
2020-02-13 17:23:17 -05:00
Mark Chappell 90898132e4
CloudRetry/AWSRetry : Disable catching of NotFound exceptions (#67281)
* CloudRetry/AWSRetry : Remove default catching of NotFound exceptions

* Add docs

* Changelog updates from review

* Update unit tests after removing 'NotFound' from default retries
2020-02-13 16:59:00 -05:00
Markus Bergholz 69eec1c98f
elb_target_group - try to handle target_type default when state is absent (#65201)
* try to handle default when state is absent

* remove default target_type

* Update lib/ansible/modules/cloud/amazon/elb_target_group.py

Co-authored-by: Mark Chappell <mchappel@redhat.com>
2020-02-13 15:49:24 -05:00
Martin Krizek a2c620819f
Remove a host from a play after meta: end_host (#66851)
* Remove a host from a play after meta: end_host

* Fix changelog
2020-02-13 15:35:00 -05:00
Mario Lenz 77c19daefa Fix creating IP specific firewall rules with Python 2 2020-02-13 12:32:42 -05:00
AHIL-KANNA-WORK 3b3db88a72
Update vmware_guest.py (#67380)
Incorrect value in example
2020-02-13 12:25:23 -05:00
Jordan Borean 446a0c1b08
win_package - Refactor with msp, appx support (#66931)
* win_package - Refactor with msp, appx support

* Added msi test for ALLUSERS

* Added some msix tests, refactored tests

* Added remaining msix tests

* Enable msix sideloading for tests

* Added remaining exe path tests

* Added basic msp tests

* Remove url options now the util no longer has them

* Fix file version check for older Windows hosts

* Remove no_proxy ansible-test setting

* Use same mechanism of become to copy the file with explicit creds
2020-02-13 16:44:19 +10:00
Jordan Borean 2d9328cb0f
Added Ansible.Service util and win_service_info (#67367)
* Added Ansible.Service util and win_service_info

* Fix up util test

* Sigh forgot to update the test and fix sanity

* Try to make tests more robust

* That didn't work, just check the username

* Betraying Queen and country with this doc fix

* More changes for compat

* More OS compatibility
2020-02-13 14:34:58 +10:00