refactored for use with puppet's ::settings.