Today ansible is the most popular tool in the automation part, so for creating playbook, roles and modules you need to do too much manual work, for getting rid from this I have created a script that will create a ansible role structure with tasks, handlers, deafults, template and library
And also I created a hello custom module that is called in the task so you can work without any manual work, you can directly run the command and you will have ready to go ansible environment.
Simply run the following command —
cd /opt/ wget -O - https://raw.githubusercontent.com/vortexdude/src/main/script.sh | bash -s newrole
After running the above command in your linux you need the package of ansible and wget and git.
to run the ansible playbook —
also it will create the inventory file where you can define you all of the servers the path of the inventory will be inventory/all.
hello.py is your custom module and the file wll be in the following location