You can convert a shell script to an ansible playbook. But why would you do when you can make ansible pick up the shell script and execute it. Your end goal is anyways to automate the execution of that shell script. You can use ansible's shell module for this purpose.