Automate Multiple Technologies Using Python-Script

Hola Friends, today we are going to automate multiple technologies using python script.

we will show automation by running Basic Linux Commands, Configuring Httpd, Docker, LVM Partition, Launch AWS OS, Configuration of Ansible and Start the service using ansible using a single Python script.

Here’s my Menu program:-

1) On pressing 1, the date command will run and output will come on the screen.

2) On pressing 2, the cal command will run and output will come on the screen.

3) On Pressing 3, we just exited from our menu program.

4) On pressing 4, our httpd apache web server will be configured and one Html file will create.

5) On pressing 5, the Docker service will start.

6) On pressing 6, a container will launch.

A container has launched with OS name myteamtaskos and with image centos:8.

7) On Pressing 7, we can directly enter inside the container.

8) On pressing 8, we can create PV, VG, and LV automatically.

9) On Pressing 9, we will launch ec2-instance on AWS Cloud.

10) On Pressing 10, we will create an EBS Volume on AWS Cloud.

11) On Pressing 11, we can automatically set up the Ansible on the Controller Node.

Internal Process:-

  1. Installing Python3
  2. Installing Ansible.
  3. Creating /etc/ansible/ansible.cfg file
  4. Creating a file that having managed Node IP details.
  5. Write the Content inside the ansible.cfg file

All the 5 Steps will be done, by just pressing 11 on the menu program.

12) On pressing 12, we can check the connected Node.

13) On pressing 13, we can check the connectivity of the managed Node.

14) On pressing 14, we can start any service on a Managed Node.

Right now, I am going to start httpd service, it is in a stopped state.

After Pressing 14, it asks which service you want to start, I typed httpd, then it starts the httpd service.

httpd has started successfully.

That’s it for now.

Thanks for reading our article.

I am a blogger. Check my blog →