diff --git a/doc/source/configuration/kayobe.rst b/doc/source/configuration/kayobe.rst index 7c5b0fdde..d3159231c 100644 --- a/doc/source/configuration/kayobe.rst +++ b/doc/source/configuration/kayobe.rst @@ -132,3 +132,7 @@ If kayobe detects that ``ansible_python_interpreter`` is set and references a virtual environment, it will create the virtual environment if it does not exist. Typically this variable should be set via a group variable for hosts in the ``seed``, ``seed-hypervisor``, and/or ``overcloud`` groups. + +The default Kayobe configuration in the ``kayobe-config`` repository sets +``ansible_python_interpreter`` to ``{{ virtualenv_path }}/kayobe/bin/python`` +for the ``seed``, ``seed-hypervisor``, and ``overcloud`` groups. diff --git a/etc/kayobe/inventory/group_vars/overcloud/ansible-python-interpreter b/etc/kayobe/inventory/group_vars/overcloud/ansible-python-interpreter new file mode 100644 index 000000000..54abbf23c --- /dev/null +++ b/etc/kayobe/inventory/group_vars/overcloud/ansible-python-interpreter @@ -0,0 +1,3 @@ +--- +# Use a virtual environment for remote operations. +ansible_python_interpreter: "{{ virtualenv_path }}/kayobe/bin/python" diff --git a/etc/kayobe/inventory/group_vars/seed-hypervisor/ansible-python-interpreter b/etc/kayobe/inventory/group_vars/seed-hypervisor/ansible-python-interpreter new file mode 100644 index 000000000..54abbf23c --- /dev/null +++ b/etc/kayobe/inventory/group_vars/seed-hypervisor/ansible-python-interpreter @@ -0,0 +1,3 @@ +--- +# Use a virtual environment for remote operations. +ansible_python_interpreter: "{{ virtualenv_path }}/kayobe/bin/python" diff --git a/etc/kayobe/inventory/group_vars/seed/ansible-python-interpreter b/etc/kayobe/inventory/group_vars/seed/ansible-python-interpreter new file mode 100644 index 000000000..54abbf23c --- /dev/null +++ b/etc/kayobe/inventory/group_vars/seed/ansible-python-interpreter @@ -0,0 +1,3 @@ +--- +# Use a virtual environment for remote operations. +ansible_python_interpreter: "{{ virtualenv_path }}/kayobe/bin/python" diff --git a/releasenotes/notes/default-target-virtualenv-3a68472f66b7aaf3.yaml b/releasenotes/notes/default-target-virtualenv-3a68472f66b7aaf3.yaml new file mode 100644 index 000000000..93e8afb61 --- /dev/null +++ b/releasenotes/notes/default-target-virtualenv-3a68472f66b7aaf3.yaml @@ -0,0 +1,14 @@ +--- +fixes: + - | + Fixes an issue introduced by the release of ``pip`` version 10, whereby the + Python ``docker`` package would fail to install. This is resolved by using + a remote Python virtual environment for executing Kayobe Ansible tasks by + default. See `Story 2002010 + `__ for details. +upgrade: + - | + Modifies the default ``kayobe-config`` configuration to use a remote Python + virtual environment for executing Kayobe Ansible tasks. This affects hosts + in the ``seed``, ``seed-hypervisor``, and ``overcloud`` groups. See `Story + 2002010 `__ for details.