Keep your repository neat and clean is a mandatory repository requirement, same as readable documentation and a good code, preferably useful. So, one of the first things I do in a new project is a .gitignore file.

Naturally, different languages and projects have quite a different project structure and file names, but I'm about to show you my list for the Ansible Tower projects.

  1. I always skip all backups and runtime leftovers.
  2. I ignore entire roles/ folder content for the Ansible Tower projects, except the list of requirements.
  3. All files that may contain plain-text passwords. Keep passwords in vaults, guys.
  4. Most common binaries. Git is not the best repo for that kind of content.
# Ansible Tower ignore list

# Ansible runtime and backups

# Tower runtime roles 

# Try tyo avoid any plain-text passwords 

# Exclude all binaries
Ansible Tower project .gitignore

Image source: