Everything is Linux
I am here to share my knowledge in Linux with all.The opinions expressed and topics discussed on this blog are my own and don't necessarily reflect those of my employer.
Tuesday, September 21, 2021
Ansible Playbook to collect uptime of servers
Wednesday, May 12, 2021
How to copy block of lines to end of file through Ansible
Following playbook can be used to push block of lines in list.cfg(in this case) to nrpe.cfg at End of file.
We can push to many number of servers from single ansible Control node.
---
- name: copy the repo
hosts: localhost
tasks:
- blockinfile:
block: "{{ lookup('file', 'list.cfg') }}"
dest: /etc/nagios/nrpe.cfg
backup: yes
register: output
Monday, November 24, 2014
Wednesday, November 19, 2014
Quiz3 - RHEL7 Introduction
Quiz2 - Red Hat Linux
Quiz1 - Red Hat Linux
Thursday, August 14, 2014
Recovering Ubuntu after loading windows in dual booting environment
How to recover Ubuntu 10 after installing windows in dual booting environment?
Setup:
Machine with 2 disks and Ubnutu 10 and Windows xp installed in second disk /dev/sdb. Due to some problem in Windows, reinstalled the windows XP. After re-installation, ubuntu grub is over writen by windows and only windows is booting.
Procedure to recover:
1. Boot through Ubnutu Live CD
2. Type $ sudo fdisk -l to confirm the disk availbility.
3. Here Ubuntu is installed in /dev/sdb7 which is / partition and /dev/sdb8 is swap and /dev/sdb1 is windows partition.
4. For modifying Grub, root partition to be mounted first.
$ sudo mount /dev/sdb7 /mnt
5. For installing grub on /dev/sdb , give following command,
$ sudo grub-install --root-directory=/mnt /dev/sdb
6. Rebooted the machine. Now grub options coming for Ubnutu. But If we select windows, it gives "Insert system disk" error and was not booting.
7. Now booted in Ubnutu OS and given following command for updating grub.
$ sudo update-grub2
8. Restared the desktop now and verified both Ubnutu and windows XP booting.
9. Problem solved.
Ansible Playbook to collect uptime of servers
Hi, This is to explain how we can write a small playbook to collect uptime of all servers in our environment. We can use our own server l...
-
Hi, This is to explain how we can write a small playbook to collect uptime of all servers in our environment. We can use our own server l...
-
Operating system: RHEL 5 Problem: Network card driver is not getting installed in RHEL 5 Error: If the command # make install is gi...
-
First check whether telnet-server rpm in installed, # rpm -q telnet-s erver telnet-server-0.17-38.el5 If it is installed, then edit # vi ...