mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-19 04:00:11 -03:30
[docs] document support for ansible versions (#8827)
drop note about not supporting ansible 2.9 since we still cover it in nightly CI
This commit is contained in:
@@ -1,4 +1,35 @@
|
||||
# Ansible variables
|
||||
# Ansible
|
||||
|
||||
## Installing Ansible
|
||||
|
||||
Kubespray supports multiple ansible versions and ships different `requirements.txt` files for them.
|
||||
Depending on your available python version you may be limited in chooding which ansible version to use.
|
||||
|
||||
It is recommended to deploy the ansible version used by kubespray into a python virtual environment.
|
||||
|
||||
```ShellSession
|
||||
VENVDIR=kubespray-venv
|
||||
KUBESPRAYDIR=kubespray
|
||||
ANSIBLE_VERSION=2.12
|
||||
virtualenv --python=$(which python3) $VENVDIR
|
||||
source $VENVDIR/bin/activate
|
||||
cd $KUESPRAYDIR
|
||||
pip install -U -r requirements-$ANSIBLE_VERSION.txt
|
||||
test -f requirements-$ANSIBLE_VERSION.yml && \
|
||||
ansible-galaxy role install -r requirements-$ANSIBLE_VERSION.yml && \
|
||||
ansible-galaxy collection -r requirements-$ANSIBLE_VERSION.yml
|
||||
```
|
||||
|
||||
### Ansible Python Compatibility
|
||||
|
||||
Based on the table below and the available python version for your ansible host you should choose the appropriate ansible version to use with kubespray.
|
||||
|
||||
| Ansible Version | Python Version |
|
||||
| --------------- | -------------- |
|
||||
| 2.9 | 2.7,3.5-3.8 |
|
||||
| 2.10 | 2.7,3.5-3.8 |
|
||||
| 2.11 | 2.7,3.5-3.9 |
|
||||
| 2.12 | 3.8-3.10 |
|
||||
|
||||
## Inventory
|
||||
|
||||
@@ -272,9 +303,3 @@ pip uninstall ansible ansible-base ansible-core
|
||||
cd kubespray/
|
||||
pip install -U .
|
||||
```
|
||||
|
||||
**Note:** some changes needed to support ansible 2.10+ are not backwards compatible with 2.9
|
||||
Kubespray needs to evolve and keep pace with upstream ansible and will be forced to eventually
|
||||
drop 2.9 support. Kubespray CIs use only the ansible version specified in the `requirements.txt`
|
||||
and while the `ansible_version.yml` may allow older versions to be used, these are not
|
||||
exercised in the CI and compatibility is not guaranteed.
|
||||
|
||||
Reference in New Issue
Block a user