diff options
author | James Cammarata <jcammarata@ansibleworks.com> | 2014-02-10 13:27:43 -0600 |
---|---|---|
committer | James Cammarata <jcammarata@ansibleworks.com> | 2014-02-12 15:22:10 -0600 |
commit | 894252125d58bbdc39bdf02d741281d0f8b825d9 (patch) | |
tree | 055fc85579059fe3603fa5ffd2734308be294c6b | |
parent | 4adc0775ce5cf53703393830eab29db694c2f1d6 (diff) | |
download | ansible-894252125d58bbdc39bdf02d741281d0f8b825d9.tar.gz |
Specify mode in the makedirs call for fireball/accelerate keys
-rw-r--r-- | lib/ansible/utils/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index 9febdb290d..2f82e3426d 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -89,7 +89,8 @@ def key_for_hostname(hostname): key_path = os.path.expanduser(C.ACCELERATE_KEYS_DIR) if not os.path.exists(key_path): - os.makedirs(key_path) + os.makedirs(key_path, mode=0700) + os.chmod(key_path, int(C.ACCELERATE_KEYS_DIR_PERMS, 8)) elif not os.path.isdir(key_path): raise errors.AnsibleError('ACCELERATE_KEYS_DIR is not a directory.') os.chmod(key_path, int(C.ACCELERATE_KEYS_DIR_PERMS, 8)) |