Remember that lookups are local
Go ahead and actually clone project-config on bridge, because we're going to read the projects.yaml file with a lookup. Because it's a local action, not a remote action. Change-Id: I77454bcb10b797ce5b48018caef7fecb31947b97
This commit is contained in:
parent
43a7014c88
commit
e836fb7af6
@ -3,12 +3,11 @@
|
|||||||
strategy: free
|
strategy: free
|
||||||
connection: local
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
# Note that git module does ls-remote if clone is set to no and places
|
|
||||||
# the remote_head value in returndict.after
|
|
||||||
- name: Grab project-config repo info
|
- name: Grab project-config repo info
|
||||||
git:
|
git:
|
||||||
repo: https://git.openstack.org/openstack-infra/project-config
|
repo: https://git.openstack.org/openstack-infra/project-config
|
||||||
clone: no
|
dest: /opt/project-config
|
||||||
|
force: yes
|
||||||
register: gitinfo
|
register: gitinfo
|
||||||
|
|
||||||
- hosts: "git-server:!disabled"
|
- hosts: "git-server:!disabled"
|
||||||
|
@ -1,3 +1 @@
|
|||||||
gitea_url: https://localhost:3000
|
gitea_url: https://localhost:3000
|
||||||
project_config_ref: master
|
|
||||||
project_config_dest: /opt/project_config
|
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
- name: Clone project-config
|
|
||||||
git:
|
|
||||||
repo: https://git.openstack.org/openstack-infra/project-config
|
|
||||||
dest: "{{ project_config_dest }}"
|
|
||||||
version: "{{ project_config_ref }}"
|
|
||||||
- name: Get Gerrit project list
|
- name: Get Gerrit project list
|
||||||
set_fact:
|
set_fact:
|
||||||
gerrit_projects: "{{ lookup('file', project_config_dest + '/gerrit/projects.yaml') | from_yaml }}"
|
gerrit_projects: "{{ lookup('file', '/opt/project-config/gerrit/projects.yaml') | from_yaml }}"
|
||||||
- name: Parse Gerrit org list
|
- name: Parse Gerrit org list
|
||||||
set_fact:
|
set_fact:
|
||||||
gerrit_orgs: "{{ gerrit_projects | map(attribute='project') | map('regex_search', '^(.*?)/') | list | unique | select | map('regex_replace', '/', '') | list }}"
|
gerrit_orgs: "{{ gerrit_projects | map(attribute='project') | map('regex_search', '^(.*?)/') | list | unique | select | map('regex_replace', '/', '') | list }}"
|
||||||
|
Loading…
Reference in New Issue
Block a user