Not Sure, where is the problem in Provisioners

17 views
Skip to first unread message

arunnirmal chinnadurai

unread,
Jul 16, 2019, 5:41:59 AM7/16/19
to Packer
In Packer template as shown below...I use generate inventoryfile powershell script which creates IP address and store it in packer-guest.yml, If you look at the 2nd powershell provsioner entry. in the attached image.. if I split the command then it thows the following error. 

> vsphere-iso: Downloading packer-guest.yml => /tmp/packer/vm_templates/templates/../../playbook/packer-guest.yml
==> vsphere-iso: Running local shell script: /tmp/packer-shell185851134
==> vsphere-iso:  [WARNING]: provided hosts list is empty, only localhost is available. Note
==> vsphere-iso: that the implicit localhost does not match 'all'
    vsphere-iso:
==> vsphere-iso:  [WARNING]: Could not match supplied host pattern, ignoring: windows

I don't understand why in the above code

But if I use in the single like then above errors are disappear, Not sure Why. Appreciate anyone can shed some light on this.

{
"type": "powershell",
"inline": ["a:\\scripts\\generate-inventory-file.ps1 -hosts_group 'windows'"]
Provisioner error.JPG

Alvaro Miranda Aguilera

unread,
Jul 20, 2019, 12:34:51 PM7/20/19
to packe...@googlegroups.com
you can run scripts with full path in one line.



--
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/11fb07d5-516d-4c26-a4ef-bd3ffab8d83d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages