Using Ubuntu 19.04 and Python 3.7
When I create a directory with Ansible, file ownership is changed in /usr/lib/python3.7
Obviously this should not happen and it breaks Python for the whole of Ubuntu, until the permissions are corrected.
The problem only happens when recurse=yes is used.
Here is a video showing the problem: https://youtu.be/d3hj255pW9w
Here is the code/Ansible playbook:
ubuntu@ubuntu-GB-BXi3-5010:~/ansible$ cat ~/ansible/renderworker/ffmpegconverter/ansible/test.yml
---
- hosts: renderworkerhosts
become: yes
tasks:
# for some reason, recurse=yes results in owner & permissions changing in /usr/lib/python3.7
# which breaks Python on Ubuntu
- name: Create directory
file:
path=/opt/ffmpegconverter
state=directory
owner=root
group=ffmpeguser
mode=u=rwx,g=rwx,o=
recurse=yes
ubuntu@ubuntu-GB-BXi3-5010:~/ansible$