You need to escape double quotes in json with \. I recommend that you don't use inline for anything but trivial commands, instead use scripts.
On Wed, Aug 14, 2019, 07:18 Tekchand Dagar <[email protected]> wrote: > Hello Team, > > I am encoding my ruby code using rubyencoder and its create ".bak" file > which contain our actual code. So i need to delete all the ".bak" extension > file. I am using shell provisioner to do this. Below is my shell > provisioner: > > { > "type": "shell", > "inline": [ > "sleep 10", > "sudo /home/deploy/rubyencoder-evaluation/bin/rubyencoder -r > /home/deploy/mobilock-app/app/controllers/", > "sudo find /home/deploy/mobilock-app/app/controllers/ -type f > -name "*.bak" -delete" > ] > }, > > > But when i am validating my .json file i am getting below error: > > Failed to parse template: Error parsing JSON: invalid character '*' after > array element > At line 115, column 79 (offset 3858): > 114: "sudo /home/deploy/rubyencoder-evaluation/bin/rubyencoder > -r /home/deploy/mobilock-app/app/controllers/", > 115: "sudo find /home/deploy/mobilock-app/app/controllers/ -type > f -name "* > > ^ > > > Can you please help me to fix this issue. > > Thanks. > > -- > 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/15181494-93e1-45b5-acc2-41d4276ee0a5%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/15181494-93e1-45b5-acc2-41d4276ee0a5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CALz9Rt9uNE5--wPYYCFgQbGacB_t9rV45XOYyisOvrJjkhxccw%40mail.gmail.com.
