From f430dfeb793eec56e76d9a0916cb64baea50eff7 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Fri, 27 Jan 2023 08:53:17 +0100 Subject: [PATCH] Use plain name instead of variable. --- gitlab-pull-mirror.yml | 4 ++-- templates/gitlab-ci.yml.j2 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gitlab-pull-mirror.yml b/gitlab-pull-mirror.yml index 9f29778..97d6f78 100755 --- a/gitlab-pull-mirror.yml +++ b/gitlab-pull-mirror.yml @@ -30,7 +30,7 @@ Authorization: "Bearer {{ github_token }}" register: github_repo - - name: Get a detailed list of owned GitLab projects + - name: Get details of GitLab project uri: url: "https://gitlab.com/api/v4/projects?owned=true&search={{ role }}" method: GET @@ -39,7 +39,7 @@ return_content: yes register: gitlab_projects - - name: Pick project_ids from GitLab projects + - name: Pick project_ids from GitLab project set_fact: gitlab_projects: "{{ gitlab_projects.json | selectattr('name', 'equalto', role) | list }}" diff --git a/templates/gitlab-ci.yml.j2 b/templates/gitlab-ci.yml.j2 index 6a005e6..531daff 100644 --- a/templates/gitlab-ci.yml.j2 +++ b/templates/gitlab-ci.yml.j2 @@ -23,6 +23,6 @@ molecule: galaxy: script: - - ansible-galaxy role import --api-key ${GALAXY_API_KEY} ${CI_PROJECT_NAMESPACE} ${CI_PROJECT_NAME} + - ansible-galaxy role import --api-key ${GALAXY_API_KEY} {{ gitlab_namespace }} ${CI_PROJECT_NAME} rules: - if: $CI_COMMIT_TAG != null