mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Specify mode in the makedirs call for fireball/accelerate keys
This commit is contained in:
@@ -89,7 +89,7 @@ def key_for_hostname(hostname):
|
|||||||
|
|
||||||
key_path = os.path.expanduser(C.ACCELERATE_KEYS_DIR)
|
key_path = os.path.expanduser(C.ACCELERATE_KEYS_DIR)
|
||||||
if not os.path.exists(key_path):
|
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))
|
os.chmod(key_path, int(C.ACCELERATE_KEYS_DIR_PERMS, 8))
|
||||||
elif not os.path.isdir(key_path):
|
elif not os.path.isdir(key_path):
|
||||||
raise errors.AnsibleError('ACCELERATE_KEYS_DIR is not a directory.')
|
raise errors.AnsibleError('ACCELERATE_KEYS_DIR is not a directory.')
|
||||||
|
|||||||
Reference in New Issue
Block a user