How to create a new config file in Ansible playbook

Posted on in Categories , , , , , , , last updated February 19, 2017

I wanted to create a file named /etc/apt/apt.conf.d/1000-force-ipv4-transport with the value set to ‘Acquire::ForceIPv4 true;’ on 20 cloud servers hosted in AWS. I already setup Ansible playbook to automate stuff. How do I create a new file using Ansible playbook? Is it possible to create a complex file with many lines of text (say squid.conf) using Ansible IT automation tool?

How to compile and install Tarsnap on a Ubuntu/Debian Linux

Posted on in Categories , , , , last updated January 5, 2017

A Tarsnap service is a secure online backup system for Linux, OSX, *BSD or UNIX-like system. They encrypt and store data in Amazon S3. The services also use rsync-like algorithms, and only backup data that has been changed since the last dump. The backups are protected by a security key only known to a backup operator or sysadmin. How do I install a tarsnap client on a Ubuntu or Debian Linux system?
Continue reading “How to compile and install Tarsnap on a Ubuntu/Debian Linux”

SSH: WARNING: UNPROTECTED PRIVATE KEY FILE! Error and Solution

Posted on in Categories , , , , , , last updated January 26, 2017

I‘m setting up server on an Amazon EC2 compute instance powered by Suse Enterprise Linux server. I am using the following command to login into the my EC2 compute from OS X/Ubuntu desktop:

ssh -i suse-ec2-server-jp.pem [email protected]

I am getting the following error:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0440 for 'suse-ec2-server-jp.pem' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: suse-ec2-server-jp.pem
Password:

How do I fix this problem and login using ssh command?

Linux: Jpeg Image Optimization / Compress Command

Posted on in Categories , , last updated September 23, 2013

I know how to optimize and compress png images using optipng command. line tool. I have lots of images in JPEG format. How do I compress and optimize JPEG images on my amazon cloud account so that I can save bandwidth on cloudfront cdn account? How do I use an image compressor to create lossless compression on JPEG files, with no effect on image quality in bulk using Linux?

Linux / Unix Command To Optimize and Compress PNG Files In Bulk

Posted on in Categories , , , , , last updated October 22, 2016

I have lots of images in png format (over 250k+ png). Properly formatting and compressing png images can save many bytes of data. How do I compress and optimize png images on my amazon cloud account so that I can save bandwidth on cloudfront cdn account? How do I use an image compressor to create lossless compression on PNG files, with no effect on image quality in bulk using Red Hat Enterprise Linux bash shell?