- name: Give aurbis write access to {{ tree_path }} file: path: "{{ tree_path }}" state: directory recurse: true group: aurbis mode: g+rwX - name: Make {{ tree_path }} directories hand their group to new files ansible.builtin.command: cmd: "find {{ tree_path }} -type d ! -perm -g+s -print -exec chmod g+s {} +" register: aurbis_tree_setgid changed_when: aurbis_tree_setgid.stdout != ""