This ansible project downloads, compiles and installs Bluez-5.41 including all pre-requisites on the Raspberry PI. To run, execute the following steps:
sudo su -
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
apt-get update
apt-get install -y ansible git
git clone https://github.com/mkieboom/raspberrypi-bluez
cd raspberrypi-bluez
ansible-playbook -i myhosts/raspberrypi_localhost raspberrypi-deployment.yml --connection=local
reboot