Make ceph-ansible integration respect PythonInterpreter

PythonInterpreter defaults to /usr/bin/python. If a user overrides
this default, e.g. to something like python3, then we should use it.
Modify ceph-base.yml to use the PythonInterpreter parameter. The
variable will already be set to ansible_python_interpreter by the
calling ansible execution.

Change-Id: If599855c00d0ab8861ea7f873d410f9a880d35be
Closes-Bug: #1811974
This commit is contained in:
John Fulton 2019-01-16 11:37:34 +00:00
parent c0b7d47084
commit 8f297c22e7
1 changed files with 2 additions and 0 deletions

View File

@ -469,6 +469,7 @@ outputs:
- '{% if ansible_ssh_private_key_file is defined %}--private-key {{ansible_ssh_private_key_file}}{% endif %}'
- '-i'
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
- '{{playbook_dir}}/ceph-ansible/nodes_uuid_playbook.yml'
- name: set ceph-ansible params from Heat
set_fact:
@ -556,6 +557,7 @@ outputs:
expression: $.data.items().select($[0] + '=' + $[1]).join(' ')
- ansible-playbook
- '{% if ansible_ssh_private_key_file is defined %}--private-key {{ansible_ssh_private_key_file}}{% endif %}'
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
- '-{%- for number in range(0, ceph_ansible_playbook_verbosity) -%}v{% endfor %}'
- if:
- ceph_ansible_skip_tags_set