Every time I create a new playbook, I want to verify, that I grouped the hosts correctly. Here I is my "How I do it".
First of all. My hosts files are always in the yaml format, even tough it could be an INI file. I am using this format, as all playbooks use this format as well.
Example hosts.ya...
I have already an installation guide, on how to install the zabbix agent on linux servers here. Here I show how to create an ansible playbook, which automates the installation.
Functionality of the playbook
Installs zabbix agent version 5.2 (handled by a variable)
works on Ubuntu 20.04 and...
As Debian takes the Ansibe repository of Ubuntu, the following line has to be appended at /etc/apt/sources.list
deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --...
First we need a file, which contains the secrets. In my example the file is calles “secrets_demo.enc” and contains originally the following content:
sql_root_pw: Sup3rStr0ng
another_sql_pw: notThatSecure
This file needs to be encrypted by ansible vault:
ansible-vault encrypt secrets.enc
New Va...