hello just to be sure, both computer are running on the same packer version?
what user are you using to connect? won't be possible that due being different computers you are connecting to different regions, etc that end using different source ubuntu box? Alvaro. On Sun, Dec 3, 2017 at 2:32 AM, Rajinder Singh <[email protected]> wrote: > I am baking an image in Azure using packer. > Base image is Centos 7.4 > > If I run packer from MacOS image bakes successfully. > If I try to bake the exact same image from Ubuntu it is failing. Our build > server bamboo is running on Ubuntu 16.04 > > Here is the error > > msg": "The destination directory (/etc) is not writable by the current user. > Error was: [Errno 13] Permission denied: '/etc/.ansible_tmpnMneufhost.conf'" > [0m > > > It is failing while running ansible playbook. It is trying to write in /etc > directory and does not have permissions. > > > I did set > > "ssh_pty": true, > > > > Here is how I am invoking ansible playbook > > { > "type": "ansible", > "playbook_file": "./server-hardening.yml", > "extra_arguments": [ "-vvvv" ] > }, > > > I have tried updating the ansible playbook like this: > > > - hosts: all > become: true > become_method: sudo > become_user: root > > > But I still get the same error. > > > > We are also baking a Ubuntu 16.04 using similar playbook and it is working. > > > To summarize I can bake Centos 7.4 by running packer build from Mac OS but > the same configuration fails to build when packer is run from Ubuntu 16.04 > build server. > > > Let me know if anybody has any suggestions. > > > 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/989e001b-f028-4d58-be1b-c1a11c69a2a4%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/989e001b-f028-4d58-be1b-c1a11c69a2a4%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Alvaro -- 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/CAHqq0ewszzo21T1a06du%3Djr1oORj7rTQWkvGMfnNvjTUXZQC7A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
