我对ansible非常陌生,大约有几个小时的经验。我目前正在尝试运行一个ansible-pull命令,但它并不像我期望的那样工作。我有一个包含.yml文件的git存储库。在代码库中,我只有.yml和自述文件。
我正在运行的命令是:
ansible-pull -d ./ansible_directory -U github.repo
我收到一个错误,指出local.yml文件不存在。这反过来又给了我一个错误,读作ERROR! Could not find a playbook to run.。
我不确定在哪里/如何创建local.yml文件。如果有人能给我指出正确的方向,那将不胜感激。
发布于 2018-08-23 04:44:14
试一试
ansible-pull -C <branch name> -U https://github.com/<username>/<repo>.git <file_name>.yml 发布于 2016-05-10 18:20:56
通过以下代码库中的"README.md“和"pull.play”文件。
git克隆https://github.com/harshad007/ansible_pull.git
对主机文件中的git存储库url和IP地址进行必要的更改
如果一切正常,首先以"ansible-playbook pull.play“的身份运行日志脚本,然后在”远程系统“上进行几分钟的/var/ pull.play /ansible-pull.log检查。在这里,已经执行了来自GitHub存储库的local.yml文件。
https://stackoverflow.com/questions/37036784
复制相似问题