From 6e894ee7ed0d96df2a2edda4e43f4ca8ca182aaa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 18 Jul 2017 14:03:01 +0000 Subject: [PATCH] Make master repos contain all distros We are creating the proper groups, assigning hosts to the proper groups, but then we are not creating the group of the master servers properly, because only the nodes that look like the localhost would be matching the when clause. Change-Id: I99d279dae5dc3f73b3a337ed70e25877a8995cc0 --- playbooks/repo-build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/playbooks/repo-build.yml b/playbooks/repo-build.yml index 4eda2adabd..afd2acde1e 100644 --- a/playbooks/repo-build.yml +++ b/playbooks/repo-build.yml @@ -35,12 +35,11 @@ tasks: - name: Prepare group of master repo servers add_host: - name: "{{ item }}" + name: "{{ groups[item][0] }}" groups: repo_masters when: - - "item in groups['repo_servers_' + ansible_distribution_version + '_' + ansible_architecture][0]" - with_inventory_hostnames: - - repo_all + - "item.find('repo_servers_') != -1" + with_items: "{{ groups }}" tags: - always - repo-build