How can I avoid getting a .travis.yml file automatically created inside my ansible role?

We are running Travis CI Enterprise,

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’d like it if the .travis.yml gets created on our terms not automatically, any conditions we can set?

This is the file:

language: python
python: "2.7"

# Use the new container infrastructure
sudo: false

# Install ansible
    - python-pip

  # Install ansible
  - pip install ansible

  # Check ansible version
  - ansible --version

  # Create ansible.cfg with correct roles_path
  - printf '[defaults]\nroles_path=../' >ansible.cfg

  # Basic role syntax check
  - ansible-playbook tests/test.yml -i tests/inventory --syntax-check


Hey @Spineswitch,

I recommend you read Ansible’s documentation at some point. This function is part of the default role skeleton. If you want to use a different skeleton, pass it to ansible-galaxy using the --role-skeleton flag:

ansible-galaxy init --role-skeleton ~/ansible-skeletons/role roles/foo

This really isn’t a Travis CI issue, but a configuration problem on your end, and more specifically the nuances of Ansible. Please try and make your posts (regarding issues) in the future Travis CI related.