In my ansible file I have a few tasks where I need to become a user and 
install software as that user 

I have configured this as follows

- name: Install Linuxbrew
git:
repo: 'https://github.com/Linuxbrew/brew.git'
dest: '~{{ primary_user }}/.linuxbrew'
become: yes
become_user: '{{ primary_user }}'
become_flags: '-i'
become_method: sudo

However it errors saying that 

Failed to set permissions on the temporary files Ansible needs to create 
when becoming an unprivileged user


This is provisioned by packer as follows

    {
     "type": "ansible-local",
     "playbook_file": "ansible/assembly.yml"
   }

Other ansible commands operate fine but those with become: yes fail

Any advice much appreciated. Thanks

Anthony

-- 
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/169c6bde-f235-4649-8f3c-a97a0f52153c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to