Ansible on minimalistic Debian

Let's assume we have really minimalist Debian distribution, something like on Raspberry Pi. And we want to use Ansible on that box. The official Ansible documentation do not cover in details installing it on really minimalist distro and using the official documentation would mess up Python libraries, as it suggest to use pip to install libraries that are already packaged as *.dpk (you know Debian packages all in "debian way"...). So the correct sequence is as follow:

  • apt-get update
  • apt-get upgrade
  • apt-get install aptitude
  • aptitude install apt-utils (Necessary to correctly handle Python *.dpk with Python libraries)
  • aptitude install python-httplib2
  • aptitude install python-jinja2
  • aptitude install python-yaml
  • aptitude install python-paramiko
  • aptitude install git
  • aptitude install sshpass

At this point we shall have all dependencies necessary to run Ansible installed. The official Ansible docs recommend the pip install paramiko PyYAML jinja2 httplib2 what will not work on Debian. Now it is trivial to install Ansible:
  • cd /opt/
  • git clone https://github.com/ansible/ansible.git
  • cd ansible/
  • source ./hacking/env-setup
Why I care about Ansible? There is one killer feature that distinguish it from competition (Puppet, Chef, Salt...). It is agentless. No software is installed on managed nodes. It clearly means that Linux clean install with SSH access is ready to deploy platform. And the whole provisioning and deployment will be only one command: ansible.
.
.
.

Comments

Popular posts from this blog

Hardening OpenWRT - adding non-root user account

Dropbear SSH keys and autossh on OpenWRT

SSH Tunel with OpenWRT