This forum isn’t here for people to code for you, it is for us to help people who have issues with code.
You should use the Ansible documentation and Google to figure out how to do each step you have listed, and build out a playbook and/or role piece by piece, troubleshooting as needed.
If/when you have issues that you cannot seem to get by, then feel free to post here.
Good luck!