Remove unnecessary overrides of ansible_python_interpreter
Bifrost cannot operate in virtual environments without system site packages, so overriding ansible_python_interpreter to system Python is not necessary. Document this limitations. Change-Id: I669c4e248d23f65015533635ed09dcaf60f8f8f2
This commit is contained in:
parent
e026d0d110
commit
28c08488a5
@ -26,7 +26,6 @@ COMMON_ENV = {
|
|||||||
'VENV': VENV,
|
'VENV': VENV,
|
||||||
}
|
}
|
||||||
COMMON_PARAMS = [
|
COMMON_PARAMS = [
|
||||||
'-e', 'ansible_python_interpreter=%s/bin/python3' % VENV,
|
|
||||||
'-e', 'bifrost_venv_dir=%s' % VENV,
|
'-e', 'bifrost_venv_dir=%s' % VENV,
|
||||||
]
|
]
|
||||||
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
|
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
|
||||||
|
@ -279,6 +279,10 @@ before calling ``env-setup.sh``::
|
|||||||
If you're using the ansible playbooks directly (without the helper scripts),
|
If you're using the ansible playbooks directly (without the helper scripts),
|
||||||
set the ``bifrost_venv_dir`` variables accordingly.
|
set the ``bifrost_venv_dir`` variables accordingly.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
Because of Ansible dependencies Bifrost only supports virtual environments
|
||||||
|
created with ``--system-site-packages``.
|
||||||
|
|
||||||
Pre-installation settings
|
Pre-installation settings
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
@ -12,16 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
---
|
---
|
||||||
# NOTE(hwoarang) The 'apt' module needs python-apt installed in the virtualenv
|
|
||||||
# but it's not possible to do that. See https://github.com/ansible/ansible/issues/14468
|
|
||||||
# python-apt only works if it's installed on the local system so we need to switch the
|
|
||||||
# Ansible python interpreter.
|
|
||||||
- name: "Update apt cache if Ubuntu/Debian"
|
- name: "Update apt cache if Ubuntu/Debian"
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: '/usr/bin/python3'
|
|
||||||
|
|
||||||
- name: "Load distribution defaults"
|
- name: "Load distribution defaults"
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
@ -36,16 +30,10 @@
|
|||||||
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
- "../defaults/required_defaults_{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
||||||
- "../defaults/dummy-defaults.yml"
|
- "../defaults/dummy-defaults.yml"
|
||||||
|
|
||||||
# NOTE(hwoarang) The 'apt' module needs python-apt installed in the virtualenv
|
|
||||||
# but it's not possible to do that. See https://github.com/ansible/ansible/issues/14468
|
|
||||||
# python-apt only works if it's installed on the local system so we need to switch the
|
|
||||||
# Ansible python interpreter.
|
|
||||||
- name: "Install required packages"
|
- name: "Install required packages"
|
||||||
package:
|
package:
|
||||||
name: "{{ required_packages }}"
|
name: "{{ required_packages }}"
|
||||||
state: present
|
state: present
|
||||||
vars:
|
|
||||||
ansible_python_interpreter: '/usr/bin/python3'
|
|
||||||
|
|
||||||
- name: ensure installation root folder exists
|
- name: ensure installation root folder exists
|
||||||
become: yes
|
become: yes
|
||||||
|
5
releasenotes/notes/interpreter-a6cd3a98e9cd239f.yaml
Normal file
5
releasenotes/notes/interpreter-a6cd3a98e9cd239f.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
issues:
|
||||||
|
- |
|
||||||
|
Because of Ansible dependencies Bifrost only works on virtual environments
|
||||||
|
created with ``--system-site-packages``.
|
@ -163,7 +163,6 @@ export BIFROST_INVENTORY_SOURCE=${BAREMETAL_DATA_FILE}
|
|||||||
${ANSIBLE} -vvvv \
|
${ANSIBLE} -vvvv \
|
||||||
-i inventory/bifrost_inventory.py \
|
-i inventory/bifrost_inventory.py \
|
||||||
${TEST_PLAYBOOK} \
|
${TEST_PLAYBOOK} \
|
||||||
-e ansible_python_interpreter="${ANSIBLE_PYTHON_INTERP}" \
|
|
||||||
-e use_cirros=${USE_CIRROS} \
|
-e use_cirros=${USE_CIRROS} \
|
||||||
-e testing_user=${TESTING_USER} \
|
-e testing_user=${TESTING_USER} \
|
||||||
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
|
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user