[packer] Re: Running Ansible windows-update from Packer permissions error

2019-09-13 Thread trey perrone
Also, i apparently didn't read it all...derp.

I do not have an issue running my similar playbooks with packer and the 
normal admin account w autogenerated password. Are you elevating or 
changing user contexts somewhere else in ansible.cfg, etc? i dont see 
become or become_method in your playbooks attached. If you are using an 
account with admin priv on the windows box, then there shouldn't be a need 
to elevate/runas.


On Monday, September 9, 2019 at 4:03:21 PM UTC-4, Stephen Bennett wrote:
>
> 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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/222e1e5e-6df8-444f-9f7f-cccbc61d6b3c%40googlegroups.com.


Re: [packer] Can't feed kickstart file from floppy

2019-09-13 Thread Rickard von Essen
See this issue for some details
https://github.com/hashicorp/packer/issues/2920

On Fri, Sep 13, 2019, 19:21 Rickard von Essen 
wrote:

> Pretty sure floppy support in kickstart was removed in recent versions of
> EL.
>
> On Fri, Sep 13, 2019, 16:51 Mauricio Tavares  wrote:
>
>> So I am trying to deploy a centos guest on a vmware host using packer. I 
>> want to feed the kickstart file using the a floppy drive 
>> (https://www.packer.io/docs/builders/vmware-iso.html#floppy_files). So, here 
>> is my setup:
>>
>>
>> # Stolen from the last example in 
>> https://www.packer.io/docs/builders/vmware-iso.html
>>
>>"builders": [
>> {
>>   "type": "vmware-iso",
>>   "guest_os_type" : "{{user `guest_os`}}",
>>   "iso_url": "{{user `iso_url`}}",
>>   "iso_checksum_url": "{{user `iso_checksum_url`}}",
>> [...]
>>  "floppy_files": [
>> "floppy/ks.cfg"
>>   ],
>>   "boot_command": [
>> " inst.text inst.ks=hd:fd0:/ks.cfg "
>>   ],
>>   "boot_wait": "8s",
>>   "shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P -h 
>> now"
>> }
>>   ]
>> }
>>
>>
>> When I run it, it behaves as it cannot find the ks.cfg file and goes to
>> the normal manual setup. Am I missing something here?
>>
>> --
>> 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 packer-tool+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/packer-tool/771f2a19-3b3b-416f-8c2f-aa80f0a42712%40googlegroups.com
>> 
>> .
>>
>

-- 
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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt_CaTO8Fm0cSy1-qTeKNnOLqZ3yAC%3D%3Dbk2z2T0pnOi%3DHA%40mail.gmail.com.


Re: [packer] Can't feed kickstart file from floppy

2019-09-13 Thread Rickard von Essen
Pretty sure floppy support in kickstart was removed in recent versions of
EL.

On Fri, Sep 13, 2019, 16:51 Mauricio Tavares  wrote:

> So I am trying to deploy a centos guest on a vmware host using packer. I want 
> to feed the kickstart file using the a floppy drive 
> (https://www.packer.io/docs/builders/vmware-iso.html#floppy_files). So, here 
> is my setup:
>
>
> # Stolen from the last example in 
> https://www.packer.io/docs/builders/vmware-iso.html
>
>"builders": [
> {
>   "type": "vmware-iso",
>   "guest_os_type" : "{{user `guest_os`}}",
>   "iso_url": "{{user `iso_url`}}",
>   "iso_checksum_url": "{{user `iso_checksum_url`}}",
> [...]
>  "floppy_files": [
> "floppy/ks.cfg"
>   ],
>   "boot_command": [
> " inst.text inst.ks=hd:fd0:/ks.cfg "
>   ],
>   "boot_wait": "8s",
>   "shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P -h 
> now"
> }
>   ]
> }
>
>
> When I run it, it behaves as it cannot find the ks.cfg file and goes to
> the normal manual setup. Am I missing something here?
>
> --
> 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 packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/771f2a19-3b3b-416f-8c2f-aa80f0a42712%40googlegroups.com
> 
> .
>

-- 
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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-UtAr9ecbrmWEXmYhUXgLUT%3DAh0%2BtiLkoGweu0wGnAhw%40mail.gmail.com.


[packer] Can't feed kickstart file from floppy

2019-09-13 Thread Mauricio Tavares


So I am trying to deploy a centos guest on a vmware host using packer. I want 
to feed the kickstart file using the a floppy drive 
(https://www.packer.io/docs/builders/vmware-iso.html#floppy_files). So, here is 
my setup:


# Stolen from the last example in 
https://www.packer.io/docs/builders/vmware-iso.html

   "builders": [
{
  "type": "vmware-iso",
  "guest_os_type" : "{{user `guest_os`}}",
  "iso_url": "{{user `iso_url`}}",
  "iso_checksum_url": "{{user `iso_checksum_url`}}",
[...]
 "floppy_files": [
"floppy/ks.cfg"
  ],
  "boot_command": [
" inst.text inst.ks=hd:fd0:/ks.cfg "
  ],
  "boot_wait": "8s",
  "shutdown_command": "echo {{user `ssh_pass`}} | sudo -S shutdown -P -h 
now"
}
  ]
}


When I run it, it behaves as it cannot find the ks.cfg file and goes to the 
normal manual setup. Am I missing something here?

-- 
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 packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/771f2a19-3b3b-416f-8c2f-aa80f0a42712%40googlegroups.com.