Installation Ansible auf einem Debian

Hier ein kleines Snippet, wie man Ansible ganz einfach mal installiert bekommt auf einem Debian.

Voraussetzungen

  • VM mit installiertem Debian 11

Ich persönlich bevorzuge im tasksel keine Software und komplettiere das Setup wie folgt:

apt-get update
apt-get upgrade
apt-get install open-vm-tools bash-completion ssh -y

Anschliessend werden die benötigten Pakete installiert, der Repokey im System hinterlegt, das Repo für Ansible erstellt, das Repo aktualisiert und anschliessend Ansible installiert.

apt install gnupg2 -y

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu focal main" > /etc/apt/sources.list.d/ansible.list

apt update
apt install ansible -y

Nun kann getestet werden, ob Ansible korrekt installiert wurde.

ansible --version
user@ansible:~# ansible --version
ansible [core 2.11.5] 
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]
  jinja version = 2.11.3
  libyaml = True

Leave a Reply

Your email address will not be published. Required fields are marked *