When playing with vagrant, I set up a haproxy keepalived apache stack on ubuntu precise.
For that I forked this repository vagrant-haproxy-demo from github (https://github.com/justintime/vagrant-haproxy-demo.git) that run a haproxy standalone instance and I append my change to it to support keepalived.
First of all, I create the repository vagrant-haproxy-keepalived.
and I set remote origin to the repository created.
I create a new branch named development, I modify code and I do a commit.
Finally I checkout to master and rebase the branch development.
git remote set-url origin https://github.com/mezgani/vagrant-haproxy-keepalived.git
git checkout -b development
git add .
git commit -a
git checkout master
git rebase development
git push origin master
My code is here https://github.com/mezgani/vagrant-haproxy-keepalived.git, you can browse code.