terraform.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:kargo-aws-k8s 作者: net592 项目源码 文件源码
def calculate_mantl_vars(func):
    """calculate Mantl vars"""

    @wraps(func)
    def inner(*args, **kwargs):
        name, attrs, groups = func(*args, **kwargs)

        # attrs
        if attrs.get('role', '') == 'control':
            attrs['consul_is_server'] = True
        else:
            attrs['consul_is_server'] = False

        # groups
        if attrs.get('publicly_routable', False):
            groups.append('publicly_routable')

        return name, attrs, groups

    return inner
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号