Hi Team, I am new to ansible and ansible playbooks, I need to run a task as another user and this is just a test task but when I run it, it dose not give me the expected answer.
This is the task - name: test become: yes become_user: ansible become_method: sudo shell: whoami But I got awx as the output. Am I right to assume that the output of this to be ansible? And when I change the method to sudo or su I get this error: Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chown: changing ownership of '/var/tmp/ansible-tmp-1632981664.8259559-86-111518245523328/': Invalid argument\nchown: changing ownership of '/var/tmp/ansible-tmp-1632981664.8259559-86-111518245523328/AnsiballZ_command.py': Invalid argument\n}). For information on working around this, see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user Can anyone help me with this? -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/51f41f2d-afc3-4ad3-86c3-685db1431f55n%40googlegroups.com.