From 8f297c22e7f6c821a968c4a6917bc6e13a6bfe6e Mon Sep 17 00:00:00 2001 From: John Fulton Date: Wed, 16 Jan 2019 11:37:34 +0000 Subject: [PATCH] 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 --- docker/services/ceph-ansible/ceph-base.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/services/ceph-ansible/ceph-base.yaml b/docker/services/ceph-ansible/ceph-base.yaml index 625c1348ef..d589687fd6 100644 --- a/docker/services/ceph-ansible/ceph-base.yaml +++ b/docker/services/ceph-ansible/ceph-base.yaml @@ -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