tripleo_deploy: 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: I040345ffb76a14035e6100c4e61a9aea07b690c6 Related-Bug: #1812837
This commit is contained in:
parent
034edf0c93
commit
9e500285f0
|
@ -106,6 +106,18 @@ class Deploy(command.Command):
|
|||
ansible_playbook_cmd = "ansible-playbook-{}".format(python_version)
|
||||
python_cmd = "python{}".format(python_version)
|
||||
|
||||
# https://bugs.launchpad.net/tripleo/+bug/1812837
|
||||
if not os.path.exists('/usr/bin/ansible-playbook'):
|
||||
if os.path.exists('/usr/bin/' + ansible_playbook_cmd):
|
||||
if not os.path.exists('/usr/local/bin/ansible-playbook'):
|
||||
os.symlink('/usr/bin/' + ansible_playbook_cmd,
|
||||
'/usr/local/bin/ansible-playbook')
|
||||
else:
|
||||
if not os.path.exists('/usr/bin/' + ansible_playbook_cmd):
|
||||
if not os.path.exists('/usr/local/bin/' + ansible_playbook_cmd):
|
||||
os.symlink('/usr/bin/ansible-playbook',
|
||||
'/usr/local/bin/' + ansible_playbook_cmd)
|
||||
|
||||
def _is_undercloud_deploy(self, parsed_args):
|
||||
return parsed_args.standalone_role == 'Undercloud' and \
|
||||
parsed_args.stack == 'undercloud'
|
||||
|
|
Loading…
Reference in New Issue