From 0f4c3457e44866dfb4c5fc5a392f139bec27281c Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 12 Apr 2019 17:49:13 +0100 Subject: [PATCH] Ensure the build host is the first repo server The first repo server is the only one configured to synchronise packages to the other repo servers. To ensure that the build happens on the first server, we reverse the order in which they are processed in the loop. This does not solve the multi-architecture use-case. A solution for that will have to follow. Change-Id: Ie6bd16ac08164f7dba71339858b98137f61ad716 --- vars/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vars/main.yml b/vars/main.yml index 3ddcbf6..df51d9e 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -69,7 +69,7 @@ venv_build_targets: |- } } %} - {% for item in (groups['repo_all'] | default([inventory_hostname])) %} + {% for item in ((groups['repo_all'] | default([inventory_hostname])) | reverse) %} {% set distro = hostvars[item]['ansible_distribution_version'] %} {% set arch = hostvars[item]['ansible_architecture'] %} {% set target_item = {(arch | string): (item | string)} %}