Git, Gitweb, and RANCID: Automated Installation
rancid-git is a patched version of RANCID that allows you to easily
git as the RCS for RANCID.
rancid-git is a potentially daunting task. You can either build
deb package and hope it installs correctly, or you can install from source.
If you’re using a Red Hat-based distribution, building the
rpm is completely
untested. Besides that, you need to do it on at least two servers, and I’m not
a fan of doing anything more than once manually.
Ansible is my preferred framework for automation. I wrote an Ansible role
rancid-git and sets up Gitweb for me, using
nginx as the
You’ll need to clone the repository and place the
folder in your
Next, you’ll want to update the variables in
/etc/ansible/roles/rancid-git/vars/main.yml to match your environment.
Once you’ve done that, you can just add the
rancid-git role to a playbook.
If you don’t have one or if you’re just getting started with Ansible, here’s
Obviously, my role is missing a few things. The Red Hat-specific packages aren’t there, and some of the paths should be modified for Red Hat installations. I welcome the pull requests.
I’d also like to provide a way to specify either
apache as the web
server, increasing the flexibility.
Certain files aren’t currently managed by Ansible (namely the
files). I need to get these to be managed by the Ansible role as well.
There’s also a way to allow roles to be installed via
ansible-galaxy. I need
to get around to adapting for that as well.
This Ansible role will set you up the RANCID, but you’ll still need to do some
of the other setup (updating the
/etc/aliases, etc). You can go through a basic walkthrough here.
Thanks for reading. Please open issues on the GitHub page. If you want to contribute, please open pull requests.
This post is part of the #30in30 challenge.