【发布时间】:2017-08-02 21:50:06
【问题描述】:
我已经启动了一个带有 ubuntu 系统的 ec2 实例。我将通过 ansible 在该系统上安装git。以下是我的剧本文件:
---
- hosts: ec2
roles:
- git
下面是我的 git 角色任务文件:
---
- name: install git
sudo: yes
yum:
pkg: git
state: latest
当我运行 ansible-playbook -i hosts git.yml 时出现以下错误:
TASK [git : install git] *********************************************************************************************************************************************************************************
fatal: [xxxxx.ap-southeast-2.compute.amazonaws.com]: FAILED! => {"changed": false, "failed": true, "msg": "python2 bindings for rpm are needed for this module. python2 yum module is needed fo
r this module"}
to retry, use: --limit @/Users/joey/dev/dbkoda/jenkins-docker-file/playbooks/git.retry
我不确定为什么会收到此错误消息。我已经在 ec2 实例上安装了 python。 python2 在 PATH 上可用。
下面是我正在使用的 Ansible 版本:
$ ansible-playbook --version
ansible-playbook 2.3.1.0
config file =
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Jul 18 2017, 09:17:00) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.42)]
【问题讨论】:
标签: ansible