New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add exception handling to win_domain_controller #58234
Conversation
Also it would be great if you could add a changelog similar to https://github.com/ansible/ansible/pull/53480/files#diff-0b9ea3a63f047de3086e081e4eb479f2R3 for the module. |
closing and reopening to trigger the ci |
This needs to be rebased in order for tests to run properly. |
The test
|
b2ae13f
to
304af42
Compare
As requested by PR review in ansible#58234 (comment)
rebuild_merge |
Looks like the bot is having issues, manually rerunning tests to ensure it isn't stale before merging. |
Feel free to backport this to stable-2.8 if you wish https://docs.ansible.com/ansible/latest/community/development_process.html#backporting-merged-prs. |
* Add exception handling to win_domain_controller * Add changelog * Fix PSUseDeclaredVarsMoreThanAssignments * Remove dns domain cannot be resolved error message As requested by PR review in ansible#58234 (comment)
* Add exception handling to win_domain_controller * Add changelog * Fix PSUseDeclaredVarsMoreThanAssignments * Remove dns domain cannot be resolved error message As requested by PR review in ansible#58234 (comment)
* Add exception handling to win_domain_controller * Add changelog * Fix PSUseDeclaredVarsMoreThanAssignments * Remove dns domain cannot be resolved error message As requested by PR review in #58234 (comment)
SUMMARY
Add error handling for two exceptions.
ISSUE TYPE
COMPONENT NAME
win_domain_controller
ADDITIONAL INFORMATION
If a user specifies a domain to join that cannot be resolved by dns, the Install-ADDSDomainController command throws an Microsoft.ADRoles.Deployment.Common.Tests.TestFailedException exception.
If the module is either invoked twice without a reboot, or a reboot is pending for another reason the Install-ADDSDomainController command throws an Microsoft.DirectoryServices.Deployment.DCPromoExecutionException exception with Errorcode 15.
I added error handling for both of them, so that a user can handle them from within the playbook.