【发布时间】:2018-07-26 09:03:52
【问题描述】:
我已经安装了 Packstack 和 Ansible 2.7.5,我想使用 Ansible 进行测试和部署 VM。我正在使用以下代码:
--- #Deploy an instance
- name: Deploy an instance
hosts: localhost
gather_facts: false
tasks:
- name: Deploy an instance
os_server:
state: present
auth:
auth_url: http://127.0.0.1:5000/v2.0/
username: admin
password: 712e207207aa4083
project_name: admin
name: webserver
image: cirros
key_name: root
timeout: 200
flavor: 1
nics:
- net-id: fa6af4e6-c44e-439c-a91c-03bcae55e587
meta:
hostname: webserver.localdomain
当我运行它时,我收到以下错误:
TASK [Deploy an instance] *****************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "To utilize this module, the installed version ofthe openstacksdk library MUST be >=0.12.0"}
to retry, use: --limit @/home/dante/Openstack/deployment.retry
PLAY RECAP ********************************************************************************************************************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1
我也尝试安装 Openstacksdk 0.12.0,但我收到了一些与依赖项相关的其他错误:
[dante@localhost Openstack]$ sudo pip install openstacksdk==0.12.0
...
Installing collected packages: ipaddress, os-service-types, PyYAML, openstacksdk
Found existing installation: ipaddress 1.0.16
Cannot uninstall 'ipaddress'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
有什么办法可以解决这个问题吗?或者,如果这个模块是新的并且有太多的错误,有没有其他方法可以使用 Ansible 在 Openstack 中创建 VM?我还检查了 nova_compute 模块的版本,但它说这个 Ansible 模块在 Ansible 2.0 之后已被弃用。
最好的问候, 罗曼
【问题讨论】:
-
您从哪里获得 Ansible 2.7.5?
-
@techraf:我正在使用一些 EC2 服务器,这是该存储库可用的最后一个 Ansible 版本。
-
有趣,因为截至今天的最新版本是 2.6.2。
-
可能他的意思是 Python 2.7.5?
标签: ansible virtual-machine openstack