From 5e6c7d96e361452977cd53cede6e2bb4ff966c21 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Jan 2019 10:51:11 -0500 Subject: [PATCH] overcloud-agent: create ansible-playbook symlinks in post-install overcloud-agent element takes care of deploying the heat-agents that depend on Ansible. This temporary workaround makes sure: - ansible-playbook exists if ansible-playbook-3 only is installed (f28) - ansible-playbook-3 exists if ansible-playbook only is installed (el8) Change-Id: Iad05160afb700a18caf5d3584c2826857412a3fa Related-Bug: #1812837 --- .../post-install.d/51-ansible-symlink | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 elements/overcloud-agent/post-install.d/51-ansible-symlink diff --git a/elements/overcloud-agent/post-install.d/51-ansible-symlink b/elements/overcloud-agent/post-install.d/51-ansible-symlink new file mode 100755 index 00000000..109b7aea --- /dev/null +++ b/elements/overcloud-agent/post-install.d/51-ansible-symlink @@ -0,0 +1,14 @@ +#!/bin/bash + +set -eux +set -o pipefail + +if [ ! -f /usr/bin/ansible-playbook ]; then + if [ -f /usr/bin/ansible-playbook-3 ]; then + ln -s -f /usr/bin/ansible-playbook-3 /usr/local/bin/ansible-playbook + fi +else + if [ ! -f /usr/bin/ansible-playbook-3 ]; then + ln -s -f /usr/bin/ansible-playbook /usr/local/bin/ansible-playbook-3 + fi +fi