Skip to content
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

win_updates: add scheduled tasks back in for older hosts #38708

Merged
merged 7 commits into from May 23, 2018

Conversation

jborean93
Copy link
Contributor

SUMMARY

Added scheduled tasks back to the win_updates module. It will optionally run the update process with the scheduled task if become was not used. If become is not used then the older behaviour is run.

Fixes #38364

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

win_updates

ANSIBLE VERSION
devel

@ansibot
Copy link
Contributor

ansibot commented Apr 13, 2018

@ansibot ansibot added bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. windows Windows community labels Apr 13, 2018
@ansibot
Copy link
Contributor

ansibot commented Apr 13, 2018

The test ansible-test sanity --test pslint [explain] failed with 4 errors:

lib/ansible/modules/windows/win_updates.ps1:60:5: PSUseDeclaredVarsMoreThanAssignments The variable 'FormatEnumerationLimit' is assigned but never used.
lib/ansible/modules/windows/win_updates.ps1:62:14: PSUseApprovedVerbs The cmdlet 'Run-Updates' uses an unapproved verb.
lib/ansible/modules/windows/win_updates.ps1:368:10: PSUseApprovedVerbs The cmdlet 'Run-Natively' uses an unapproved verb.
lib/ansible/modules/windows/win_updates.ps1:434:10: PSUseApprovedVerbs The cmdlet 'Run-AsScheduledTask' uses an unapproved verb.

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Apr 13, 2018
@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 13, 2018
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label Apr 13, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 24, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels May 2, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. core_review In order to be merged, this PR must follow the core review workflow. and removed core_review In order to be merged, this PR must follow the core review workflow. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 9, 2018
Copy link
Member

@nitzmahone nitzmahone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine, but since the action is already poking the host before starting anyway, maybe we should check version and only skip the become for old hosts? I really hate to fall back to the jankier behavior all the time...

@jborean93
Copy link
Contributor Author

jborean93 commented May 20, 2018

@nitzmahone where do we poke the host before the win_updates module is called? I'm pretty sure the first command run is the win_updates module itself.

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels May 20, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. new_plugin This PR includes a new plugin. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 23, 2018
@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels May 23, 2018
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 23, 2018
@nitzmahone nitzmahone merged commit 457bccf into ansible:devel May 23, 2018
@jborean93 jborean93 deleted the win_update-scheduled-task branch May 23, 2018 20:22
gothicx pushed a commit to gothicx/ansible that referenced this pull request Jun 9, 2018
* win_updates: add scheduled tasks back in for older hosts

* Fixed up typo in category name error message

* Fixed up some minor issues after merge

* added changelog fragment

* Default to become but add override to use scheduled tasks

* Added basic unit tests for win_updates

* fix minor typos
jacum pushed a commit to jacum/ansible that referenced this pull request Jun 26, 2018
* win_updates: add scheduled tasks back in for older hosts

* Fixed up typo in category name error message

* Fixed up some minor issues after merge

* added changelog fragment

* Default to become but add override to use scheduled tasks

* Added basic unit tests for win_updates

* fix minor typos
@ansible ansible locked and limited conversation to collaborators May 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. new_plugin This PR includes a new plugin. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. windows Windows community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

win_updates: Async doesn't work on 2008 and 2008 R2, doesn't work on 2008
4 participants