Few months back I've started dabbling in the world of Python 3.6. So far it has been quite a ride even though I've had some previous programming experience. Python is quite unique language and is very easy to learn. Since I've started learning about Python, I also started searching for its real life applications and if there is any way to use this knowledge more efficiently.
As described in my previous post, Ansible is very, very powerful tool for your daily automation tasks. I am posting this simple role in order to demonstrate some of the capabilities of Ansible. This is a separate role, which is used to update /etc/resolv.conf on a group of hosts (inventory) with your own.
For convenience sake, I am posting this in my github repo as well. First, lets start with tasks/main.yml. This is the main working "script", which does the magic happen:
Ansible is a great tool for helping sysadmins doing their day-to-day tasks in a more automated manner. If you manage alot of systems, then you sure know how cumbersome it can be if you have to do something repetitive manually on them.
Ansible is a free automation software, that helps you develop your own recipes (called roles in ansible terminology), which can be used to automate almost everything.
This software is simple automation engine, that has built-in "rules" in terms of directories and files. I am posting a bash script, that deploys a preferred ansible working environment, instead of creating all the initial files and directories yourself. It is used for new projects only.
There are some cases, where a failed drive in our RAID array can cause serious issues. For example, due to the failed drive, our Linux system can shutdown and it won't be able to boot again. The GRUB bootloader might also fail and will need to be reinstalled. We have few options, one of which is to reassemble our RAID array from any other Linux LiveCD distribution. Of course, first we need to physically replace the failed drive and then boot to our LiveCD. Once we have booted, we need to install the mdadm tool.
Imagine you are the head sysadmin of an organization, that hold many servers. Managing the log files of each server can be quite challenging, if you are supposed to do it by logging in to each server and manually checking each log file for important events. Fortunately, rsyslog happens to have a functionality, where rsyslog can serve as a client and a servers. With this information in hand, we can now setup one centralized rsyslog server and all of our other servers can act as clients and send their logs to our centralized rsyslog server. The goals of this tutorial is to show you how to set up a rsyslog client and server and test if the configuration is working.