Commit Graph

1186 Commits (aeb0245ebd0ab6c51da7132e5c03ab6eb76e03a2)

Author SHA1 Message Date
pratikgadiya12 393e4a41d0 Added support to create and delete multiple databases in MySQL (#58602)
* Added support to create/delete mulitiple databases in MySQL

Fixes: #58370

* Added additional tests cases and fixed documentation changes

* Code refactoring and added tests for better test coverage

- Removed db_exists usage from most of the code. Used existence_list
 and non_existence_list instead

- Added additional tests to cover all scenarios w.r.t creation and deletion
 on multiple databases

- Added tests for dump operations

* Minor fix

* Minor fix - create check mode test

* Added dump tests for better dump tests coverage

* Removed minor database connection details

* fixed error

* Added test case for import operations

* Code refactoring and review fixes

- Added dump all test case

* Fixed review comments

* Minor review comment fixes

* Altered db_create return value

* Removed db_list and altered "does exist" to just "exist"

* Kept db and db_list in module.exit_json

* Refactored tests

- Added removal of dump2 file

* Moved import tests to state_dump_import file

* Removed import tests from multi_db_create_delete

* Updated porting guide, added RETURN block

* Minor identation fix

* Added validation to check if databases are dumped
5 years ago
Hannes Ljungberg 0e8eb1d17f pip: Remove unused option use_mirrors and remove all ignore.txt entries
PR #58977

* Remove unused option use_mirrors

* Add changelog fragment
5 years ago
Sam Doran d2edf1d435 User - Create parent directories if they do not exist in the specified home path (#51043)
* Create a user home directory if it has parents that do not exist

The useradd command line tool does not create parent directories. Check if the specified home path has parents that do not exist. If so, create them prior to running useradd, then set the proper permission on the created directory.

Add tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Use dict for default user group in tests

Signed-off-by: Sam Doran <sdoran@redhat.com>

* Fix tests

Signed-off-by: Sam Doran <sdoran@redhat.com>
5 years ago
James Cassell 28259ee247 dzdo: fix password prompt (#59208) 5 years ago
Matt Davis 277690bcc6 add changelog 5 years ago
Brian Coca c2253c8133
Allow for no role_versions to be present (#56519)
* Allow for no role_versions to be present

  fixes #46650

  better info on fetch, ensure list return

* use correct to_
5 years ago
Brian Coca 48d4d6ec69
Stop ignoring merge hash behaviour in inventory (#58460)
* stop ignoring merge hash behaviour in inventory

fixes #58120

* added porting note

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>
5 years ago
Brian Coca a39b721db5
fixes to config manager (#58530)
* skip unreadable ansible.cfg

* all types should check for type

* patch access for tests and fix tests that relied on missing files not being checked
5 years ago
Hannes Ljungberg 6f94995b52 npm: Validate all option types (#58965)
* Add type validation for name, version and registry
* Add changelog fragment
* Remove ignore of E337 and E338
5 years ago
Matt Davis d28f25d118
patch ansible-connection collection plugin loading (#59119) 5 years ago
Jonathan f0eaf1fb39 Module mail : Add Date header (#59080)
* Mail module : add date header (#58808)
5 years ago
Martin Krizek 4898b0a4a2 group: detect duplicate GIDs when local=yes (#58469) 5 years ago
Alvaro Olmedo Rodriguez a1dcba63b3 java_keystore - Prefer SHA256 and solve SHA256 keytool in java11 version (#57302) 5 years ago
Kevin Dwyer ec35cbc437 Pass allow_unauthenticated when installing a deb directly - allowing unauthenticated dependencies (#58771)
* Pass allow_unauthenticated when installing a deb directly - allowing unauthenticated dependencies.

* Add changelog for ansible/ansible#58771
5 years ago
shiro 644eead954 Fix docs for yum_repository.py (#59068)
* The description has been replaced with proxy_password and proxy_username.
* Rename 59068-fix doc for yum_repository.py to 59068-fix_doc_for_yum_repository.yml
5 years ago
Felix Fontein 8d6f1846a6
docker_* modules: improve tag validation and requests error handling (#58791)
* Add method to validate docker tags.

* Validate tag option of docker_image.

* Fix regex. Always return boolean, not None vs. Matcher object.

* Also catch requests errors.

* Linting.

* Add changelog.
5 years ago
Felix Fontein fa7c387f9b docker_container: add support for nocopy mode (#59043)
* Add support for nocopy mode.

* Add changelog.
5 years ago
Hannes Ljungberg 34a68fa0fb pip: Document option types and validate name elements
PR #58966

Also:
* Validate that name elements are strings
5 years ago
Martin Krizek aea5b795c0 Make ansible_index_var accessible as a magic var (#59030) 5 years ago
Brian Coca adea964c3e
Fix gather_facts error/skipped reporting (#58927)
now give back full output from each module executed
 fixes #57204
5 years ago
Brian Coca a7b14ec1be
Fix strat inv (#58982)
* Fix strategy functions that update inventory

* added tests
5 years ago
pratikgadiya12 e8f4ebb22c nmcli: Argument vlanid (int) is changed internally to string (#58963)
* Argument vlanid (int) is changed internally to string
* Modified test case to check vlan id

Fixes: #58949
5 years ago
Valeriy Zabawski cc4dc075f7 Adds minor improvements to 'zabbix_actions' module (#58379)
Changes:

    1. Update mandatory arguments in accordance with Zabbix API.
       Only esc_period, eventsource and name fields are mandatory.

       Reference: https://www.zabbix.com/documentation/3.0/manual/api/reference/action/object

    2. Add default values to argument options in order to prevent "TypeError: 'NoneType' object is not iterable" error.

    3. Add new condition operators (introduced in Zabbix 4.0 and 4.2)

    References:
      - https://www.zabbix.com/documentation/4.2/manual/api/reference/action/object#action_filter_condition
      - https://www.zabbix.com/documentation/4.0/manual/api/reference/action/object#action_filter_condition

    4. Update module documentation
5 years ago
flowerysong c513c1e2d3 aws_s3: Improve ETag handling (#46332)
* cosmetic: Remove useless call to ec2_argument_spec()

* aws_s3: Improve ETag handling

* Extract ETag calculation into a utility function for reuse by
  aws_s3_sync.
* Reduce code duplication in put/get by restructuring the logic
* Only calculate ETag when overwrite == different
* Fail gracefully when overwrite == different and MD5 isn't available
  (e.g. due to FIPS-140-2).

* aws_s3: clean up integration tests

Clean up tests, add tests for overwrite settings in both directions.
5 years ago
Pilou b58c64e3b1 consul_session: ensure empty result is handled (#58694) 5 years ago
Matt Martz d1afcbced1
Cache handler name for included handlers. Fixes #58769 (#58780) 5 years ago
Pilou ef1cf2d2e8 consul_session: ensure scheme parameter is used (#58692)
* Ensure an error occurs when unknown scheme is used
* consul_session: don't ignore 'scheme' parameter
5 years ago
Martin Krizek 7346b699ee
Use templated loop_var/index_var when looping include_* (#58866)
Fixes #58820
5 years ago
Jordan Borean b6791e6ae3
ansible-galaxy: add collection sub command (#57106)
* ansible-galaxy: add collection init sub command

* Fix changelog and other sanity issues

* Slim down skeleton structure, fix encoding issue on template

* Fix doc generation code to include sub commands

* Added build step

* Tidy up the build action

* Fixed up doc changes and slight testing tweaks

* Re-organise tests to use pytest

* Added publish step and fixed up issues after working with Galaxy

* Unit test improvments

* Fix unit test on 3.5

* Add remaining build tests

* Test fixes, make the integration tests clearer to debug on failures

* Removed unicode name tests until I've got further clarification

* Added publish unit tests

* Change expected length value

* Added collection install steps, tests forthcoming

* Added unit tests for collection install entrypoint

* Added some more tests for collection install

* follow proper encoding rules and added more tests

* Add remaining tests

* tidied up tests and code based on review

* exclude pre-release versions from galaxy API
5 years ago
Sam Doran 1c2c1c15d0 dnf - fix error formatting of module name in error message (#58647) 5 years ago
Shachaf92 7ddcaafee5 many pslint fixes (#55862)
* Handles:

PSAvoidTrailingWhitespace
PSAvoidGlobalVars
PSAvoidAssignmentToAutomaticVariable
PSAvoidUsingCmdletAliases
PSAvoidUsingWriteHost
PSUseDeclaredVarsMoreThanAssignments
PSUsePSCredentialType
PSAvoidUsingPositionalParameters
PSAvoidUsingEmptyCatchBlock
PSAvoidUsingWMICmdlet

Replaced Write-Host with Write-Output
Added smart reboot check for win_domain feature installation
Modify the Creation of the pagefileto fit to CIM
Changelog fragment addition
Ignore.txt without fixes

* Changes after community reviews

* Change Out-Null to '> $null'

* Fixes after jborean93 comments

* Test

* Revert "Test"

This reverts commit 35c5c0648fa9d2868a18094d84954e53ffa28880.

* Removed all  > $null since they broke the module since the output got dumped

* run test again

* Revert "run test again"

This reverts commit 80eaf07143f9d8cb0116cbbc68a6a69c0ace840c.

* Changes after community review

* ignore PSUseDeclaredVarsMoreThanAssignments that are on a diffrent PR

* CI failed on extra line in ignore.txt

* Review changes

* PSlint errors

* Trail space

* send to null breaks the tests for  Set-Workgroup

* Lint stuff

* win_domain_user issue of indent.

* Update win_domain_user.ps1

* Update win_domain_membership.ps1

* Fix redirect to null

* lint space issue

* removed return from set-workgroup

* removed send to null
5 years ago
Will Thames 88364d4cfd Add purge_tags to s3_bucket to allow preservation of existing tags (#58754)
* Add purge_tags to s3_bucket to allow preservation of existing tags

Adding `purge_tags` with default `True` to maintain existing behaviour
allows users to set it to `False` to preserve existing tags

Fixes #29366

* s3_bucket: Add further tests and improve tag handling further

Additional tests for purge_tags: False suggested some incorrect
logic and thus further improvements

Increase wait timeout on bucket deletion as it wasn't always completing
in the default 100 seconds
5 years ago
Abhijeet Kasurde 79fdc2190a role: Fix role's hash_params (#55263)
* role: Fix role's hash_params

Fix based upon work done by alikins.

Fixes: #20596

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>

* review comments

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Shachaf92 5b953581b4 win_domain_user - MAke the query user try catch block more accurate (#58782)
* win_domain_user - MAke the query user try catch block more accurate for missing identity

* change to minor_changes

* Update win_domain_user-make-query-try-catch-accurate.yml

* Update win_domain_user-make-query-try-catch-accurate.yml
5 years ago
Klaas Demter faf50dbace Fix nagios module to recognize if file exists and is fifo pipe (#58569)
add felixfontein suggestion to changelogs/fragments/58569-nagios-fifo-fix.yaml

Co-Authored-By: Felix Fontein <felix@fontein.de>
5 years ago
Joseph 4f642daae5 Correct machinectl become plugin function arguments (#58734)
* Correct get_option function name and change flags to become_flags

* Remove the '--' from the returned command

* add changelog fragment

* change changelog fragment description

* move the -q argument to machinectl before the shell argument to resolve issues with machinectl v230 (see #56571)
5 years ago
Abhijeet Kasurde 1bd91279d0
Fixed fail_json call in command module (#58615)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Shachaf92 a6b7d0d00b win_domain_user and win_domain_group: add created result boolean (#57901)
* win_domain_user and win_domain_group: add created result boolean

* Fix YML

* add docs

* brackets

* Update win_domain_group.py

* Update win_domain_user.py

* Update win_domain_user.ps1

* fix indent
5 years ago
Shachaf92 07edcab051 win_acl: Fix problems with special IDRef in different languages than english (#57281)
* Change special id ref recognitionto avoid language diff

* Changelog added

* specialIdRefPrefixes to array

* Changed to the more generic option
5 years ago
Shachaf92 e0b8bc1ef9 win_firewall_rule: Only report changed when change is made (#57267)
* Fix bug https://github.com/ansible/ansible/issues/44450

* Added tests

* I will make this CI work

* Update win_firewall_rule.ps1
5 years ago
Shachaf92 6e319ff088 win_psmodule - Missing SkipPublisherCheck in Prerq installations (#58090)
* win_psmodule - Missing SkipPublisherCheck in Prerq installations

* Handle different minors of PS5

* community revisions

* Update win_psmodule.ps1
5 years ago
Shachaf92 48a518d9a3 win_get_url - Fix proxy_url not used correctly (#58738) 5 years ago
Andrey Klychkov 6cf722fed6 postgresql_query module: add autocommit parameter (#58704)
* postgresql_query: add autocommit parameter

* postgresql_query: add autocommit parameter, add CI tests

* postgresql_query: add autocommit parameter, add a changelog fragment

* postgresql_query: add autocommit parameter, fix sanity

* postgresql_query: add autocommit parameter, cosmetic fix
5 years ago
Pierre Riteau 1eb3fba51f Fix os_quota when volume service not available (#57364)
os_quota checks the current quotas for compute, network and volume
services and fails when no volume service is found in the catalog.

Since openstack test deployments without volume services are common,
os_quota shouldn't fail if such service is missing.

This was originally fixed in d31a09ceb7
and later adapted to catch exceptions raised by shade. Since then, this
module moved to using openstacksdk, which doesn't catch the exception
raised by keystoneauth1.

Fixes #41240
5 years ago
Brian Coca 9808ffecc7
Add JSON output option to ansible-doc (#58209)
* allow json from ansible-doc

* save the var

* try to yaml load

* let examples stay as text blob
5 years ago
Brian Coca ee4cba1b85 ensure bytes in run_command (#58411)
* ensure we pass bytes to run_command

* changed tests for new behaviour

* dont b the pytest

* fixes by sivel
5 years ago
lijok 63bdd0d6cd VMware: looking up maxMksConnections in incorrect location (#58061)
maxMksConnections is contained in vim.vm.ConfigInfo not vim.vm.VirtualHardware

Fixes: #58060

Signed-off-by: lijok <28689084+lijok@users.noreply.github.com>
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
5 years ago
Andrey Klychkov e5203a0f39 postgresql_ext: add a changelog fragment for PR 58381 (#58634) 5 years ago
Pluggi 7f15331510 Add build.target option to docker_image module (#58487)
Signed-off-by: Antoine Bardoux <pluggi512@gmail.com>
5 years ago
Jordan Borean c260721ce5
win_domain_user: do not hide error on failures (#58357)
* win_domain_user: do not hide error on failures

* Was a bit too overzealous in the removal

* Remove uneeded sanity ignore rule
5 years ago