$ ansible testserver -i inventory -m ping
ralagarasan
ralagarasan
Saturday, April 4, 2026
Ansible_4
Ansible_3
Idempotency
Ansible_2
Friday, April 3, 2026
vi tricks
# Delete all lines starting with "pattern"
:g/^pattern/d
# Save and quit
:wq
open vi with insert mode
alias vi='vim +start'
# Open at line 10
vi +10
pip upgrade
python3 -m pip install --upgrade pip
pip3 -V
➜ ~ python3 -m pip install --upgrade pip
➜ ~ pip3 install ansible
dnf and rpm troubleshooting
dnf
dnf update -v
--debuglevel=<no>
-v = default debug level
0 = No additional information
1-9 = Increasing levels of debugging
10 = Highest level
dnf update --debuglevel=10
rpm --repmverbosity=<level> (info or debug)
Kubernetes images
Kubernetes image pull
kubeadm config images pull --v=<no> (--v verbosity levels)| Level | Meaning |
| --------- | --------------------------------------------- |
| `--v=0` | Default minimal logs |
| `--v=1-2` | Basic info messages |
| `--v=3-4` | More detailed operational logs |
| `--v=5` | Debug level (recommended for troubleshooting) |
| `--v=6` | Detailed debugging |
| `--v=7` | Very detailed API calls |
| `--v=8` | HTTP request bodies |
| `--v=9` | Maximum verbosity (very noisy) |
kubeadm init --v=5
kubeadm init --v=6 2>&1 | tee kubeadm-debug.log
Tuesday, March 31, 2026
Ansible_1
Playbook
In Ansible, a script is called a playbook.
A playbook describes which hosts to configure, and an ordered list of tasks to perform on those hosts.
The playbook can be execute by using the ansible-playbook command
Ansible’s playbook syntax is built on top of YAML
$ ansible-playbook <name>.yml
Ansible will make SSH connections in parallel
It will execute the first task on the list on all hosts simultaneously.
eg:- 1st tasks
- name: Install nginx
apt: name=nginx
Ansible will do the following:
1. Generate a Python script that installs the required package
2. Copy the script to host1, host2, and host3
3. Execute the script on host1, host2, and host3
4. Wait for the script to complete execution on all hosts
Ansible will then move to the next task in the list, and go through these same four steps. It’s important to note the following:
• Ansible runs each task in parallel across all hosts.
• Ansible waits until all hosts have completed a task before moving to the next task.
• Ansible runs the tasks in the order that you specify them.
Simple Terms
Ansible playbooks as executable documentation. It’s like the README file that describes the commands you had to type out to deploy your software, except that the instructions will never go out-of-date because they are also the
code that gets executed directly.
Remote Hosts
To manage a server with Ansible, the server needs to have SSH and Python 2.5 or later installed, or Python 2.4 with the Python simplejson library installed.
There’s no need to preinstall an agent or any other software on the host.
Control machine
The control machine (the one that you use to control remote machines) needs to have Python 2.6 or later installed
Ansible
Name Ansible
It’s a science-fiction reference
An ansible is a fictional communication device that can transfer information faster than the speed of light.
Ursula K. Le Guin invented the concept in her book Rocannon’s World, and other sci-fi authors have since borrowed the idea from Le Guin.
Michael DeHaan took the name Ansible from the book Ender’s Game by Orson Scott Card. In that book, the ansible was used to control many remote ships at once, over vast distances. Think of it as a metaphor for controlling remote servers.
Michael DeHaan :- Creator of Ansible software
Ansible started as a simple side project in February of 2012
Configuration Management
we are typically about writing some kind of state description for our servers, and then using a tool to enforce that the servers are, indeed, in that state: the right packages are installed, configuration files contain the expected values and have the expected permissions, the right services are running, and so on.
Deployment
They are usually referring to the process of taking software that was written in-house, generating binaries or static assets (if necessary), copying the required files to the server(s), and then starting up the services.
Ansible is a great tool for deployment as well as configuration management.
Monday, February 2, 2026
Linux Booting Issues
Boot Issues
grub> set root=(hd0,msdos1)
grub> linux /boot/vmlinuz-(version) root=/dev/sda1 optional ro or rw
grub> initrd /boot/initrd(version).img
grub> boot
$ ls -l /
vmlinuz -> boot/vmlinuz-3.13.0-29-generic
initrd.img -> boot/initrd.img-3.13.0-29-generic
So you could boot from grub> like this:
grub> set root=(hd0,1)
grub> linux /vmlinuz root=/dev/sda1
grub> initrd /initrd.img
grub> boot