# Running Ansible in Packer Windows\_Update Error

**URL:** <https://forum.ansible.com/t/running-ansible-in-packer-windows-update-error/31248>\
**Category:** Ansible Project\
**Created:** [September 10, 2019, 8:23am UTC](https://forum.ansible.com/t/running-ansible-in-packer-windows-update-error/31248 "2019-09-10T08:23:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Staggerlee011](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@Staggerlee011](https://forum.ansible.com/u/Staggerlee011)\
**Post date:** [September 10, 2019, 8:23am UTC](https://forum.ansible.com/t/running-ansible-in-packer-windows-update-error/31248/1 "2019-09-10T08:23:57Z")

</div>

Hi,

I have ansible doing application installs and everything else (Ie must be running in admin) i want from a packer build, but when it comes to running a ansible win\_update it errors out with:

TASK [Install all security, critical, and rollup updates] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
amazon-ebs: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: ‘runas’  
amazon-ebs: fatal: [default]: FAILED! =\> {“msg”: “Unexpected failure during module execution.”, “stdout”: “”}

Ansible file:
