python类use_ssh_config()的实例源码

fabfile.py 文件源码 项目:service-notifications 作者: rehive 项目源码 文件源码 阅读 50 收藏 0 点赞 0 评论 0
def set_env(config, version_tag=None):
    """
    Fabric environmental variable setup
    """
    # Bug: when setting this inside a function. Using host_string as workaround
    config_dict = get_config(config)
    env.hosts = [config_dict['HOST_NAME'], ]
    env.host_string = config_dict['HOST_NAME']

    env.project_name = config_dict['PROJECT_NAME']
    env.project_dir = posixpath.join('/srv/images/', env.project_name)
    env.use_ssh_config = True

    env.image_name = config_dict['IMAGE'].split(':')[0]
    env.base_image_name = env.image_name + '_base'
    env.version_tag = version_tag

    env.build_dir = '/srv/build'
    env.local_path = os.path.dirname(__file__)
fabfile.py 文件源码 项目:service-notifications 作者: rehive 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def set_env(config, version_tag=None):
    """
    Fabric environmental variable setup
    """
    # Bug: when setting this inside a function. Using host_string as workaround
    config_dict = get_config(config)
    env.hosts = [config_dict['HOST_NAME'], ]
    env.host_string = config_dict['HOST_NAME']

    env.project_name = config_dict['PROJECT_NAME']
    env.project_dir = posixpath.join('/srv/images/', env.project_name)
    env.use_ssh_config = True

    env.image_name = config_dict['IMAGE'].split(':')[0]
    env.base_image_name = env.image_name + '_base'
    env.version_tag = version_tag

    env.build_dir = '/srv/build'
    env.local_path = os.path.dirname(__file__)
fabfile.py 文件源码 项目:CommunityCellularManager 作者: facebookincubator 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def proxy():
    """ Use SOCKS proxy for ssh from dev servers """
    env.ssh_config_path = "../client/ssh/proxy-config"
    env.use_ssh_config = True
utils.py 文件源码 项目:astoptool 作者: zouliuyun 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def set_fabric_common_env():
    """
    ??????????fabric env
    """
    env.user = 'astd'
    env.use_ssh_config = True   # This is important when running under root.
    env.connection_attempts = 5
    env.disable_known_hosts = True
    env.keepalive = 60


问题


面经


文章

微信
公众号

扫码关注公众号