bridge-bootstrap: pass hostname for testing

This is another fixup for Iebaeed5028050d890ab541818f405978afd60124

As described inline; in production we want the nested ansible to use
the production inventory; but in the gate we haven't yet built the
inventory used for testing.  Pass an inventory list there.

Change-Id: If09ecb873368621687f6e396f766f4e22635c188
This commit is contained in:
Ian Wienand 2022-10-19 18:10:04 +11:00
parent a481cb1be2
commit 410af66ba6
No known key found for this signature in database

View File

@ -62,10 +62,17 @@
- name: Install root key
shell: >-
ansible-playbook -v ${ROOT_RSA_KEY} -i "localhost,"
ansible-playbook -v ${ROOT_RSA_KEY} ${BRIDGE_INVENTORY}
/home/zuul/src/opendev.org/opendev/system-config/playbooks/zuul/run-production-bootstrap-bridge-add-rootkey.yaml
> /var/log/ansible/install-root-key.{{ lookup('pipe', 'date +%Y-%m-%dT%H:%M:%S') }}.log 2>&1
environment:
ROOT_RSA_KEY: '{{ "-e @/home/zuul/root-rsa-key.json" if root_rsa_key is defined else "" }}'
# In production "install-ansible" has setup ansible to point
# to the system-config inventory which has bridge in it. In
# the gate, bridge is ephemeral and we haven't yet built the
# inventory to use for testing (that is done in
# zuul/run-base.yaml). Pass the hostname -- the playbook uses
# the local connection.
BRIDGE_INVENTORY: '{{ "-ibridge.openstack.org," if root_rsa_key is defined else "" }}'
ANSIBLE_ROLES_PATH: '/home/zuul/src/opendev.org/opendev/system-config/playbooks/roles'
no_log: true