From 58c16db2cd63c610df6e5fa01e02ac5e16f7f7f1 Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Mon, 23 Oct 2023 18:28:08 +0100 Subject: [PATCH] Mount edpm-ansible into the ansible-runner target Signed-off-by: Fabricio Aguiar --- devsetup/scripts/edpm-ansible-runner.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devsetup/scripts/edpm-ansible-runner.sh b/devsetup/scripts/edpm-ansible-runner.sh index a9a89d880..50c778e7e 100755 --- a/devsetup/scripts/edpm-ansible-runner.sh +++ b/devsetup/scripts/edpm-ansible-runner.sh @@ -22,8 +22,15 @@ OUTPUT_DIR=${OUTPUT_DIR:-"../../out/edpm"} SSH_KEY_FILE=${SSH_KEY_FILE:-"ansibleee-ssh-key-id_rsa"} EDPM_INVENTORY_SECRET=${EDPM_INVENTORY_SECRET:-"dataplanenodeset-openstack-edpm"} EDPM_PLAYBOOK=${EDPM_PLAYBOOK:-"osp.edpm.download_cache"} +EDPM_ANSIBLE_PATH=${EDPM_ANSIBLE_PATH:-"../../out/edpm-ansible"} pushd ${SCRIPTPATH} + +if [ ! -d ${EDPM_ANSIBLE_PATH} ]; then + git clone https://github.com/openstack-k8s-operators/edpm-ansible.git ${EDPM_ANSIBLE_PATH} + echo "${EDPM_ANSIBLE_PATH} will be mounted into ${OPENSTACK_RUNNER_IMG}" +fi + pushd ${OUTPUT_DIR} oc get secret ${EDPM_INVENTORY_SECRET} -n ${NAMESPACE} -o json | jq '.data | map_values(@base64d)' | jq -r .inventory > inventory @@ -33,6 +40,7 @@ podman run --rm -ti \ -e "ANSIBLE_VERBOSITY=2" \ -e "ANSIBLE_CALLBACKS_ENABLED=profile_tasks" \ -e "ANSIBLE_SSH_ARGS=-C -o ControlMaster=auto -o ControlPersist=80s" \ + --volume "${EDPM_ANSIBLE_PATH}":/usr/share/ansible/collections/ansible_collections/osp/edpm:Z \ --volume "$(pwd)/inventory":/runner/inventory/hosts:Z \ --volume "$(pwd)/ansibleee-ssh-key-id_rsa":/runner/env/ssh_key:Z \ ${OPENSTACK_RUNNER_IMG} \