What with ansible?

Yes, I said I am going to show you some ansible, and what happen? I got sidetracked trying to make my ansible roles reusable in pull and push mode, but it didn’t do as expected! What with this ansible reusable roles?
It kept on throwing out some syntax errors about the modules used … and I had troubleshot it for a couple of days. Finally, I found the issue and it is not really syntax error but because of the different version of ansible on my play node and my control node!
So, even though ansible is not require to be installed on play node, you should always make sure it is the same version as the control node when you are running in both pull and push mode!

Posted in Uncategorized | Leave a comment

LCA2018 Sydney

For the past 1 week, I had been attending #lca2018 @Sydney. It was a marvelous event and I got to meet up with a lot of Linux experts and Open Source Community people.

The event was very packed and got a lot of interesting speeches that I had missed due to clashes with others. Fortunately, they are recorded video for each sessions. Here are some of the recorded session on youtube:




Do check it out!

After this 5 days event …. I come down to a simple conclusion – I still got a lot to learn before I can say I am a Linux Engineer! As for now, I am just a Linux user who knows a bit of system administration, and a bit of scripts, and a bit of DB, and a bit of web, and a long way to go …


Posted in Linux | Tagged | Leave a comment

Ansible 101 – part 1

‘So, you think you know “Ansible”? Show me!’

I am still learning in the Ansible world, and it is a really my current “swiss army knife” in my Linux toolbox.

I use ansible to do ad-hoc job, or some partial routine task, and now even using it to create different roles for my ansible playbooks.

There are many online resources to get you started with using ansible and doing your first ad-hoc job, and first playbook. And today, I am just going to write the most basic and crucial part of using ansible – installing it!

If you are using Linux (any distro), then the easier and common way is to installed “ansible” with your distro package manager:

CentOS: yum -y install epel-release && yum -y install ansible
Debian/Ubuntu: apt-get install ansible
Or you might prefer to install it using python package manager “pip:
pip install ansible

More info refer to : http://docs.ansible.com/ansible/latest/intro_installation.html

No matter which way, you will need to get it install.

If you are using Windows 10, you might want to refer to https://www.jeffgeerling.com/blog/2017/using-ansible-through-windows-10s-subsystem-linux

Or if you are running Cygwin on Windows, then refer to https://www.jeffgeerling.com/blog/running-ansible-within-windows

Thank you Jeff Geerling!

Posted in Linux | Tagged | Leave a comment

It had been awhile …

Yes, it had been awhile since I posted anything in my blog here.
Is not that I stopped learning about Linux nor any open-source innovation, is just I got to sorted out my priority – moving the family to be with me!
It took me and my wife about 1.5 years to plan and arrange, and yet we still have many hiccups and unexpected events. Fortunately for me, everything set down just fine (not entirely perfect nor according to plan).

Enough of my personal stuff, now back to what I had been up to for the last 8 months:
1. RHN Classic migration to RHSM – DONE
2. Ansible (replace cfengine) – WIP
3. RHEL6 to RHEL7 – WIP

There is nothing much to talk about RHN Classic migration to RHSM as you most properly can follow the instruction given by Red Hat: https://access.redhat.com/documentation/en-us/openshift_enterprise/2/html/administration_guide/migrating_rhn_classic_to_rhsm

As for Ansible, I am using ansible-pull with ansible roles to deploy/reimage the Linux Desktop.

In my next post (hopefully soon), I will start putting in more info about how to start using ansible for your ad-hoc jobs, and build simple playbook.

You can start to read about ansible here too: https://docs.ansible.com/ansible/latest/intro_getting_started.html

Posted in Linux, Uncategorized | Tagged , , | Leave a comment

How to find out the top 10 files/folders in homedir

Many times, a linux user had exceed the disk quota of homedir, so here is a small command to find out the top 10 files/folders that consumed the most in homedir:

du -xck ~/.[^.]* |sort -rn |head

“~/” – mean current user’s homedir. You can replace “~/.*” with the directory you wish to check, example “/tmp”.



Posted in Linux | Leave a comment

ANZ banking system fault!!!

Hmm … I am wondering whether anyone else had experience being charged “overdrawn fee” by ANZ when there is not overdrawn? I had …. 3 times!

Here is the scenario:

  1. ANZ Access Advantage Account with $0 balance, and ANZ Online Saver Account with $200 balance
  2. I transferred $100 from Online Saver Account to Access Advantage Account
  3. Withdraw $100 via ATM (from Access Advantage Account)
  4. Cash deposit $40 via ATM at around 10pm
    • Check balance via ATM shown $40
  5. Transferred back $40 from Daily Access Account back to Online Savings Account via “goMoney ANZ”
    • Access Advantage Account shown $40 balance , and Online Saver Account shown $100 before transferred
    • Access Advantage Account shown $0 balance , and Online Saver Account shown $140 after transferred
  6. Next business day, ANZ charged me $6 overdrawn fees, saying that my Daily Access Account went into negative
Please note that you are not allow to transfer (via goMoney ANZ nor online) if there are insufficient in ANZ Access Advantage Account to ANZ Online Saver, so how is it possible for ANZ Access Advantage Account to go negative?
It seem like there is a flaw in ANZ system, which any banking transaction happen after 10pm business day will only be process on next business.  If so, why on earth it show $40 balance in ANZ Access Advantage Account, and allow transfer of the money into ANZ Online Saver?
So, if you have encounter this before ….. it is not your account went to negative, is just bad coordination (timing) of the ANZ systems!



Posted in Uncategorized | Tagged , , , , | Leave a comment

Forcing 16:9 resolution onto Linux GUI

Sometimes, Linux can’t detect the monitor resolution properly, eg 1920X1080 (16:9), so we will need to be creative and trick the Linux to think that’s a new video mode for that resolution.
Here is some brief steps how I got it working for my Linux:

0. Find out which monitor output the screen resolution need to change:
$ xrandr -q

1. Find out the resolution mode:
$ cvt 1920 1080 60
# 1920×1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
Modeline "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

2. Insert the new mode using "xrandr" with the info above
$ xrandr –newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync

3. Add the new mode into the connected primary (eg Virtual1 for VM)
$ xrandr –addmode Virtual1 1920x1080_60.00

4. Set the output
$ xrandr –output Virtual1 –mode 1920x1080_60.00

You can put this into /etc/rc.local to force the system to use the mode everything it startup.

Posted in Uncategorized | Leave a comment