【发布时间】:2016-10-25 15:18:05
【问题描述】:
我有一个 git 项目,剧本中的角色很少,我想使用 ansible galaxy 中的角色之一。
repo 的克隆正在运行,但在归档阶段失败:
executing: git clone https://myuser@github.com/my-project/search-mysql search-mysql executing: git archive --prefix=search-mysql/ --output=/tmp/tmp3f6ySq.tar search
command git archive --prefix=search-mysql/ --output=/tmp/tmp3f6ySq.tar search failed
使用requirements.yml文件,和
ansible-galaxy install --role-file=requirements.yml --roles-path=roles --force
知道存档失败的原因吗? 我可以只下载角色而不下载整个项目(search-mysql)吗?
谢谢,
【问题讨论】:
-
你能显示你
requirements.yml的相关部分吗?我从未见过如何使用 repo 的单个子目录作为星系角色源的功能。很好奇你是怎么尝试的。 -
当然,但这只是在测试中,我仍然无法让它工作:-src:myuser@github.com/my-project/search-mysql version:master name:search-mysql 这将克隆我所有的项目,我需要要么仅克隆角色文件夹或从我的 ansible 调用此项目中的特定角色。
标签: mysql ansible ansible-playbook ansible-galaxy