This is a sort of follow up from my previous quick tip Can't write to /tmp. I have had this a couple of time this week where this has been changed.
I wrote this simeple ansible plybook so I can just pass the hostname where it is wrong and it will sort the permissions for me, hopefully you find this helpful like I have, saves logging in to the machine and typing the command.
--- - hosts: tmp tasks: - name: Fix the permissions file: dest=/tmp owner=root group=root mode=1777
Simple playbook, but now I can just type
ansible-playbook fix_tmp.yml -i hostname,
I am always interested in feedback so please feel free to add any comments, or you can mail me here. If you would like to submit a quick tip with full credit and links back to your site then also feel free to contact me.