From: Travis Rhoden Date: Tue, 4 Aug 2015 18:34:17 +0000 (-0700) Subject: [RM-12553] repo: Allow URLs to be passed by env var X-Git-Tag: v1.5.27~4^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=886b8529ffa4de9cd3c1aef069a7e5fc11f4ed24;p=ceph-deploy.git [RM-12553] repo: Allow URLs to be passed by env var This is more secure if the repo URL contains a user:pass combo Refs: #12553 Signed-off-by: Travis Rhoden --- diff --git a/ceph_deploy/repo.py b/ceph_deploy/repo.py index f40806a..9fd5c35 100644 --- a/ceph_deploy/repo.py +++ b/ceph_deploy/repo.py @@ -1,3 +1,4 @@ +import os import logging from ceph_deploy import hosts @@ -20,8 +21,8 @@ def install_repo(distro, args, cd_conf, rlogger): 'missing required key: %s in config section: %s' % (err, args.repo_name) ) else: - repo_url = args.repo_url - gpg_url = args.gpg_url + repo_url = os.environ.get('CEPH_DEPLOY_REPO_URL') or args.repo_url + gpg_url = os.environ.get('CEPH_DEPLOY_GPG_URL') or args.gpg_url extra_repos = [] repo_url = repo_url.strip('/') # Remove trailing slashes