From 629c38230c6ca0d4d736b029819f0ff2ab0b236e Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 4 Apr 2020 18:15:08 +0200 Subject: [PATCH] bundles/users: add option to change home directory mode --- bundles/mx-puppet-discord/metadata.py | 1 + bundles/users/items.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/mx-puppet-discord/metadata.py b/bundles/mx-puppet-discord/metadata.py index 6982d50..48c3a9b 100644 --- a/bundles/mx-puppet-discord/metadata.py +++ b/bundles/mx-puppet-discord/metadata.py @@ -5,6 +5,7 @@ def mx_puppet_discord_user(metadata): 'mx-puppet-discord': { 'home': '/opt/mx-puppet-discord', 'deploy_configs': False, + 'home-mode': '0755', }, }, }, DEFAULTS, DONE diff --git a/bundles/users/items.py b/bundles/users/items.py index 2f46777..c01553a 100644 --- a/bundles/users/items.py +++ b/bundles/users/items.py @@ -45,7 +45,7 @@ for username, attrs in node.metadata['users'].items(): directories[home] = { 'owner': username, - 'mode': '0700', + 'mode': attrs.get('home-mode', '0700'), } if 'ssh_pubkey' in attrs: