1. 基础环境
apt update
apt install git python3-dev libffi-dev gcc libssl-dev
apt install python3-venv
2. 设置虚拟环境变量
root@controller01:~# python3 -m venv /deploy/venv
root@controller01:~# source /deploy/venv/bin/activate
(venv) root@controller01:~#
(venv) root@controller01:~# pip install -U pip
(venv) root@controller01:~# pip install 'ansible>=4,<6'
3.安装Kolla-ansible
pip install git+https://opendev.org/openstack/kolla-ansible@unmaintained/yoga
sudo mkdir -p /etc/kolla
sudo chown $USER:$USER /etc/kolla
cp -r /deploy/venv/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
cp /deploy/venv/share/kolla-ansible/ansible/inventory/* .
#虚拟环境变量需要在inventory中增加下面配置
localhost ansible_python_interpreter=python```
(venv