Posts

Showing posts from August, 2023

AWS using Ansible? Yes, it's possible!

  Although, I've used Ansible extensively for a lot of automation and orchestration tasks, using Ansible for AWS was indeed, a new territory for me.  This turned out to be a blessing, since along with using Ansible for AWS tasks, I also learnt how to use WSL (Windows Subsystem for Linux) on a Windows machine. Though WSL's been around for some time, I still hadn't come around to using it since I was mostly using my Macbook pro. Not anymore, though!  Anyway, I have listed below the steps to: Install WSL on Windows 11 23H2 patch Install AWS CLI on Ubuntu 22.04 (Exact version - 22.04.3 LTS) Install Ansible and the amazon.aws collection Use AWS CLI to get the list of  VPCs in the region - us-east-1 (or a region of your choice) Create a python file/script to get the list of VPCs in the region - us-east-1 (or a region of your choice) Create an Ansible playbook to get the list of VPCs in the region - us-east-1 (or a region of your choice.   You may download the complete installat

Read a file and extract specific lines using Native Ansible Modules

I never realised that reading a file on a remote host and extracting specific lines from that file would be such an arduous task. As part of one of my projects, I had this requirement and without using "cat" or other shell utilities, it was quite cumbersome to read and extract the information that I was looking for. Read on to find out how it can be done using Ansible native commands. Note that I have suggested only one out of a possible many methods. Feel free to explore yourself and update the comments here! REMOTE FILE CONTENTS $ cat /tmp/IP_and_hostnames.txt $ cat /tmp/IP_and_hostnames.txt 192.168.230.165:example-host-1.example.com 192.168.230.166:example-host-2.example.com 192.168.230.167:example-host-3.example.com 192.168.230.175:example-host-1-vip.example.com 192.168.230.176:example-host-2-vip.example.com 192.168.230.177:example-host-3-vip.example.com 192.168.230.185:example-host-1-priv.example.com 192.168.230.186:e

Popular posts from this blog

Solution to "End Program - WMS Idle"

Modify retention period of workflow queues

Check if UTL_FILE and FND_FILE are working fine