Commit graph

30607 commits

Author SHA1 Message Date
Brian Scholer
9afe87139a
Add win_psrepository_info module (#67594)
* Add win_psrepository_info module

* Change return type

* Add tests for win_psrepository_info
2020-02-27 16:05:37 +10:00
Andrew Klychkov
10feb24870
mongodb_shard: fix doc formatting (#67750) 2020-02-27 08:04:12 +05:30
Mark Chappell
d5c17118ed
s3_bucket - cleanup and test stabilisation. (#66778)
* AnsibleAWSModule related cleanup - s3_bucket

* Add extra information to s3_bucket timeout failures, it's possible the comparisons are doing something weird...

* Move Bucket Encryption boto support logic into the pre-flight checks

* Use the built in required_by logic

* Rework s3_bucket integration tests

* Add a retry around put_bucket_encryption

s3_client.put_bucket_encryption is occasionally dropped on the floor
by Amazon add some logic to retry s3_client.put_bucket_encryption call

* Catch OperationAborted and retry, it is caused by a conflicting change
still being in progress.   (For example an Encryption setting applying)

* Make sure we don't explode if the botocore version's too old

* Review tweaks
2020-02-26 16:54:39 -07:00
Markus Bergholz
9463d28967
read enabled_key_rotation status also in aws_kms_info (#67770)
* read enabled_key_rotation status

* add changelog

* use AWSRetry decorator to prevent api rate limits

* fix pip8
2020-02-26 16:51:04 -07:00
sky-joker
454b043c13 Reflect changed JSON structure than zabbix version 4.4 or more to zabbix_user
add fragments file

Fix several pointed out

https://github.com/ansible/ansible/pull/67475#discussion_r380528775
https://github.com/ansible/ansible/pull/67475#discussion_r380532685

Enable integration test
2020-02-26 15:40:17 -08:00
Paul Belanger
357ae7ec0e
Remove unused import from frr cli plugin (#67790)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-26 16:48:07 -05:00
Andrew Klychkov
dd53c104d7
postgresql_info: move subscription info to corresponding database dict (#67772) 2020-02-26 22:25:16 +01:00
Sumit Jaiswal
d8c5c6eb9d
Add Switchport mode support in newly introduced *_l2_interfaces resource module (#67456)
* fixes 65032
2020-02-26 23:49:00 +05:30
Abhijeet Kasurde
a4da73e961
misc typo fixes (#67775)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-26 10:58:39 -05:00
sky-joker
829a29ef18
Fix to be support for zabbix 4.4 or more and python3 (#67693)
add fragments file
2020-02-26 07:48:29 -05:00
sky-joker
305789144a
Fix to remove unnecessary duplicate line (#67761) 2020-02-26 07:48:15 -05:00
Matt Martz
6e1a59174a
Clean up CONDITIONAL_BARE_VARS warning. Fixes #67735 (#67751) 2020-02-25 16:36:01 -06:00
flowerysong
370f788731
adhoc: Load callbacks before sending v2_playbook_on_start (#67673) 2020-02-25 17:00:08 -05:00
Kevin P. Fleming
4c016e64dd
Update 'server' doc in nsupdate module to avoid DNS names (#67597) 2020-02-25 16:07:55 -05:00
John Nelson
e9f22a2269
win_dns_record: Improve examples documentation (#67744) 2020-02-25 16:03:03 -05:00
Andrew Klychkov
1b5c69deef
mysql_info: remove irrelevant comment (#67753) 2020-02-25 16:00:41 -05:00
Mark Chappell
9d455bed7b
aws_acm Add additional AWSRetry error codes (#67671)
* Cleanup tests

* Auto-Retry on ResourceNotFound and RequestInProgress exceptions

* Use AnsibleModule options for required_if logic

* changelog

* Remove (now) duplicate RequestInProgressException catching

* Allow a single retry when attempting to fetch the information about a cert directly after deleting it.

There is a small chance that it goes away while we pull the details.
2020-02-25 13:48:26 -07:00
Markus Bergholz
99f6f0c832
add key rotation option to aws_kms (#67651)
* add key rotation option

* add changelog fragment

* provide version added as string

* change changelog to minor_changes

* Update changelogs/fragments/67651-aws-kms-key-rotation.yml

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

* prevent key upgrade if key rotation was enabled manually. In that case, the key rotation would be disabled, if not mentioned in the playbook

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

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

Co-Authored-By: Mark Chappell <mchappel@redhat.com>

Co-authored-by: Mark Chappell <mchappel@redhat.com>
2020-02-25 13:30:45 -07:00
Andrew Klychkov
f0159b8870
postgresql_info: add getting publication statistics (#67614)
* postgresql_info: add getting publication statistics

* add changelog

* fix

* fix server_version check
2020-02-25 20:58:23 +01:00
Andrew Klychkov
b9a315a2c0
mysql_db: add dump_extra_args parameter (#67747)
* mysql_db: add dump_extra_args parameter

* add changelog fragment
2020-02-25 20:48:32 +01:00
Abhijeet Kasurde
848aa06cac
Remove unused variables in collection API (#67724)
Remove unused variables in _download_file API

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-25 12:30:53 -05:00
Sloane Hertel
8eb00dd14c
Fix inline vaults for plugins in ensure_type (#67492)
* Fix implicit string - only looked right because of the vault __repr__
* Add tests for strings and implicit strings
2020-02-25 10:42:31 -05:00
Brian Coca
9ea5bb3364
strip spaces for each value in host list lists (#67701) 2020-02-25 09:16:27 -05:00
GomathiselviS
726d6455d8
eos static_routes module added (#65480)
* Adding files for RM static_routes

* Added Integration tests

* Added Unit testcases

* Addressed review comments

* corrected lint errors

* corrected documentation errors

* Lint errors

* corrected test/sanity

* corrected documentation for deprecation

* corrected case sensitivity

* Again Documentation eroor

* Lint errors again

* corrected deprecated module in ignoretxt

* added new gethered,rendered,parsed state checks to unit test

* New code broke the old flow-fixed

* Lint errs

* Added check for running_config

* Add rtt testcase

* Fixed unit tcs

* lint errors

* lint errors

* Modified replaced operation behavior

* updated documentation and tests for delete opration

* fixed shippable errors

* review comments and flake8 error fix

* syntax errors fixed
2020-02-25 07:50:27 -05:00
Abhijeet Kasurde
6f0924a892
Remove unnecessary indent (#67728)
total_size fact is populated if schema is not specified in
postgresql_user_obj_stat_info module.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-25 14:12:56 +05:30
Paul Belanger
81ffc315a4
Remove unused imports for iosxr_acls (#67711)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-24 17:47:35 -05:00
Paul Belanger
bfea5cfca0
Remove unused imports from vyos_firewall_global (#67710)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-24 15:26:42 -05:00
Noboru Iwamatsu
d317cc71c7
s3_bucket: accept NetApp StorageGRID create_bucket response. (#67462) 2020-02-24 13:00:38 -07:00
WilliamVannuffelen
c5ec0fcb34
Setup documentation - windows custom fact variable name (#67690) 2020-02-24 14:58:18 -05:00
Martin Nečas
4b382b78d0
ovirt_vm: add cpu_pinning example (#67612) 2020-02-24 14:41:50 -05:00
as-hbk
e2f1b57299
adds missing alias to win_regedit documentation (#67662) 2020-02-24 14:35:21 -05:00
roxyland
febbb66d71
Change package_license to accept_license (#67676) 2020-02-24 14:28:11 -05:00
Fred-sun
a173ce9630
change intelligence_pack to intelligence_packs (#67686) 2020-02-24 14:25:23 -05:00
Mark Chappell
f520238d60
Migrate a batch of AWS modules to AnsibleAWSModule (1) (#67191)
* Move various Amazon modules over to AnsibleAWSModule

* Remove HAS_BOTO3 logic, it's handled by AnsibleAWSModule

* Simplify argument_spec handling ec2_argument_spec is automatically added by AnsibleAWSModule

* Cleanup boto3 error handling using fail_json_aws

* Migrate simple cases from boto3_conn to module.client()

* Migrate batch modules over to module.client()

* Migrate EFS module over to module.client()

* Comment cleanup

* Use deprecated_aliases in argument_spec rather than custom code

* Cleanup unused imports

* Make use of module.region

* Deprecate batch.AWSConnection it's now dead code
2020-02-24 14:01:14 -05:00
Graeme Davidson
bd26b6c0b4
updated single quote handling to not strip and error on odd number (#67500)
Fixes #67274
2020-02-24 13:45:19 -05:00
GomathiselviS
d283126c31
eos_acls : Add eos acls resource module (#66308)
* Adding files for RM static_routes

* Added Integration tests

* Added Unit testcases

* Addressed review comments

* corrected lint errors

* corrected documentation errors

* Lint errors

* corrected test/sanity

* corrected documentation for deprecation

* corrected case sensitivity

* Again Documentation eroor

* Lint errors again

* corrected deprecated module in ignoretxt

* added new gethered,rendered,parsed state checks to unit test

* New code broke the old flow-fixed

* Lint errs

* Added check for running_config

* eos_acls resource module added

* Corrected errors

* corrected documentation errors

* corrected typo

* Testcases in progress

* Integration tests in progress

* Integration tests

* Added Intergration tcs

* Corrected pylint errors

* Resolving issues due to rebase

* Corrected Typo

* more pylint errors

* more pylint errors

* more pylint errors

* Documentation

* Documentation

* More lint errors

* Fixed Indentation

* Indentation issues - not getting fixed

* Indentation issues - not getting fixed

* Added rtt testcase

* Corrected whitespaces

* addressed review comments

* moved integration tests to common - to support eapi tests

* modification for merge update

* indentation errors

* added line key

* Fixing shippable errors

* fixing doc errors

* fixing doc errors

* fixing doc errors

* fixing doc errors

* fixing indentation

* modified replaced operation

* rebase issue fixed

* Corrected typo

* review comments and flake8 error fixed
2020-02-24 12:27:11 -05:00
Paul Belanger
74e948e6e4
Fix flake8 errors with eos_acl_interfaces (#67695)
Theses were exposed by our collections testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-24 09:47:43 -05:00
James McClune
059a193dff
lib/ansible/plugins/inventory/ini.py: added spacing for error message (#67361)
Signed-off-by: James McClune <falcon78921@users.noreply.github.com>
2020-02-24 09:26:48 -05:00
Rohit
fc05c50b7f
VyOS: firewall global module added (#66800)
* firewall global module

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

* sanity fixed

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

* test updated

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

* sanity fixes

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

* group member handling updated

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

* comments incorporated

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
2020-02-24 09:03:02 -05:00
Nilashish Chakraborty
b818436c5f
Add iosxr_acls RM (#66207)
Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
2020-02-24 18:34:27 +05:30
GomathiselviS
3acd8f6f7f
Fix to - nxos_lag_interfaces not idempotent (#67359)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Adding files for RM static_routes

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Fix to #67169

* corrected rebase spillover

* indentation errors fixed

* modified integration testcase
2020-02-24 07:57:11 -05:00
Sumit Jaiswal
f292f21d86
Fixes nxos_l2_interfaces module traceback if allowed vlans are not preconfigured (#67457)
* fixes 67455

* fix review
2020-02-24 17:44:21 +05:30
Martin Nečas
0d72d2d4d2
ovirt_vm: correct numa nodes (#67611)
* init commit

* update docs

* update numa function name

* correct whitespaces
2020-02-24 04:20:46 -05:00
Alexis Camilleri
feeb380649
scaleway_compute: check image on get instead of list (#67655)
* fix scaleway_compute: check image on get instead of list
* add changelog

Signed-off-by: Alexis Camilleri <acamilleri@scaleway.com>
2020-02-24 11:08:14 +05:30
Xu Yuandong
dbaa421f9d
Some cloudengine modules miss "import __future__" and "mateclass", update to add them. (#67634)
* update doc missing future & mateclass.

* update ignore.txt.

* add a changelog.

* update changelog.
2020-02-22 17:35:18 +01:00
Abhijeet Kasurde
6936e7b698
Handle NoneType error in vmware_host_service_info (#67641)
Handle NoneType error occured due to accessing host system service info
in vmware_host_service_info module.

Fixes: #67615

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2020-02-22 21:46:18 +05:30
Brian Coca
00b70bf36a
Show field instead of value (#59926)
* Show argument name vs value on failed conversion

  generally more useful to user as they might set values indirectly

* clog
2020-02-21 17:01:09 -05:00
Moritz Grimm
79dfae9624
copy: ensure _original_basename is set: fixes #47050 (#47238)
* fixed #47050

* added changelog fragment

* added quick and basic test

* Revert "added quick and basic test"

This reverts commit 75f4141656.

* added better tests

* now also creating files to copy on the remote

* removed tests for recursive copying which is not supported by remote_src
2020-02-21 12:55:12 -05:00
Mark Chappell
d74ed41a4c
AnsibleAWSModule add 'region' method (#66988)
* Add get_aws_region to module_utils.ec2 and region to AnsibleAWSModule

* Add example use

* Add changelog
2020-02-21 11:58:02 -05:00
Alexis Camilleri
f70dc261cc
fix(scaleway): use jsonify for application/json content-type only (#66957)
* fix(scaleway): use jsonify for application/json content-type

* add changelog
2020-02-21 17:14:22 +01:00
GomathiselviS
600d6278f9
eos : Add resource module eos_acl_interfaces (#67137)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Adding files for RM static_routes

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* acl_interfaces

* acl_interfaces in progress

* Adding unit testcases

* Addresses Paul's review comments

* worked on shippable errors

* indentation errors

* Modified unit tests

* indent issues

* indent issues

* eos specfic changes

* making the integration tcs skip the zuul run

* addressed review comments

* added required:True documentaiton
2020-02-21 10:05:16 -05:00
Sloane Hertel
195ded6527
Update AWS modules that use to implicitly retry on NotFound errors (#67369)
* Update AWS modules that expect to retry on exception codes that match the regex '^\w+.NotFound'

Modules should intentionally define any extra error codes

Use a waiter for ec2_vpc_igw after creating an internet gateway instead of retrying on InvalidInternetGatewayID.NotFound
2020-02-21 08:17:24 -05:00
Xu Yuandong
347e19178d
Some cloudengine modules miss "import __future__" and "mateclass", update to add them. (#67635)
* update doc, missing future & metaclass type.

* update ignore.txt

* add a changelog.

* update changelog.

* rename changelog.

* update changelog.
2020-02-21 11:54:45 +01:00
Jordan Borean
61f2ae1c26
Fix runas as collection become plugin (#67638) 2020-02-21 19:23:53 +10:00
Mark Chappell
021ba057ab
sns_topic ensure "changed" works as expected when managing delivery policies (#60944)
* sns_topic: (integration tests) Move the tests over to using module defaults

* sns_topic: (integration tests) Add test for behaviour of changed when using delivery_policy

* sns_topic: ensure "changed" behaves properly when managing delivery policies

- a delivery_policy isn't an IAM policy, so compare_policies didn't cope with it
- AWS automatically adds an additional option when you set an HTTP delivery
  policy

* Parse the delivery policies so we can test the changes properly
2020-02-20 17:15:27 -07:00
Mark Chappell
9c6495d4d4
elb_target / elb_target_info : Integration test fixups (#61256)
* Update AWS policy to enable management of TargetGroups

* elb_target: (integration tests) migrate to using module_defaults

* elb_target: (integration tests) lookup the AMI by name rather than hard coding AMI IDs

* elb_target_info: (integration tests) finish rename of integration test role

* elb_target: (integration tests) rename various resources to consistently use {{ resource_prefix }}

* elb_target_info: (integration tests) Migrate to using module_defaults

* elb_target_info: (integration tests) Lookup AMI by name rather than hard coding AMI IDs

* Apply suggestions from code review

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

* elb_target: (integration tests) Remove the 'unsupported' alias

* Try bumping up the timeout

* Rules don't permit 'shippable' (resource_prefix uses this when run in shippable)

* Try bumping up more timeouts :/

* Avoid double evaluation of target_health assertion

* Simplify target_type usage a little (rather than constantly performing a lookup)

* mark elb_target tests 'unstable' for now, they're slow

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2020-02-20 17:13:09 -07:00
Matt Clay
65646179f1 Fix become for network_cli in collections. 2020-02-20 15:13:39 -08:00
Nabil BENDAFI
1c15a485c2 Allow SSH synchronization between Docker containers 2020-02-20 17:44:40 -05:00
Steve Boyd
574033cebb
Spelling fix, win_chocolatey_facts.py (#67617)
Spelling fix - "path" not "pth"
2020-02-20 11:33:42 -06:00
Alan Rominger
cffead4631
Do not error if collection specified null dependencies (#67575) 2020-02-20 11:23:23 -05:00
Paul Belanger
2de4e55650
Remove unused import for six in ipaddr filter (#67595)
This was caught in our ansible.netcommon collection testing.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-20 10:58:47 -05:00
Mark Chappell
335108ac62
Refactor aws_kms to bring down the complexity score (#66037)
* Remove dead code key_matches_filter/key_matches_filters

* Fail more cleanly when we don't recognise the 'shape' of KMS policy

* Refactor aws_kms to bring down the complexity

* Minor docs tweaks

* Changelog fragment

* Fixups from review
2020-02-20 09:35:41 -05:00
Andrew Klychkov
0dc08f6b97
postgresql_info: add subscription info (#67464)
* postgresql_info: add subscription info

* add changelog
2020-02-20 09:59:45 +01:00
Min Pae
23995fef48
Add create_option to disk definitions (#62357)
Add create_option parameter to disk definitions to control whether disks
are created from the base image or are new disks being added to the VMs.
Currently, custom images with data disks defined in the image cannot be
used to launch VMs unless data disk definitions are excluded.  This
prevents the data disks from being modified/extended (like selecting a
different SKU or making the data disks bigger).  Exposing this option
allows VMSS VMs to be created with base images that have data disks
while extending their definitions.

Addresses #61804
2020-02-20 02:19:48 -05:00
Jordan Borean
36def8bf03
Use Ansible to load ps module utils in arg spec checker (#67596)
* Use Ansible to load ps module utils in arg spec checker

* Added changelog and note
2020-02-20 14:32:21 +10:00
Paul Belanger
b54e64bbc9
Remove unused import for iosxr acl_interfaces (#67587)
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-02-19 20:10:25 -05:00
James Milligan
ec967bce76
Fix typo with devel warning config option (#67590) 2020-02-19 18:24:05 -05:00
Felix Fontein
c520d70bf4
Templating: make sure only one variable results are cached (#67429)
* Make sure only one variable results are cached.

* Add changelog.

* Add test.
2020-02-19 18:04:01 -05:00
Matt Martz
c61c0f7ad5
Add warning when running devel (#67502)
* Add warning when running devel. Addresses #67362

* Add config entry to disable devel warning, so it doesn't impact CI

* Update warning about using devel
2020-02-19 15:17:42 -06:00
Mark Chappell
3aae025cce
cloudfront_distribution: Always add field_level_encryption_id to cache behaviour (#61271)
* cloudfront_distribution: (integration tests) Migrate to using module_defaults

* cloudfront_distribution: (integration tests) Use the ID rather than the alias

Using aliases requires providing a valid SSL certificate, as such we're not longer able to test using an arbitrary hostname

* cloudfront_distribution: (integration tests) Make sure we delete the test s3 bucket when tests fail

* cloudfront_distribution: field_level_encryption_id is now a mandatory field always add it

Setting the field to an empty string has the same effect as the original behaviour.

* Copy & Paste fixup

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

Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
2020-02-19 15:42:46 -05:00
Mark Chappell
052e8b7be4
ec2_tag - Deprecate the use of state=list (#66840)
* ec2_tag - Deprecate the use of state=list

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

* Add changelog and porting_guide entries

Co-authored-by: flowerysong <junk+github@flowerysong.com>
2020-02-19 13:54:34 -05:00
dexpl
a409100205
Update win_dsc.py (#67563) 2020-02-19 13:28:14 -05:00
Christophe Drevet-Droguet
e867535a57
regex_replace multiline support (#65051)
* document multiline parameter for regex_replace
* add changelog fragment
* tests for regex_replace_multiline
2020-02-19 12:19:40 -05:00
Mark Chappell
6d97943c82
New module ec2_tag_info - fetch the tags from EC2 objects (#66839)
* New module ec2_tag_info - fetch the tags from EC2 objects

* Add ec2_tag_info to group/aws

* Add basic test case
2020-02-19 11:31:54 -05:00
Robert Rotaru
5928918352
vmware_guest_disk storage DRS bugfix for get_recommended_datas… (#67221)
* Fix sDRS recommendations

Fixes storage DRS recommendation call for add disk scenario

* Undo changes to whitespacing

* Undo changes to whitespacing (pt. 2)

* Add datastore_cluster prop to disk defaults

* Create 67221-vmware-guest-disk-storage-drs-fix.yml
2020-02-19 19:12:27 +05:30
Arvind Shyamsundar
faa9533734
Specify priority for VMs in Azure VM scale sets (#65226)
Adds support to create VMSS with low-priority VMs through a new optional
parameter. The default is to create a VMSS with Regular priority VMs.
https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-use-low-priority
for details.
2020-02-19 05:18:50 -05:00
Stéphane Travassac
a7197a4320
zabbix: new module zabbix_host_events_info (#56162) 2020-02-19 10:22:59 +01:00
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
Felix Fontein
11e75b0af2
Fix broken links in crypto, docker and hetzner modules. (#67360) 2020-02-12 16:41:40 -05:00
tchernomax
53e043b5fe
combine filter: fine list handling (option b) (#57894) 2020-02-12 16:40:36 -05:00
Fortinet Core CSE NA
33f136292b
Hotfix for FortiManager Network Connection Plugin (#62534)
* Hotfix for connection manager persistent connection initialization.

* PEP8 Fixes

* First Round of fixes requested by Qualthos.

* Removed _connection check per Mr. Case.

* Somehow the wrong version got sent... should be all good.

Co-authored-by: Luke Weighall <lweighall@users.noreply.github.com>
Co-authored-by: Nathaniel Case <this.is@nathanielca.se>
2020-02-12 14:30:59 -05:00
Mark Chappell
8d574c3770
AnsibleAWSModule related cleanup - redshift (#66779)
* AnsibleAWSModule related cleanup - redshift

* Apply a backoff on modify_cluster to cope with concurrent operations

* Add AWS 'hacking' policy to allow creation of Redshift ServiceRole

* Adding the retry policies makes the redshift test suite more reliable
2020-02-12 11:17:18 -07:00
Sandra McCann
a6bb3ae291
fix some broken links (#67345) 2020-02-12 10:47:00 -06:00
GomathiselviS
4ec1437212
Fix to - eos_vlans using state parameter replaced is giving odd behavior (#67318)
* Added fix for bug # 54400

* Adding files for RM static_routes

* Added Integration tests

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* Adding files for RM static_routes

* Added Integration tests

* Corrected lint errors

* Added fix for bug # 54400

* Revert "Added fix for bug # 54400"

This reverts commit bf42db4269.

* Revert "Adding files for RM static_routes"

This reverts commit dafdd92d43.

* Revert "Added Integration tests"

This reverts commit 129dc87682.

* fix to bug #67313

* fixing rebase issue

* fixing rebase issue

* addressed review comments

* addressed review comments
2020-02-12 11:12:12 -05:00
Derek Winters
bc2419c47c
don't update nios_a_record object when running in check mode (#67145) 2020-02-12 20:10:10 +05:30
Denis Krienbühl
a4ec18d8a3
Cloudscale Regions and Zones Support (#67165) 2020-02-12 14:06:41 +01:00
Felix Fontein
8ff62799c9
AnsibleModule.load_file_common_arguments: allow to override path (#61659)
* Allow to overwrite path in AnsibleModule.load_file_common_arguments

* Use path override.

* Add changelog.
2020-02-12 12:52:36 +01:00
Andrew de Quincey
d1846b96c0
cope with an ASG instance not having a launch config any more (#57737) 2020-02-12 05:54:58 -05:00
petoju
8ac0bbcbf6
mysql_replication: add option to fail on error (#67322) 2020-02-12 12:18:51 +05:30
Felix Fontein
f6815040fd
add_file_common_arguments: fix defaults and tpyes, improve sanity checking (#67243)
* Make validate-modules stop ignore FILE_COMMON_ARGUMENTS.

* Add types to FILE_COMMON_ARGUMENTS and update document fragment to match it.

* Update ignore.txt.

* Add changelog.
2020-02-12 01:44:11 -05:00
Gonéri Le Bouder
08db603262 vmware_host: fix doc syntax error
Adjust the `DOCUMENTATION` section to get a proper rendering of the
`folder` example.
2020-02-11 18:23:13 -05:00
Matt Clay
efc5d62c49 Use a custom test module for module_defaults test.
This avoids a dependency on a module which will not remain in the repo after migration.
2020-02-11 13:59:33 -08:00
Baptiste Mille-Mathias
3be0795ea3
Fix examples to use from_yaml filter with lookup (#65424)
The documentation says to use `from_yaml` filter when using `lookup`  from node executor. Now the examples do too.
2020-02-11 15:36:08 -06:00
Piotr Stawarski
a0247d13d8
New magic var: ansible_config_file (#66085)
* Add `ansible_config_file` magic variable

* Add ansible_config_file to INTERNAL_VARS

* Add changelog fragment

* Update Special Variables docs
2020-02-11 15:49:55 -05:00
Sean Hsu
4967224248
Update digital_ocean_droplet.py (#66794)
* Update digital_ocean_droplet.py

here's new term of `ssh_keys` from `SSH key (numeric) ID` and in fact it's fingerprint. correctly term so people can easily know how to do it.

* Update digital_ocean_droplet.py
2020-02-11 15:14:50 -05:00
Matt Warren
a8a89b7102
Update yum.py (#67252)
Move the simpler name list example to the top of EXAMPLES.
Those with v2.11 loop deprecation warnings will be looking for a solution.
2020-02-11 14:03:28 -05:00
Noboru Iwamatsu
28071daab8
s3_bucket: fix condition checking of requester_pays param. (#64010) 2020-02-11 10:57:09 -07:00
Justin Haefner
1867ff4013
Update mso_schema_site_anp.py (#67099)
Under Examples > Query a specific site ANPs: the example was missing the "anp: ANP1" to query.
2020-02-11 11:52:57 -06:00
Sebastian Thörn
d273e9758e
Update group.py (#67309)
Added example with gid-param
2020-02-11 11:37:21 -06:00
Milutin Jovanović
8a2ac8f76a
Fixing typo in regex escape. (#67236) 2020-02-11 11:23:58 -06:00
Andrew Klychkov
a86524b2bb
Bugfix of 65525: proxysql in check_config TypeError: tuple indices must be integers, not str (#66850) 2020-02-11 10:53:42 -05:00