Tired of installing ansible and writing configuration which you don’t know, but you know the command to install means you are in right place, I have a made mini ansible just clone and add ur command on conf it works like a charm.

Pre-requisites

Just python typically every Linux os has a default python package installed.

Installation and configuration

Clone the project locally to your Linux machine, it supports the execution of commands as well as sending a file from local. This project both IP and DNS as well it can be either password or key.

$ git clone git@github.com:ahamedyaserarafath/mini_ansible.git

Make configuration changes by edit the mini_ansible.conf file. Please find the reference below.

# [UniqueName]
# ip = IP/DNS
# username = ubuntu
# password = test@123
# or
# key = /tmp/test.pem
# cmd = apt-get install python
# or
# local_path = file.txt
# remote_path = /tmp/.

ex:

...
[ssh_host_1]

ip = 10.10.10.10 username = ubuntu private_key = /tmp/tmp.pem command = ls … …

[ssh_host_2]

ip = 10.10.10.11 username = ubuntu password = test ….

You can any number of hosts, one thing which I’m still working on is parallel execution as of now it supports one-by-one execution.

python mini_ansible.py 

Check the logs folder for your reference.

https://github.com/ahamedyaserarafath/mini_ansible

GitHub Link, Please feel free to fork and use it

Categorized in:

Tagged in:

,