博托错误启动ec2实例
问题描述:
我使用ansible创建一个ec2 isntance。 PlayBook的运行过程中,我得到的错误是:博托错误启动ec2实例
TASK [create a single ec2 instance] ********************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: name 'botocore' is not defined
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_eVkiMV/ansible_module_ec2.py\", line 1554, in <module>\n from ansible.module_utils.ec2 import *\n File \"/tmp/ansible_eVkiMV/ansible_modlib.zip/ansible/module_utils/ec2.py\", line 61, in <module>\n File \"/tmp/ansible_eVkiMV/ansible_modlib.zip/ansible/module_utils/ec2.py\", line 62, in AWSRetry\nNameError: name 'botocore' is not defined\n", "module_stdout": "", "msg": "MODULE FAILURE"}
to retry, use: --limit @apache_aws.retry
PLAY RECAP *********************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1
它说,botocore没有定义,但我使用PIP安装博托安装博托。任何人都可以请弄清楚是什么问题?
答
您需要安装boto3(pip install boto3
)