首页 > 解决方案 > 将 Ansible 与阿里巴巴/阿里云模块一起使用

问题描述

我对 Ansible 比较陌生,对 Alicloud 完全陌生。我试图弄清楚如何使用此处找到的模块列表:http: //47.88.222.42 :8080/ansible-alicloud/latest/modules/list_of_cloud_modules.html ,或者实际上是否有一种方法可以做。官方看来,Ansible 仅支持 Alicloud 的两个模块(可在此处找到:https ://docs.ansible.com/ansible/2.9/modules/list_of_cloud_modules.html ),但我之前在几个网站上看到的其他模块为教程的一部分,所以我认为它们应该可以正常工作。有人可以帮我弄这个吗?我专门看这个模块:http: //47.88.222.42 :8080/ansible-alicloud/latest/modules/ali_vpc_module.html#ali-vpc-module

我目前的问题是,当使用模块运行剧本时,它给了我错误

ERROR! couldn't resolve module/action 'ali_vpc'. This often indicates a misspelling, missing collection, or incorrect module path.

任何帮助表示赞赏。

提前致谢!

标签: moduleansiblecloud

解决方案


您需要通过执行来安装模块pip install ansible-alicloud。然后您将能够ali_vpc/home/cheshi/.local/lib/python3.8/site-packages/ansible/modules/cloud/alicloud/ali_vpc.py

https://pypi.org/project/ansible-alicloud/


推荐阅读