forked from NationalGenomicsInfrastructure/irma-provision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
force_perms.yml
21 lines (18 loc) · 875 Bytes
/
force_perms.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
# This is an ugly hack that sets the permissions correctly to g+rwX,o+rX
# for all files that is owned by the current user that is running the playbook.
#
# Our roles try to set the permissions correctly as good as they can,
# but sometimes the files might end up in a limbo state due to e.g. a
# canceled playbook run. In those cases the operator can run this playbook
# to correct all files owned by him/her.
#
# Note that this by purpose will miss changing the permissions of files
# owned by an other user, as we do not want to have the playbook cluttered
# with a lot of errors when the permission change fails.
- name: force file permissions for current user
hosts: 127.0.0.1
connection: local
tasks:
- name: set correct file permission for everything under root path
shell: "find {{ root_path }} -user `whoami` -exec chmod g+rwX,o+rX {} \\;"