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 windows-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": ""}
amazon-ebs:     to retry, use: --limit 
@/home/vsts/work/1/s/packer/hardening-win/ansible/hardening.retry


Ansible file: 

---
- hosts: all
tasks:
- name: Install all security, critical, and rollup updates
win_updates:
category_names:
- SecurityUpdates
- CriticalUpdates
- UpdateRollups

- hosts: all
tasks:
- name: Reboot, if needed
win_reboot:
when: update_result.reboot_required


Packer provisioner: 

{
"type": "ansible",
"playbook_file": "{{ template_dir }}/ansible/hardening.yml",
"extra_arguments": [
"--connection", "packer",
"--extra-vars", "ansible_shell_type=powershell 
ansible_shell_executable=None"
]
}


Any ideas on a fix or a better way to do windows patching? 

Thanks 
S










-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/84ab6eaa-b27b-426c-a969-a5b3f7c51beb%40googlegroups.com.

Reply via email to