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

feat: add support for ansible integration for windows images #801

Merged
merged 1 commit into from Feb 13, 2024

Conversation

gcblack
Copy link
Contributor

@gcblack gcblack commented Dec 18, 2023

Summary of Pull Request

Add support for Ansible integration for Windows images:

  • Moved all tasks from the windows-prepare.ps1 script to the newly added Ansible provisioner.
  • Removed the windows_update provisioner and added that update task to the Ansible provisioner.

Type of Pull Request

  • This is a bugfix. type/bug
  • This is an enhancement or feature. type/feature or type/enhancement
  • This is a documentation update. type/docs
  • This is a refactoring update. type/refactor
  • This is a chore. type/chore
  • This is something else.
    Please describe:

Related to Existing Issues

Issue Number: N/A

Test and Documentation Coverage

  • Tests have been completed.
  • Documentation has been added or updated.

Breaking Changes?

  • Yes, there are breaking changes.
  • No, there are no breaking changes.

@gcblack gcblack requested a review from a team as a code owner December 18, 2023 20:28
@vmwclabot
Copy link

@gcblack, you must sign our contributor license agreement before your changes are merged. Click here to sign the agreement. If you are a VMware employee, read this for further instruction.

@vmwclabot
Copy link

@gcblack, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@tenthirtyam tenthirtyam changed the title Windows ansible integration feat: add support for ansible integration for windows images Dec 18, 2023
@tenthirtyam tenthirtyam added this to the .Next milestone Dec 18, 2023
@tenthirtyam tenthirtyam added type/enhancement Enhancement area/ansible Area: Ansible labels Dec 18, 2023
@tenthirtyam tenthirtyam marked this pull request as draft December 18, 2023 21:01
@tenthirtyam tenthirtyam changed the title feat: add support for ansible integration for windows images feat: add support for ansible integration for windows server images Dec 18, 2023
ansible/main-win.yml Outdated Show resolved Hide resolved
ansible/main-win.yml Outdated Show resolved Hide resolved
ansible/main-win.yml Outdated Show resolved Hide resolved
@tenthirtyam tenthirtyam changed the title feat: add support for ansible integration for windows server images feat: add support for ansible integration for windows images Dec 19, 2023
@tenthirtyam tenthirtyam marked this pull request as ready for review December 21, 2023 03:33
@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 2 times, most recently from 9aab957 to 3e916cb Compare December 21, 2023 04:48
@vmwclabot
Copy link

@gcblack, VMware has rejected your signed contributor license agreement. The merge can not proceed until the agreement has been resigned. Click here to resign the agreement. Reject reason:

Minimum required personal information is Name (First and Last) and Address (Country, State, Town/City).

@vmwclabot vmwclabot added the cla-rejected Contributor License Agreement Rejected label Dec 21, 2023
@vmwclabot
Copy link

@gcblack, we have received your signed contributor license agreement. The review is usually completed within a week, but may take longer under certain circumstances. Another comment will be added to the pull request to notify you when the merge can proceed.

@vmwclabot
Copy link

@gcblack, VMware has approved your signed contributor license agreement.

@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 4 times, most recently from f6abcae to e1a9c46 Compare January 26, 2024 20:47
@tenthirtyam tenthirtyam self-requested a review January 26, 2024 20:47
@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 4 times, most recently from 675d244 to ed554ec Compare January 31, 2024 20:27
@rcroft-work
Copy link
Contributor

Hi Ryan/Allan,

Have been testing this PR in our environment where I can build Windows 10/11 and Windows Server 2025 Insiders Preview.

However, I still have issues with Windows Server 2019/2022 and the "updating operating system" task - see attached windows-server-2019-error.txt and windows-server-2022-error.txt.

Also, have some minor changes remove warnings/etc but do not have the permissions to update the PR so have attached the changes as a git patch - see 0001-Tidy-up-packer-warnings-for-Ansible-support-for-Wind.patch.

windows-server-2019-error.txt

windows-server-2022-error.txt

0001-Tidy-up-packer-warnings-for-Ansible-support-for-Wind.patch

@tenthirtyam
Copy link
Contributor

0001-Tidy-up-packer-warnings-for-Ansible-support-for-Wind.patch

Thanks, Richard! I've applied the patch!!

@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 2 times, most recently from e09086d to cd3519a Compare February 9, 2024 20:39
@tenthirtyam
Copy link
Contributor

I have made some updates in cd3519a ; however, I am seeing the same issues for Windows Server 2019/2022 with Ansible updating the operating system but works as expected on Windows 10/11.

@tenthirtyam
Copy link
Contributor

tenthirtyam commented Feb 10, 2024

The Ansible seen during a build seem to be related to MS KB5034439 (Jan 09 2024) and the WinRE partition, but using a larger size does not correct the issue.

@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 2 times, most recently from 2604943 to b5bc488 Compare February 13, 2024 02:06
@tenthirtyam
Copy link
Contributor

The Ansible seen during a build seem to be related to MS KB5034439 (Jan 09 2024) and the WinRE partition, but using a larger size does not correct the issue.

Workaround:

- name: "Updating the operating system."
  ansible.windows.win_updates:
    category_names:
      - SecurityUpdates
      - CriticalUpdates
    reject_list:
      - 5034439
    reboot: true

@tenthirtyam tenthirtyam force-pushed the windows-ansible branch 4 times, most recently from f8cbeee to 16a0d4e Compare February 13, 2024 03:59
@tenthirtyam tenthirtyam self-assigned this Feb 13, 2024
Add support for Ansible integration for Windows images.

Signed-off-by: Allan Scott <alnscott@amazon.com>
Co-Authored-By: Ryan Johnson <ryan.johnson@broadcom.com>
Copy link
Contributor

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

ansible/main-win.yml Outdated Show resolved Hide resolved
@tenthirtyam tenthirtyam merged commit 35d89a7 into vmware-samples:develop Feb 13, 2024
Copy link

I'm going to lock this pull request because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ansible Area: Ansible type/enhancement Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants