Hi,--I would like to do following :-login with ec2-user .. and sudo to some other user and execute deployment script.So, packer working fine.. AMI creation is ok.. But while executing below script it gives me an error that it should run with "abc" user and not root user.I have added ec2-user in sudoers files :-ec2-user ALL=(ALL) <script path>"provisioners": [{"type": "shell","execute_command": "echo '' | sudo -S sh '{{ .Path }}'","environment_vars": ["SUDO_USER={{user `dep_user`}}"],"scripts": ["/eserver1/share/deployment_kit/deploy.sh"]}In variables :-"dep_user": "abc",Can you please tell where it's wrong ?Regards,Sudh
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/7bf40aba-5395-476d-accd-da774b1d7bd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.