Create nodepool.cloud inventory variable

It is possible we want to know the name of the cloud, which could be
different from nodepool.provider. In the case of openstack-infra, this
is to fix a DNS issue by when creating the mirror name of our regional
mirrors.

Change-Id: I3ac65744356e3fa25d10208d11be95dc16b1e2e7
Depends-On: Idc7686167d131d8e74d55b8f7f50224a1b782091
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
changes/88/493088/1
Paul Belanger 5 years ago
parent 2857140150
commit d28c755ee6
  1. 1
      tests/base.py
  2. 1
      tests/fixtures/config/ansible/git/common-config/playbooks/check-vars.yaml
  3. 1
      zuul/executor/client.py
  4. 1
      zuul/executor/server.py

@ -1659,6 +1659,7 @@ class FakeNodepool(object):
now = time.time()
path = '/nodepool/nodes/'
data = dict(type=node_type,
cloud='test-cloud',
provider='test-provider',
region='test-region',
az='test-az',

@ -4,6 +4,7 @@
assert:
that:
- nodepool.az == 'test-az'
- nodepool.cloud == 'test-cloud'
- nodepool.region == 'test-region'
- nodepool.provider == 'test-provider'

@ -218,6 +218,7 @@ class ExecutorClient(object):
for node in nodeset.getNodes():
nodes.append(dict(name=node.name, label=node.label,
az=node.az,
cloud=node.cloud,
host_keys=node.host_keys,
provider=node.provider,
region=node.region,

@ -1152,6 +1152,7 @@ class AnsibleJob(object):
ansible_port=port,
nodepool=dict(
az=node.get('az'),
cloud=node.get('cloud'),
provider=node.get('provider'),
region=node.get('region')))

Loading…
Cancel
Save