0

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/
Zeitounator
  • 38,476
  • 7
  • 53
  • 66
RicHincapie
  • 3,275
  • 1
  • 18
  • 30
  • 2
    That's just a part of the standard role template used by `anisble-galaxy`. You can ignore it, delete it, etc. – larsks Jun 03 '22 at 14:45

1 Answers1

2

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:

ansible-galaxy init --role-skeleton ~/ansible-skeletons/role roles/foo
flowerysong
  • 2,921
  • 4
  • 13