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
(cherry picked from commit 6e894ee7ed)
This commit is contained in:
Jean-Philippe Evrard 2017-07-18 14:03:01 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 7188afbfc4
commit ada6672030
1 changed files with 3 additions and 4 deletions

View File

@ -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