4963898b21
Incf0c25c37
[0] a play was added to run the common role against all hosts. This ends up being redundant since every role includes the common role as a dependancy. The reasoning behind this change as pointed out by the author in the review comments [1] was so that an operator could run with '--tags common' and just have the common role applied. To avoid redundancy, the common play has been removed and tags have been added to the common role. This allows for just the common role to run when another role is including it while reducing redundancy. A side affect of removing the common playbook which runs against all hosts is that not all facts on all hosts are gathered at the beginning of the site.yml. This breaks the haproxy role since it relies heavily on facts to build out the haproxy.cfg file. Previously, the haproxy role would include several hosts purely for fact gathering purposes as pointed out inc68c9d95
[2] and a guard was put in place so that the tasks would only run against the 'haproxy' group. In423e3f3f
[3] these hosts were removed. After reading the review [4], this seems to have been done without fully understanding why the hosts were there in the first place. This change did not break anything however since the common role that ran on all hosts mentioned previously would gather all of the facts necessary. To fix this fact gathering issue replace the common role play with a play that will simply gather facts with an 'always' tag to ensure it is run regardless of what might be passed in the '--tags' argument by the operator. Kudos to Paul Bourke for helping identify many of these issues. [0]cf0c25c37d
[1] https://review.openstack.org/#/c/369212/ [2]c68c9d95fc
[3]423e3f3fdf
[4] https://review.openstack.org/#/c/355861 TrivialFix Closes-Bug: #1628472 Change-Id: Ia94146579e743935501f1ff4b4c1bf6cb7c43aa3
11 lines
184 B
YAML
11 lines
184 B
YAML
---
|
|
- include: "{{ action }}.yml"
|
|
tags: common
|
|
when: not common_run
|
|
|
|
- name: Registering common role has run
|
|
set_fact:
|
|
common_run: True
|
|
tags: common
|
|
when: not common_run
|