我如何避免在我的Ansible角色中自动创建.travis.yml文件?
我已经使用Ansible-galaxy Init my_role
创建了多个角色,过了一会儿,我意识到.travis.yml
文件是自动为基本语法测试而自动创建的。我不打算使用Travis CI,因此此.travis.yml
文件是没有用的。
我相信这是有充分的理由,因此,如果您也可以解释一下,我会很感激。
这是文件:
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
I have created several roles with ansible-galaxy init my_role
and after a while I realized a .travis.yml
file was created automatically for a basic syntax testing. I am not planning to use Travis CI, so this .travis.yml
file is useless.
I am sure there is a good reason why this occurred, so if you may also explain it I would be thankful.
This is the file:
---
language: python
python: "2.7"
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
install:
# Install ansible
- pip install ansible
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >ansible.cfg
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它是默认角色骨架的一部分。如果要使用其他骨架,请使用
使用
- code> - cole> - copor-skeleton
flag:It's part of the default role skeleton. If you want to use a different skeleton, pass it to
ansible-galaxy
using the--role-skeleton
flag: