Thanks for another possible workaround, and for the update that there hasn't been any facility added to the Packer shell provisioner to logout and log back in since this question was first asked and answered in 2016.
On Sunday, November 15, 2020 at 2:25:16 PM UTC-5 [email protected] wrote: > You can technically use `newgrp groupName` but that spawns an additional > subshell rather than modifying your current shell, so it doesn't work for > everything, and if you have other processes that were running from the main > shell process they won't get the new membership either. > > On Saturday, November 14, 2020 at 2:12:58 PM UTC-6 [email protected] > wrote: > >> I had the same question about logout/login to get new group credentials >> for the user. >> I can certainly go the reboot route, but this was asked over 4 years ago, >> and it's the only discussion about this I was able to find so I thought I'd >> check if anything had changed. >> Thanks >> >> On Thursday, January 14, 2016 at 1:44:07 PM UTC-5 Brett Russ wrote: >> >>> On Thursday, January 14, 2016 at 12:29:57 AM UTC-5, Alvaro Miranda >>> Aguilera wrote: >>> >>>> The ssh session i believe is reused, so the best will be do a reboot. >>>> >>> I can understand the reboot is not required or may sound like too much, >>>> so you could potentially try `exit` at the end of the first block and see >>>> if that works. >>>> >>> >>> Thank you! This heavy hammer solved the problem. I'm surprised there >>> isn't an option to force a new ssh/shell to be used. >>> -Brett >>> >> -- 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/hashicorp/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/971d717d-b20b-49b0-9651-7d270ca933c7n%40googlegroups.com.
