openstack-ansible-ops/multi-node-aio/playbooks/inventory/openstack-ansible
Jesse Pretorius 2de8dbb24a MNAIO: Use the OSA inventory and plugins where possible
There are times when it's useful to run playbooks against the
OSA inventory, but having to do so via infra1 is a bit of a
pain. Rather than do that we add a script which fetches the
OSA inventory file from infra1, and we also bootstrap the OSA
plugins repo into the default ansible plugins path so that it
is possible to run playbooks against the containers in the VM's
from the host without needing to do anything else.

Change-Id: I751af19841ea825d21dd67f4343674b8522b689f
2018-10-17 12:09:43 +01:00

3 lines
254 B
Bash
Executable File

#!/bin/bash
ssh -q -ttt -o ConnectTimeout=1 -o StrictHostKeyChecking=no root@infra1 'OSA_INVENTORY_FILE="/etc/openstack_deploy/openstack_inventory.json"; if [[ -e ${OSA_INVENTORY_FILE} ]]; then cat ${OSA_INVENTORY_FILE}; else echo "{}"; fi' || echo "{}"