Commit graph

906 commits

Author SHA1 Message Date
Dag Wieers
9495ddbc21
ACI: Cleanup deprecated boolean behaviour (#55207)
* ACI: Cleanup deprecated boolean behaviour

* Remove from sanity ignore list
2019-04-16 14:13:24 +02:00
Jordan Borean
04cae4134f
Bump deps for ntlm-auth and PSScriptAnalyzer (#55269) 2019-04-16 06:43:41 +10:00
Toshio Kuratomi
a1c8fc37e8 Remove modules which have ended their deprecation cycle
* Remove code but leave the metadata so that they can be listed as
  removed in documentation.
* Remove removed modules from validate-modules ignore
* Remove unittests for the removed nodules
* Remove links to removed modules and add list of removed moduels to the
  2.9 porting guide
2019-04-12 12:57:35 -07:00
Toshio Kuratomi
e5a31e81b6 Add a script to generate a new porting guide
* porting-guide.py is allowed to be Python-3.6+ as it will only be run
  by release engineers
2019-04-12 12:57:35 -07:00
Swartz, Nathan
5e3a7ec1f5 Improve netapp_e_volume module and add unit tests.
netapp_e_volume was refactored for maintainability and its documentation
was improved for better clarity.
2019-04-11 11:16:45 -04:00
Matt Davis
1dc8436ed9
module_utils fixes in collections (#55118)
* module_utils fixes in collections

* fixed Windows module_utils in collections
* fixed more Python module_utils cases (from X import module)
* "medium style" Ansiballz modules now work properly with collections (ie, non-replacer but also not using basic.py)
* added more tests
* split Windows/POSIX exec

* sanity
2019-04-10 22:59:53 -07:00
Dag Wieers
025e9afe58 Windows pslint: Re-enable PSPossibleIncorrectComparisonWithNull (#55065)
* pslint fixes

* Fix up remaining sanity issues

* now fix silly errors I made
2019-04-10 15:30:38 +10:00
Micah Hunsberger
2b049238d6 win_firewall_rule only change arguments passed by user (#54297)
* win_firewall_rule only changes specified arguments
defaults are controlled by com object
integration test for built in rule

* removed ignore psaliases for win_firewall_rule

* direction and action are no longer required
program and service respect default values
documentation updated to reflect that defaults apply to rule creation
added test to disable a rule and verify other values have not changed

* fixed extra whitespace

* Move each description sentance to a new entry
2019-04-10 09:27:31 +10:00
Matt Davis
97446f0eca
Revert "Add a force_replace_host flag to win_domain_membership (#53542)" (#55056)
This reverts commit 85d836171b.

As discussed in WWG IRC meeting, we don't want Get-ADObject to be a dependency of win_domain_membership, and we need to be able to authenticate to the DC in some configs. We can revisit this change a different way for 2.9.
2019-04-09 13:52:23 -07:00
Felix Fontein
df72317b29 Don't complain if type() is used. (#54849) 2019-04-09 15:10:32 -05:00
Sam Doran
3cd98a9fcc Use ansible.module_utils.six in inventory scripts (#55000)
* Use six from ansible.module_utils for inventory scripts

Remove skips from sanity test

* Change all imports of ConfigParser to use module_utils.six.moves

* Remove commented out lines

* Fix six imports
2019-04-09 13:17:59 -04:00
Andrey Klychkov
3eff72e886 postgresql_user: fix doc formatting, added return value, aliases, misc code changes (#54768)
* postgresql_user: refactoring

* postgresql_user: removed line from ignore.txt

* postgresql_user: removed lines from ignore.txt

* postgresql_user: removed lines from ignore.txt, fixes

* postgresql_user: removed lines from ignore.txt, fixes

* postgresql_user: removed lines from ignore.txt, fixes
2019-04-04 10:02:23 +01:00
Zim Kalinowski
69ca89858c
Renaming azure_rm_managed_disk for consistency (#54825) 2019-04-04 12:24:03 +08:00
Andrey Klychkov
40f65a54ec Postgresql privs reformat (#54717)
* postgresql_privs: fix doc format, pgutils

* postgresql_privs: added pgutils, ret value

* postgresql_privs: fix test

* postgresql_privs: fixes

* postgresql_privs: fixes

* postgresql_privs: fixed CI
2019-04-02 16:48:35 +01:00
René Moser
01f63ee871
cloudstack: fix E326 (#54657)
* cloudstack: remove choice list for hypervisor param

* cloudstack: streamline network_type with returned value by the API

* cloudstack: remove E326

* add changelog fragment
2019-03-31 23:36:56 +02:00
Kevin Subileau
09979e899f win_nssm: refactor to fix issues, support check mode and add more features (#45693)
* win_nssm: rename cmdlets to use approved verbs, rename service name parameters

* win_nssm: improve code style and cmdlets ordering

* win_nssm: always escape all command line parameters with Argv-ToString

fix error when the service name contains quotes

* win_nssm: use Fail-Json instead of exceptions and remove global try/catch

* win_nssm: small refactoring, inline some functions

* win_nssm: refactoring - add a generic cmdlet to idempotently set any nssm service parameter

* win_nssm: refactoring - inline some functions

To make the code more malleable for future changes

* win_nssm: change application, stdout_file and stderr_file options type to path

* win_nssm: deprecates app_parameters, rename app_parameters_free_form to arguments, and add support for list of parameters

* win_nssm: add support of check mode

* win_nssm: add working_directory option

* win_nssm: add display_name and description options

* win_nssm: minor changes

* win_nssm: remove some sanity exclusions

* win_nssm: avoid using aliases and minor style fixes

* win_nssm: doc and ui improvements

* win_nssm: remove sanity exclusions

* win_nssm: minor revision

* win_nssm: deprecates dependencies, start_mode, user and password parameters and some choices of state in favor of win_service

* win_nssm: fix style

* win_nssm: add executable option to specify the location of the NSSM utility

* win_nssm: add missing parameter types

* win_nssm: add diff mode support

* win_nssm: avoid displaying depreciation warning if default value is assigned

* win_nssm: fix variable scope

* win_nssm: use the explicit -LiteralPath parameter name instead of -Path

* win_nssm: fix documentation

* win_nssm: add porting guide entries

* win_nssm: add changelog fragment
2019-04-01 05:56:48 +10:00
David Passante
eff1f8851c cloudstack: streamline modules doc (part 6) (#54641)
* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* validate-module errors fixes
2019-03-31 11:09:15 +02:00
David Passante
7f57d88f00 cloudstack: streamline modules doc (part 5) (#54523) 2019-03-29 09:50:15 +01:00
David Passante
601d20117d cs_service_offering: update params in arg spec and documentation (#54511)
* cs_service_offering: update params in arg spec and documentation

* fix documentation formatting error
2019-03-28 21:49:06 +01:00
Slava Maslennikov
85d836171b Add a force_replace_host flag to win_domain_membership (#53542)
* Add a force_replace_host flag to win_domain_membership

Satisfies https://github.com/ansible/ansible/issues/53539

* Rework backticks

* Bump version_added

* Check for existence of current hostname as well; use LDAPFilter during search

* Rename $force_replace_host to $allow_existing_computer_account

* Added docs, porting guide and minor nit in code
2019-03-28 14:36:26 +10:00
Jordan Borean
e2d2874d81
win_user_right - fix non json output issue (#54495) 2019-03-28 12:30:20 +10:00
Toshio Kuratomi
5fb416ae34 Add a script to generate twitter and mailing list announcements
Announcements taken from https://github.com/ansible/community/wiki/RelEng:-ReleaseProcess
and then cleaned up:

* Update issue reporting blurb from feedback from acozine and gundalow
* Add a subject and to line for email output
* Ignore long line tests on the jinja templates (as jinja doesn't give
  enough control to get rid of newlines when text wrapping)
* Skip shebang and compile tests for older pythons since this is a
  release engineer-only script.  (ok'd by mattclay)
2019-03-22 11:23:54 -07:00
Matt Clay
ade6977d66 Fix typo in doc_fragments path. 2019-03-21 15:36:05 -07:00
Ben Carter
f99f88b034 fixing status option in documentation (#53785)
changing status option to statuses in the documentation

Adding choices to the argument spec to match the documentation from AWS.
Adding 'REVOKED', 'FAILED' to statuses documentation to match implementation.

Removing E322, E323 ignores for aws_acm_facts
2019-03-21 15:39:36 -05:00
Matt Clay
39bbadb2fd
Replace no-underscore-variable test with pylint. (#54140)
* Replace no-underscore-variable test with pylint.
* Update orphan handling for sanity test docs.
* Update command for listing tests.
2019-03-20 22:14:22 -07:00
Matt Clay
47f2101e8d Fix no-underscore-variable test. (#54137)
* Ignore lines with comments.
* Detect variables at the start of the line.
2019-03-20 16:08:25 -07:00
Jordan Borean
0bf14d61d0
Add PSCustomUseLiteralPath and update PSSA for pslint (#54080) 2019-03-20 16:26:12 +10:00
Toshio Kuratomi
f5f4948480
Remove nose from unittests (#54055)
* Remove nose from unittests

This PR migrates the last of our unittests from using nose to using
pytest.  We don't need to install nose in our testing environments
anymore
2019-03-19 18:36:45 -07:00
Matt Clay
63ce588382 Update pylint and split runs more to avoid hangs. 2019-03-19 13:17:37 -07:00
David Passante
ef6da8ec5c cloudstack: streamline modules doc (part 4) (#53874)
* cloudstack: streamline modules doc (part 4)

* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* validate-module errors fixes

* cs_network_offering: Rollback of the deletion of the choice list for supported_services param
2019-03-17 08:38:02 +01:00
David Passante
244a9a83aa cs_iso: fix missing param "is_public" (#53740)
* cs_iso: fix missing param "is_public"

* add changelog fragment
2019-03-13 19:06:44 +01:00
David Passante
495c197770 cloudstack: streamline modules doc (part 3) (#53412)
* cloudstack: streamline modules doc (part 3)

* Parameter types added
* Copyright format fixes
* Doc style fixes
* Examples format fixes
* Remove cs_loadbalancer_rule from ignore.txt

* cs_loadbalancer_rule: add "version_added" for params added into the documentation

* cs_loadbalancer_rule: ignore E309 for now

* cs_loadbalancer_rule: remove E309 from ignore.txt
2019-03-12 23:19:07 +01:00
Jordan Borean
f297229b52
Add arg and doc validation for PowerShell modules (#53615)
* Add arg and doc validation for PowerShell modules

* Verify if pwsh exists before running it
2019-03-12 07:56:51 +10:00
Jordan Borean
830a11dd38
test: optimize win_psmodule tests (#53431) 2019-03-11 05:43:21 +10:00
Matt Clay
40318b49b2 Check extensions on changelog fragments. 2019-03-08 22:42:19 -08:00
Matt Clay
7c0bc9e4ac Fix no-assert code-smell regex. 2019-03-08 13:20:20 -08:00
Brian Coca
b94bfed1a6
scan_packages: made adding package managers easier (#49079)
* made adding package managers easier

  added portage support

* moar pkg mgrs and moar info

 - added 'pkg' pkg manager (freebsd)
 - added pip
 - more apt info

* updated clgo

* Updates from feedback

Co-Authored-By: bcoca <bcoca@users.noreply.github.com>

* incorporated more feedback and added docstrings

* moar from feedback

  - made manager list dynamic and names based on class
  - better not found msg
  - made abstract metaclass again
  - test is now init exception
  - module to global
  - better dedupe comments

* more targetted errors/warnings

* added strategy, reordered to conserve priority

* rpm > apt

* move break to top

* fix trate

* piping it

* lines and meta

* refactored common functions

 - moved pip into it's own module
 - cleaned up base clases
 - ensure 'lower' match in package_facts

* missing license

* avoid facts

* update clog

* addressed feedback

* fix clog

* cleanup

* upd

* removed pip as that was removed

* renamed cpan

* added a single line since 2 lines are needed to be

readabnle instead of just 1 line, it is a huge problem otherwise

* fix internal ref

* not intended in this round

* updated as per fb
2019-03-06 12:29:51 -05:00
Dag Wieers
c44e83ee13 rhevm: Fix validate-modules issues (#52436)
This PR includes:

* Adding parameter types
* Fix validate-modules issue
* Improve parameter types and resulting changes

This PR needs to be verified and tested by maintainer(s).
2019-03-06 14:05:14 +00:00
Wojciech Sciesinski
8136e2e4fe Extend win_psmodule - the second attempt, the previous was #46516 (#50621)
* Extend win_psmodule - rebased at 2019-01-07

* Change a way how defined parameters are added to the list

* Correct registering a repository

* Change way how tests for the check_mode: true are run

* Post-review updates

* Post-review updates -2

* Post-review updates -3

* Switch to PowerShell loop

* Minor updates

* Remove variants of an exception handling

* Change error handling
2019-03-06 06:56:55 +10:00
Jordan Borean
6b294eab4d
win_dsc - Add argument validation and other fixes (#53093)
* win_dsc - Add argument validation and other fixes

* Fix doc issues
2019-03-06 06:49:37 +10:00
Matt Martz
a639dc6d88
Add a new check to ensure that module arguments are valid python identifiers (#53278)
* Add a new check to ensure that module arguments are valid python identifiers

* Move the check up higher, out of the if docs block

* Skip validate-modules on py2

* Remove errant alias
2019-03-05 10:26:06 -06:00
Viktor Utkin
b2a7561a7f [win_get_url] feature: Add support checksum to module win_get_url (#51986)
* set valid_until equal to current time + spot_wait_timeout

* Add checksum check for downloaded file.

* refactoring

* fix typo

* add fixes

* mart try,catch handling

* revert lib/ansible/modules/cloud/amazon/ec2.py from upstream

* refactoring

* remove empty lines

* add checksum verification for existing file

* fix current file check

* refactoring destination file check

* add handling exceptions

* refactoring

* Added download file hash data from url

* fix string aligning

* fix bug with uri

* Added get hash from multy-string file

* Added URI support for checksum file location

* refactoing

* Remove any non-alphanumeric characters for hash from url

* fix discussions; add support for PS3

* refactoring

* add size return value

* checkout from upstream for lib/ansible/modules/cloud/amazon/ec2.py

* add Ansible.ModuleUtils.Legacy support; refactoring

* Copyright added

* Checking files size before and after downloading added.

* remove unused code

* Corrected regexp for dotted slashed file name prefix in hash-file

* hotfix typo error; add int tests

* remove legacy module support; split checksum to checksum, checksum_algorithm, checksum_url

* changed default hash algorithm

* Fixed case for ContentLength = -1

* Old comment removed

* fix typo

* Remove file size check before downloading

* add alias to ; fix tests

* adjust tests; fix lint warnings from PSScritpAnalyzer

* workaround for bug in win_chocolatey module on win2008

* remove win_get_url.ps1 from /test/sanity/pslint/ignore.txt

* add checksum_algorithm as retuen value

* first normalise before return Result

* resolve discussions

Signed-off-by: Viktor Utkin <viktor.utkin7@yandex.ru>

* fix discussions
fix http tests as discussed

* fix last discussions

* Reduce code duplication and add idempotency check

* fix sanity issue and remove testing code

* move back to using tmp file for checksum comparison
2019-03-05 20:37:00 +10:00
Matt Martz
f0a63e783d
validate-modules improve empty version_added handling (#53177)
* Improve empty version_added handling

* Remove unrelated ignore
2019-03-01 11:56:33 -06:00
Matt Clay
29c9b4001d Remove invalid validate-modules ignore entry. 2019-03-01 09:04:42 -08:00
Mariusz Mazur
fb4d0d84ec Add kubevirt_cdi_upload module (#52990) 2019-03-01 10:09:01 +00:00
Matt Martz
35f5ca8295 Don't allow an empty version_added 2019-02-28 15:43:46 -08:00
Matt Martz
7f2e724203 Don't document a type for an argument which uses a callable (#53008)
* Don't document a type for an argument which uses a callable
* Update ignore.txt.
2019-02-26 12:12:41 -08:00
Dag Wieers
3ced545d06
validate-modules: Fix some files modules (#52440)
This PR includes:
- fixes to validate-modules issues

All modules already include parameter types.

The remaining files-modules have action plugins, so comparing to the arg_spec only is incorrect.
2019-02-25 13:29:31 +01:00
Dag Wieers
4670e41a30
validate-modules: Fix net_tools modules (#52489)
This PR includes:

* Fixes to open validate-modules issues
* Adding parameter types
2019-02-25 13:27:35 +01:00
Rhys Campbell
7f50f467fe mongodb_replicaset module and test exception (#49690)
* Clean up from previous fork

* Minor doc update

* Fix doc string return type

* Minor doc updates

* Keeping fresh

* Various changes to documentation, cosmetics and code logic

Please test :-)

* Fix typo

* Various small changes as requested

* Remove traceback ref

* try catch changes

* Tidy description

* Correct data type in documentation

* Fix for 4.0
2019-02-25 11:52:07 +01:00