I have also encountered this exact same problem and after some considerable 
head-banging found that the problem manifested itself when running as a 
root user. Creating, within my container, a non-root user and running 
packer as that user resulted in normal operation.
Regards
M

On Friday, 10 November 2017 14:59:00 UTC, Rickard von Essen wrote:
>
> Could you provide your template and playbook?
>
> On 10 November 2017 at 15:23, Travis Stevens <[email protected] 
> <javascript:>> wrote:
>
>> This question mixes Ansible and Packer as I am having a lot of problems 
>> locating the issue. 
>> We have a build server that currently executes an Ansible playbook that 
>> calls packer to create new images. Works Great.
>> I am testing doing this from inside a docker container using Code Build 
>> and bitbucket pipelines. 
>>
>> The first weirdness we encountered was Packer not being able to determine 
>> what user the container was running as and we solved that by setting the 
>> environment variable USER=root. 
>> After that packer is able to connect to AWS and spin up an instance to 
>> run the additional playbooks. There seems to be a difference in the way 
>> packer is executing Ansible from the old build server and the new container 
>> builder. The same scripts fail in the containerized build. It seems it is 
>> not running commands as sudo and they fail because of permissions. 
>>
>> Any insight is helpful. 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/a1136a06-6e8f-4057-ba16-3956f696d1c2%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/packer-tool/a1136a06-6e8f-4057-ba16-3956f696d1c2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/7fae3a6b-ebf8-4405-acf1-2c40cc7598b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to