From 5942144868f503dbc3b4652fdf4281db1cb7197a Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bonicoli Date: Mon, 23 Mar 2015 01:25:18 +0100 Subject: [PATCH] Port #10258 to v2 --- v2/ansible/module_utils/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/ansible/module_utils/basic.py b/v2/ansible/module_utils/basic.py index 6c7217bd88..79a0fab67b 100644 --- a/v2/ansible/module_utils/basic.py +++ b/v2/ansible/module_utils/basic.py @@ -1376,7 +1376,7 @@ class AnsibleModule(object): # based on the current value of umask umask = os.umask(0) os.umask(umask) - os.chmod(dest, 0666 ^ umask) + os.chmod(dest, 0666 & ~umask) if switched_user: os.chown(dest, os.getuid(), os.getgid())