Limit an Ansible Playbook to a single host

Often when you start implementing something new you want to test your playbook on a single instance.  If your Ansible hosts file looks like this


and you only want to run your playbook on host1, add the –limit paramter:

ansible-playbook –limit host1 playbook.yml


overflow tmp folder on aws

When you receive an error message like

scp: writing /tmp/mkinitramfs_Y2BgCE/ [..] : No space left on device

check how big your tmp folder is. If it looks like

overflow        1.0M  1.0M     0 100% /tmp

your volume was probably full at a time. After you allocated new disk space umount your volume with

umount /tmp

If you receive the error “umount: /tmp: device is busy.” run “lsof /tmp/” to see what is using it.

After umounting /tmp your system should work fine again. You can prevent /tmp from reappearing after a restart with

echo 'MINTMPKB=0' > /etc/default/mountoverflowtmp


How to run a VMware image in Virtualbox

Having just downloaded Kali Linux I was wondering how to convert its VMware image to VirtualBox, thankfully I quickly found a page that just recommended to create a new virtual machine and add the VMware image as a disk:

So if you want to run Kali Linux in Virtualbox, just

a) Create a new virtual machine in VirtualBox
b) Slect ‘Use an existing virtual hard drive file’ and select the Kali-Linux image (e.g. Kali-Linux-1.1.0-vm-amd64, the one without -s00x in the name)

By they way, the default login for Kali Linux is root / toor


Turn on SNMP in Asuswrt-Merlin

Asus routers like the RT-N66U have support for SNMP in the latest firmware. Here is how to enable and test it (here using the awesome Asuswrt-merlin alternative firmware ).

Go To Administration and click on SNMP. Enable SNMP, enter a system name, system location, SNMP Get Community (just any text, this acts like a password). Click on Apply to activate the changes.


To test if SNMP is working you can use the snmpwalk command. If your router IP address is and your SNMP Get Community string is ‘public’, run

snmpwalk -Os -c public -v2c iso.

The output should look like “iso. = STRING: “Linux RT-N66U #1 Thu Nov 20 13:57:15 EST 2014 mips” if SNMP is working. If it is not working you will receive a message like “Timeout: No Response from”.

To get more data from SNMP run ‘snmpwalk -Os -c public -v2c’


Clean up binlog files

If you care having disk space issues because your MySQL bin logs are too big you can delete older ones using this simple MySQL query:


This example will keep 21 days of binlogs, set the interval as needed. Btw, if you are using MySQL replication, this command will not be replicated (good!).


USB stick read only

If you cannot write on your USB stick on Debian please check if you have entries like this in your /etc/fstab file.

/dev/sdb1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sdb2       /media/usb1     auto    rw,user,noauto  0       0

If you do, please comment them out, restart your computer and try to mount your USB stick again.