aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2017-02-21 19:22:28 +0000
committerMark Goddard <mark@stackhpc.com>2017-07-19 08:24:21 +0100
commit922eb494e648b9aa6cf92bdf651fffc14351622d (patch)
tree9b32c070c6b02870a4f67da61a5e95d807b6a88d /tools
parenteab8efe166341a53a937ac8933b46f8b2408bdaa (diff)
downloadkolla-ansible-922eb494e648b9aa6cf92bdf651fffc14351622d.tar.gz
kolla-ansible-922eb494e648b9aa6cf92bdf651fffc14351622d.zip
Make Ironic inspector honour inventory
Ironic inspector should honour the Ansible inventory group ironic-inspector. Ironic inspector may not be required at all. If Ironic inspector is required then it should only run on a single node, and this should be reflected by the inventory. This change makes a number of Ironic inspector-related tasks dependent upon the host's membership of the ironic-inspector group. Also, we couple the ironic-dnsmasq container with the ironic-inspector group rather than ironic-conductor, as the service is for inspector rather than Ironic. Change-Id: Ifd90753b0fe1a55c11b7723c28e1d14ab3d32737 Closes-Bug: #1665257
Diffstat (limited to 'tools')
-rwxr-xr-xtools/validate-all-file.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/validate-all-file.py b/tools/validate-all-file.py
index b40df3e6f..c1555466e 100755
--- a/tools/validate-all-file.py
+++ b/tools/validate-all-file.py
@@ -74,6 +74,10 @@ def check_json_j2():
def hostvars():
return collections.defaultdict(hostvars)
+ # Mock Ansible groups variable, which is a dict of lists.
+ def groups():
+ return collections.defaultdict(list)
+
def validate_json_j2(root, filename):
env = jinja2.Environment( # nosec: not used to render HTML
loader=jinja2.FileSystemLoader(root))
@@ -82,6 +86,7 @@ def check_json_j2():
# Mock ansible variables.
context = {
'hostvars': hostvars(),
+ 'groups': groups(),
'cluster_interface': 'cluster_interface',
'storage_interface': 'storage_interface',
'inventory_hostname': 'hostname'