From 7d3c7b16bb62da7c5d184cfdff8484a85fca6e8e Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 23 Jan 2019 10:55:19 -0500 Subject: [PATCH] deployed-servers: symlink ansible-playbook In RHEL8, we'll have /usr/bin/ansible-playbook provided by ansible package. Everywhere in TripleO we rely on /usr/bin/ansible-playbook but the ansible-python3 package in Fedora 28 doesn't provide it. Until it does, we have a temporary workaround that will create a symlink only if the file doesn't exist and if ansible-playbook3 is here. Change-Id: I520bf0d665fa9a331fe94168595d3b09dbf1795c Related-Bug: #1812837 --- deployed-server/deployed-server-bootstrap-centos.sh | 10 ++++++++++ deployed-server/deployed-server-bootstrap-rhel.sh | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/deployed-server/deployed-server-bootstrap-centos.sh b/deployed-server/deployed-server-bootstrap-centos.sh index 33bd30fcd2..cf48b3964e 100755 --- a/deployed-server/deployed-server-bootstrap-centos.sh +++ b/deployed-server/deployed-server-bootstrap-centos.sh @@ -18,3 +18,13 @@ sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/iptables echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/ip6tables + +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 diff --git a/deployed-server/deployed-server-bootstrap-rhel.sh b/deployed-server/deployed-server-bootstrap-rhel.sh index 2d04a031a0..2c9cc97e5c 100755 --- a/deployed-server/deployed-server-bootstrap-rhel.sh +++ b/deployed-server/deployed-server-bootstrap-rhel.sh @@ -15,3 +15,13 @@ ln -s -f /usr/share/openstack-puppet/modules/* /etc/puppet/modules echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/iptables echo '# empty ruleset created by deployed-server bootstrap' > /etc/sysconfig/ip6tables + +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