Ive been testing out the new UrBackup client and I love it.
At the same time I’ve been looking at how Ansible works and trying to test it out.
Because of Uroni’s insane development speed, I though it would be useful to develop a small playbook for installing urbackup client, in headless mode, on my servers. At the moment this has only been tested on Ubuntu 14.04, and requires the version number to be inputed exactly as mentioned in the archive name, ex 126.96.36.199.
The playbook needs to be run by user with sudo rights, and called with
ansible-playbook urbackup_client_install.yml --ask-sudo-pass
It will ask you for the source URL and version number
This is what it does
- pings clients to see if they are there
- installs dependency packages (‘libcrypto+±dev’, ‘g++’, ‘build-essential’, ‘curl’, u
- kills the existing urbackupclientbackend process on the machines (this will give an error, which is ignored by ansible, if this process does not exist)
- creates the directory /opt/urbackup
- downloads the sources and extracts it to /opt/urbackup/source_name
- in the source folder, runs ./configure --enable-headless, make ,checkinstall -y --pkgname=“urbackup-client” --nodoc --pkgversion=version_number
- updates rc.local with ‘/usr/local/sbin/urbackupclientbackend -d’
- runs ‘/usr/local/sbin/urbackupclientbackend -d’
You can find the playbook here
I’m new to ansible so feel free to improve and comment !