![](/img/trans.png)
[英]Use Git repository hosted on S3 instead of Github/Stash in ansible-pull command
[英]ansible-pull not finding playbook to run
我对ansible很陌生,大约有几个小时的经验。 我目前正在尝试运行ansible-pull
命令,但它没有按照我期望的方式运行。 我有一个.yml文件的git回购。 在仓库内部,我只有.yml和README文件。
我正在运行的命令是:
ansible-pull -d ./ansible_directory -U github.repo
我收到一条错误消息,指出local.yml文件不存在。 这反过来给我一个错误,显示为ERROR! Could not find a playbook to run.
ERROR! Could not find a playbook to run.
。
我不确定在哪里/如何创建local.yml文件。 如果有人能指出我正确的方向,将不胜感激。
尝试
ansible-pull -C <branch name> -U https://github.com/<username>/<repo>.git <file_name>.yml
在以下仓库中浏览“ README.md”和“ pull.play”文件。
git clone https://github.com/harshad007/ansible_pull.git
在主机文件中使用git存储库url和IP地址进行必要的更改
如果一切正常,请先将pull.play脚本运行为“ ansible-playbook pull.play”,然后在几分钟后检查“远程系统”上的/var/log/ansible-pull.log。 在这里,GitHub存储库中的local.yml文件已执行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.