ansible-playbook E: Package 'python-apt' has no installation candidate
作者:互联网
现象
启动ansible在Ubuntu 20.10节点安装服务
ansible-playbook -i ./hosts inventory/nginx.yml
提示错误: E: Package 'python-apt' has no installation candidate
问题原因
Ubuntu 20.10移除了python2环境
解决方法
ansible host文件中添加以下内容
ansible_python_interpreter=/usr/bin/python3
再重试,问题解决。
标签:installation,candidate,no,python,apt,ansible,playbook,20.10 来源: https://www.cnblogs.com/dearjazz/p/15434335.html