Trying to Using Ansible with Packer

40 views
Skip to first unread message

wick asana

unread,
Oct 29, 2018, 6:46:46 AM10/29/18
to Packer
Hi Everyone !

I'm actually trying to use Ansible with packer to configure a VM. 

Let me explain my Packer config: 

- Packer create the VM on VMware ESXI 
- After that, i use a kickstart file to partition my disk
- And, I want to use a Ansible config file to install and configure my server

But i don't know how can i retrieve the Dynamic IP to assign Ansible config file.

Can you help me ?

Sorry for my bad English

Thanks in advance

Belliard Romain

Rickard von Essen

unread,
Oct 29, 2018, 6:51:16 AM10/29/18
to packe...@googlegroups.com
Use the ansible provisioner *) . It will automatically handle the connectivity. If you have any problems with it pleas supply your template, Kickstart file, and playbooks.


--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/5b2cacc2-2919-459c-a906-d4f548201c3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wick asana

unread,
Oct 29, 2018, 9:03:04 AM10/29/18
to Packer
Thx for your help it's works !!!
Now i have an other question ....

After the VM creation i want to extract and compress this one...
But during the Packer exctraction it says me that :

2018/10/29 08:46:50 cracklib-packer: 2018/10/29 08:46:50 [DEBUG] starting remote command: vim-cmd vmsvc/reload 165
==> vmware-iso: Exporting virtual machine...
    vmware-iso: Executing: ovftool  --shaAlgorithm=sha256  --allowExtraConfig --noSSLVerify=true --skipManifestCheck -tt=ova vi://root:****@x.x.x.x/vm_name output-vmware-iso
==> vmware-iso: Error exporting virtual machine: exit status 1
2018/10/29 08:46:51 ui error: ==> vmware-iso: Error exporting virtual machine: exit status 1
==> vmware-iso: Error: Unexpected option: --noSSLVerify=true
==> vmware-iso: Completed with errors

How can i resolve this error ?

thanks in advance !!

Rickard von Essen

unread,
Oct 29, 2018, 9:21:34 AM10/29/18
to packe...@googlegroups.com
What's your version of ovftool?

--
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...@googlegroups.com.

wick asana

unread,
Oct 29, 2018, 9:31:10 AM10/29/18
to Packer
it's ovftools 4.3 

Rickard von Essen

unread,
Oct 29, 2018, 9:36:09 AM10/29/18
to packe...@googlegroups.com

On Mon, Oct 29, 2018 at 2:31 PM wick asana <wick...@gmail.com> wrote:
it's ovftools 4.3 

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages