INNER CODE UNIT · Python

find_custom_repo

pixiu-io/kubez-ansible · ansible/filter_plugins/to_socket.py:55

def find_custom_repo(ctx, *args, **kwargs):
    dest = kwargs.get('dest')
    repo_dir = kwargs.get('repo_dir')

    parts = dest.split('/')
    repo_name = parts[len(parts) - 1]

    custom_repo = os.path.join(repo_dir, repo_name)
    if os.path.exists(custom_repo):
        return custom_repo
    else:
        return ctx


class FilterModule(object):
    '''Kubez-ansible custom jinja2 filters '''

    def filters(self):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…