首页 > 解决方案 > Ansible 执行剧本 boto 丢失

问题描述

运行 ansible playbook 时,它会显示以下消息

失败的!=> {"changed": false, "msg": "boto required for this module"}

我在 ansible-playbook 中指定了 python 解释器,如下所示:

  hosts: aws
  become: yes
  gather_facts: no
  tasks:
    - set_fact:
        ansible_python_interpreter: /usr/bin/python3

当我检查 pip3 模块时,它已安装。

$ pip3 list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
apturl (0.5.2)
asn1crypto (0.24.0)
boto (2.49.0)
boto3 (1.9.88)
botocore (1.12.92)

标签: ansibleboto

解决方案


推荐阅读