Project

General

Profile

Revision 886b8529

ID886b8529ffa4de9cd3c1aef069a7e5fc11f4ed24
Parent c61916e2
Child 64934e90

Added by Travis Rhoden over 8 years ago

[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 <>

View differences:

ceph_deploy/repo.py
1
import os
1 2
import logging
2 3

  
3 4
from ceph_deploy import hosts
......
20 21
                'missing required key: %s in config section: %s' % (err, args.repo_name)
21 22
            )
22 23
    else:
23
        repo_url = args.repo_url
24
        gpg_url = args.gpg_url
24
        repo_url = os.environ.get('CEPH_DEPLOY_REPO_URL') or args.repo_url
25
        gpg_url = os.environ.get('CEPH_DEPLOY_GPG_URL') or args.gpg_url
25 26
        extra_repos = []
26 27

  
27 28
    repo_url = repo_url.strip('/')  # Remove trailing slashes

Also available in: Unified diff