Ansible unarchieve module task failed, but root user tony was set as owner and group for the unarchieve folders.
Can you please let me know what was the issue?
Please find the screenshot
Have you mentioned “mode” field in along with your unarchive module in your playbook?
Thanks for replying. No, I have unarchieved and used copy function to apply mode, owner and group.
Hi! In the task they might have asked like “The extracted data permissions must be 0744” something like that. In Unarchive module only, we specify
Yes agree. Isn’t it mentioned that the unarchived module should have Sudo user permission and mode?
So I have just used 2 modules unarchieve and copy instead of unarchieve with mode and owner.
I completed this task however I dont think it was the right approach, I wrote my playbook and add the unarchive task, but I was getting ‘permission denied’ because the directory ‘/opt/devops’ only have root access allowed
So I tried to elevate users(tony - steve - banner) permission to root
I tried this add on playbook.yml
- name: Playbook to copy file and uncompress
but this didnt work
I also tried
become_exe = ‘sudo su -’
but didnt work
It was until I manually changed folder permissions to allow write to all users that it work
but I dont think that is the right way to do, so Is it anyway to elevate user permissions on Ansible (sudo su) ??