rgl / packer-plugin-windows-update

Packer plugin for installing Windows updates
Mozilla Public License 2.0
299 stars 71 forks source link

Unable to download windows updates with this community provisioner #136

Open sneha-kandrakota opened 10 months ago

sneha-kandrakota commented 10 months ago

Hiii, I am a newbie to packer so my use case was to download windows updates with the help of this provisioner which is working fine sometime back for my windows servers hosted on AWS, but now though the task was stopping intermittently and the logs are as follows :

==> p1-packer.amazon-ebs.win: Waiting for instance (i-0c23907d2834ad8ee) to become ready... ==> p1-packer.amazon-ebs.win: Skipping waiting for password since WinRM password set... ==> p1-packer.amazon-ebs.win: Using WinRM communicator to connect: 3.99.155.254 ==> p1-packer.amazon-ebs.win: Waiting for WinRM to become available... p1-packer.amazon-ebs.win: WinRM connected. ==> p1-packer.amazon-ebs.win: Connected to WinRM! ==> p1-packer.amazon-ebs.win: Provisioning with Ansible... p1-packer.amazon-ebs.win: Not using Proxy adapter for Ansible run: p1-packer.amazon-ebs.win: Using WinRM Password from Packer communicator... ==> p1-packer.amazon-ebs.win: Executing Ansible: ansible-playbook -e packer_build_name="win" -e packer_builder_type=amazon-ebs -e ansible_winrm_server_cert_validation=ignore -e ansible_password=** -i /tmp/packer-provisioner-ansible1857968214 /home/hercules/packer/Qualys_Windows_Install.yml p1-packer.amazon-ebs.win: p1-packer.amazon-ebs.win: PLAY [Play ensures that the socks tunnel is setup, the ssh keys may have a passphrase] p1-packer.amazon-ebs.win: p1-packer.amazon-ebs.win: TASK [create a directory] ** p1-packer.amazon-ebs.win: changed: [default] p1-packer.amazon-ebs.win: p1-packer.amazon-ebs.win: TASK [Download exe to local directory.] **** p1-packer.amazon-ebs.win: changed: [default] p1-packer.amazon-ebs.win: p1-packer.amazon-ebs.win: TASK [Install the qualys on windows machine] * p1-packer.amazon-ebs.win: changed: [default] p1-packer.amazon-ebs.win: p1-packer.amazon-ebs.win: PLAY RECAP *** p1-packer.amazon-ebs.win: default : ok=3 changed=3 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 p1-packer.amazon-ebs.win: ==> p1-packer.amazon-ebs.win: Uploading the Windows update elevated script... ==> p1-packer.amazon-ebs.win: Uploading the Windows update check for reboot required elevated script... ==> p1-packer.amazon-ebs.win: Uploading the Windows update script... ==> p1-packer.amazon-ebs.win: Running Windows update... p1-packer.amazon-ebs.win: Searching for Windows updates... p1-packer.amazon-ebs.win: Found Windows update (2023-11-07; 41.73 MB): Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.401.220.0) - Current Channel (Broad) p1-packer.amazon-ebs.win: Downloading Windows updates (1 updates; 41.73 MB)... p1-packer.amazon-ebs.win: Installing Windows updates... p1-packer.amazon-ebs.win: Waiting for operation to complete (system performance: 91% cpu; 99% memory)... ==> p1-packer.amazon-ebs.win: Stopping the source instance... p1-packer.amazon-ebs.win: Stopping instance ==> p1-packer.amazon-ebs.win: Waiting for the instance to stop... ==> p1-packer.amazon-ebs.win: Creating AMI win2019-r5 from instance i-0c23907d2834ad8ee any help or suggesstions are highly appreciated. (Note: Previously when this provisioner used to download all the updates in my previous build it skipped Microsoft Defender Antivirus - KB2267602 )